diff options
author | James Cook <james@lindenlab.com> | 2009-07-07 00:53:05 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-07-07 00:53:05 +0000 |
commit | 52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 (patch) | |
tree | d8f5c98644029dd289a97aa0d8b55c5a6200c214 /indra/newview/llimview.h | |
parent | 2c722655bd6701a3dc8518c6518c51f538765dcd (diff) |
Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files:
lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml
svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r-- | indra/newview/llimview.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 37dcd1593f..6a354dfe92 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -38,6 +38,7 @@ #include "llinstantmessage.h" #include "lluuid.h" #include "llmultifloater.h" +#include "llrecentpeople.h" class LLFloaterChatterBox; class LLUUID; @@ -45,6 +46,47 @@ class LLFloaterIMPanel; class LLFriendObserver; class LLFloaterIM; +class LLIMModel : public LLSingleton<LLIMModel> +{ +public: + + struct LLIMSession + { + LLIMSession(std::string name, EInstantMessage type, LLUUID other_participant_id) + :mName(name), mType(type), mNumUnread(0), mOtherPraticipantID(other_participant_id) {} + + std::string mName; + EInstantMessage mType; + LLUUID mOtherPraticipantID; + S32 mNumUnread; + std::list<LLSD> mMsgs; + }; + + + LLIMModel(); + + static std::map<LLUUID, LLIMSession*> sSessionsMap; //mapping session_id to session + boost::signals2::signal<void(const LLSD&)> mChangedSignal; + boost::signals2::connection addChangedCallback( boost::function<void (const LLSD& data)> cb ); + + bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id); + std::list<LLSD> getMessages(LLUUID session_id, int index = 0); + bool addMessage(LLUUID session_id, std::string from, std::string utf8_text); + bool addToHistory(LLUUID session_id, std::string from, std::string utf8_text); + //used to get the name of the session, for use as the title + //currently just the other avatar name + const std::string& getName(LLUUID session_id); + + static void sendLeaveSession(LLUUID session_id, LLUUID other_participant_id); + static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, + const std::vector<LLUUID>& ids, EInstantMessage dialog); + static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing); + static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, + const LLUUID& other_participant_id, EInstantMessage dialog); + + void testMessages(); +}; + class LLIMSessionObserver { public: @@ -53,8 +95,11 @@ public: virtual void sessionRemoved(const LLUUID& session_id) = 0; }; + class LLIMMgr : public LLSingleton<LLIMMgr> { + friend class LLIMModel; + public: enum EInvitationType { |