summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgroupmgr.h')
-rw-r--r--indra/newview/llgroupmgr.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 487fdd4c5b..82df631b8c 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -53,6 +53,13 @@ protected:
LLUUID mID;
};
+class LLParticularGroupObserver
+{
+public:
+ virtual ~LLParticularGroupObserver(){}
+ virtual void changed(const LLUUID& group_id, LLGroupChange gc) = 0;
+};
+
class LLGroupRoleData;
class LLGroupMemberData
@@ -132,8 +139,8 @@ public:
const LLUUID& getID() const { return mRoleID; }
- const std::vector<LLUUID>& getRoleMembers() const { return mMemberIDs; }
- S32 getMembersInRole(std::vector<LLUUID> members, BOOL needs_sort = TRUE);
+ const uuid_vec_t& getRoleMembers() const { return mMemberIDs; }
+ S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE);
S32 getTotalMembersInRole() { return mMemberIDs.size(); }
LLRoleData getRoleData() const { return mRoleData; }
@@ -143,10 +150,10 @@ public:
bool removeMember(const LLUUID& member);
void clearMembers();
- const std::vector<LLUUID>::const_iterator getMembersBegin() const
+ const uuid_vec_t::const_iterator getMembersBegin() const
{ return mMemberIDs.begin(); }
- const std::vector<LLUUID>::const_iterator getMembersEnd() const
+ const uuid_vec_t::const_iterator getMembersEnd() const
{ return mMemberIDs.end(); }
@@ -157,7 +164,7 @@ protected:
LLUUID mRoleID;
LLRoleData mRoleData;
- std::vector<LLUUID> mMemberIDs;
+ uuid_vec_t mMemberIDs;
S32 mMemberCount;
private:
@@ -306,7 +313,9 @@ public:
~LLGroupMgr();
void addObserver(LLGroupMgrObserver* observer);
+ void addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer);
void removeObserver(LLGroupMgrObserver* observer);
+ void removeObserver(const LLUUID& group_id, LLParticularGroupObserver* observer);
LLGroupMgrGroupData* getGroupData(const LLUUID& id);
void sendGroupPropertiesRequest(const LLUUID& group_id);
@@ -331,7 +340,7 @@ public:
static void sendGroupMemberJoin(const LLUUID& group_id);
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
static void sendGroupMemberEjects(const LLUUID& group_id,
- std::vector<LLUUID>& member_ids);
+ uuid_vec_t& member_ids);
void cancelGroupRoleChanges(const LLUUID& group_id);
@@ -355,13 +364,19 @@ public:
private:
void notifyObservers(LLGroupChange gc);
+ void notifyObserver(const LLUUID& group_id, LLGroupChange gc);
void addGroup(LLGroupMgrGroupData* group_datap);
LLGroupMgrGroupData* createGroupData(const LLUUID &id);
typedef std::multimap<LLUUID,LLGroupMgrObserver*> observer_multimap_t;
observer_multimap_t mObservers;
+
typedef std::map<LLUUID, LLGroupMgrGroupData*> group_map_t;
group_map_t mGroups;
+
+ typedef std::set<LLParticularGroupObserver*> observer_set_t;
+ typedef std::map<LLUUID,observer_set_t> observer_map_t;
+ observer_map_t mParticularObservers;
};