summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r--indra/newview/llimview.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 38a57a4025..469f6ec21d 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -44,6 +44,14 @@ class LLFloaterIMPanel;
class LLFriendObserver;
class LLFloaterIM;
+class LLIMSessionObserver
+{
+public:
+ virtual ~LLIMSessionObserver() {}
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0;
+ virtual void sessionRemoved(const LLUUID& session_id) = 0;
+};
+
class LLIMMgr : public LLSingleton<LLIMMgr>
{
public:
@@ -165,6 +173,9 @@ public:
//HACK: need a better way of enumerating existing session, or listening to session create/destroy events
const std::set<LLHandle<LLFloater> >& getIMFloaterHandles() { return mFloaters; }
+ void addSessionObserver(LLIMSessionObserver *);
+ void removeSessionObserver(LLIMSessionObserver *);
+
private:
// create a panel and update internal representation for
// consistency. Returns the pointer, caller (the class instance
@@ -194,10 +205,16 @@ private:
static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
+ void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ void notifyObserverSessionRemoved(const LLUUID& session_id);
+
private:
std::set<LLHandle<LLFloater> > mFloaters;
LLFriendObserver* mFriendObserver;
+ typedef std::list <LLIMSessionObserver *> session_observers_list_t;
+ session_observers_list_t mSessionObservers;
+
// An IM has been received that you haven't seen yet.
BOOL mIMReceived;