diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
commit | 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch) | |
tree | 4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llimview.h | |
parent | 351ebe9fcb76f3b99c2957004bb8493a904869ee (diff) |
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r-- | indra/newview/llimview.h | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index a4e419694d..469f6ec21d 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -33,9 +33,10 @@ #ifndef LL_LLIMVIEW_H #define LL_LLIMVIEW_H -#include "llfloater.h" +#include "llmodaldialog.h" #include "llinstantmessage.h" #include "lluuid.h" +#include "llmultifloater.h" class LLFloaterChatterBox; class LLUUID; @@ -43,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: @@ -134,19 +143,12 @@ public: // IM received that you haven't seen yet BOOL getIMReceived() const; - void setFloaterOpen(BOOL open); /*Flawfinder: ignore*/ - BOOL getFloaterOpen(); - - LLFloaterChatterBox* getFloater(); - // This method is used to go through all active sessions and // disable all of them. This method is usally called when you are // forced to log out or similar situations where you do not have a // good connection. void disconnectAllSessions(); - static void toggle(void*); - // This is a helper function to determine what kind of im session // should be used for the given agent. static EInstantMessage defaultIMTypeForAgent(const LLUUID& agent_id); @@ -171,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 @@ -198,12 +203,18 @@ private: void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); - static void onInviteNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* userdata); + 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; @@ -223,6 +234,23 @@ public: static std::map<std::string,std::string> sForceCloseSessionMap; }; +class LLIncomingCallDialog : public LLModalDialog +{ +public: + LLIncomingCallDialog(const LLSD& payload); + + /*virtual*/ BOOL postBuild(); + + static void onAccept(void* user_data); + static void onReject(void* user_data); + static void onStartIM(void* user_data); + +private: + void processCallResponse(S32 response); + + LLSD mPayload; +}; + // Globals extern LLIMMgr *gIMMgr; |