summaryrefslogtreecommitdiff
path: root/indra/newview/llcallingcard.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcallingcard.h')
-rw-r--r--indra/newview/llcallingcard.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h
index 85a1ab6e1e..47b0dcb903 100644
--- a/indra/newview/llcallingcard.h
+++ b/indra/newview/llcallingcard.h
@@ -45,6 +45,7 @@
//class LLInventoryObserver;
class LLMessageSystem;
class LLTrackingData;
+
class LLFriendObserver
{
public:
@@ -125,6 +126,9 @@ public:
// get full info
const LLRelationship* getBuddyInfo(const LLUUID& id) const;
+ // Is this person a friend/buddy/calling card holder?
+ bool isBuddy(const LLUUID& id) const;
+
// online status
void setBuddyOnline(const LLUUID& id, bool is_online);
bool isBuddyOnline(const LLUUID& id) const;
@@ -147,6 +151,23 @@ public:
void removeObserver(LLFriendObserver* observer);
void notifyObservers();
+ // Observers interested in updates of a particular avatar.
+ // On destruction these observers are NOT deleted.
+ void addParticularFriendObserver(const LLUUID& buddy_id, LLFriendObserver* observer);
+ void removeParticularFriendObserver(const LLUUID& buddy_id, LLFriendObserver* observer);
+ void notifyParticularFriendObservers(const LLUUID& buddy_id);
+
+ /**
+ * Stores flag for change and id of object change applies to
+ *
+ * This allows outsiders to tell the AvatarTracker if something has
+ * been changed 'under the hood',
+ * and next notification will have exact avatar IDs have been changed.
+ */
+ void addChangedMask(U32 mask, const LLUUID& referent);
+
+ const std::set<LLUUID>& getChangedIDs() { return mChangedBuddyIDs; }
+
// Apply the functor to every buddy. Do not actually modify the
// buddy list in the functor or bad things will happen.
void applyFunctor(LLRelationshipFunctor& f);
@@ -179,9 +200,16 @@ protected:
buddy_map_t mBuddyInfo;
+ typedef std::set<LLUUID> changed_buddy_t;
+ changed_buddy_t mChangedBuddyIDs;
+
typedef std::vector<LLFriendObserver*> observer_list_t;
observer_list_t mObservers;
+ typedef std::set<LLFriendObserver*> observer_set_t;
+ typedef std::map<LLUUID, observer_set_t> observer_map_t;
+ observer_map_t mParticularFriendObserverMap;
+
private:
// do not implement
LLAvatarTracker(const LLAvatarTracker&);