summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-21 04:58:23 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-21 04:58:23 +0000
commit6f41747bc4d8afcb2b19ac02295575031bcf9021 (patch)
tree1e83d8fcf7af6b9416b49bb46cb9e7cf15abffbc /indra/newview/llimview.h
parent57fca109cae3105b6bc1319e9886c16631bc7374 (diff)
Merging revisions 2112-2128 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry
* Bugs: EXT-1605 EXT-1506 EXT-1663 EXT-1616 EXT-1599 EXT-1587 * Dev: EXT-748 EXT-1447 * IM Cleanup
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r--indra/newview/llimview.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index d98b5ca297..f9db6d8ed2 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -75,10 +75,20 @@ public:
LLIMModel();
+
+ //we should control the currently active session
+ LLUUID mActiveSessionID;
+ void setActiveSessionID(const LLUUID& session_id);
+ void resetActiveSessionID() { mActiveSessionID.setNull(); }
+ LLUUID getActiveSessionID() { return mActiveSessionID; }
+
//*TODO make it non-static as LLIMMOdel is a singleton (IB)
static std::map<LLUUID, LLIMSession*> sSessionsMap; //mapping session_id to session
- boost::signals2::signal<void(const LLSD&)> mChangedSignal;
+ typedef boost::signals2::signal<void(const LLSD&)> session_signal_t;
+ typedef boost::function<void(const LLSD&)> session_callback_t;
+ session_signal_t mNewMsgSignal;
+ session_signal_t mNoUnreadMsgsSignal;
/**
* Find an IM Session corresponding to session_id
@@ -91,7 +101,8 @@ public:
*/
void updateSessionID(const LLUUID& old_session_id, const LLUUID& new_session_id);
- boost::signals2::connection addChangedCallback( boost::function<void (const LLSD& data)> cb );
+ boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
+ boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id,
const std::vector<LLUUID>& ids = std::vector<LLUUID>());
@@ -219,10 +230,12 @@ public:
const std::string& voice_session_handle,
const std::string& caller_uri = LLStringUtil::null);
- // This removes the panel referenced by the uuid, and then
- // restores internal consistency. The internal pointer is not
- // deleted.
- void removeSession(LLUUID session_id);
+ /**
+ * Leave the session with session id. Send leave session notification
+ * to the server and removes all associated session data
+ * @return false if the session with specified id was not exist
+ */
+ bool leaveSession(const LLUUID& session_id);
void inviteToSession(
const LLUUID& session_id,
@@ -295,6 +308,11 @@ public:
bool endCall(const LLUUID& session_id);
private:
+ // This removes the panel referenced by the uuid, and then
+ // restores internal consistency. The internal pointer is not
+ // deleted.
+ void removeSession(LLUUID session_id);
+
// create a panel and update internal representation for
// consistency. Returns the pointer, caller (the class instance
// since it is a private method) is not responsible for deleting