summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.h
diff options
context:
space:
mode:
authorMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
committerMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
commit7138fb673ac3df46b9cb5f23d0d74e70fdd2b6b3 (patch)
tree3c34a3a180b5275bd4166b0056765c5868f56447 /indra/newview/llimview.h
parentf6a10b3214d79df4e8f5768acaa68edbd2de5620 (diff)
Merge down from Branch_1-18-1:
svn merge --ignore-ancestry svn+ssh://svn.lindenlab.com/svn/linden/release@66449 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-1@67131
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r--indra/newview/llimview.h57
1 files changed, 34 insertions, 23 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index aac6fd63ce..f8a36107d6 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -1,5 +1,5 @@
/**
- * @file llimview.h
+ * @file LLIMMgr.h
* @brief Container for Instant Messaging
*
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
@@ -13,31 +13,32 @@
#include "llinstantmessage.h"
#include "lluuid.h"
-class LLFloaterNewIM;
+class LLFloaterChatterBox;
class LLUUID;
class LLFloaterIMPanel;
class LLFriendObserver;
class LLFloaterIM;
-class LLIMView : public LLView
+class LLIMMgr : public LLSingleton<LLIMMgr>
{
public:
- LLIMView(const std::string& name, const LLRect& rect);
- ~LLIMView();
-
- virtual EWidgetType getWidgetType() const;
- virtual LLString getWidgetTag() const;
+ LLIMMgr();
+ virtual ~LLIMMgr();
// Add a message to a session. The session can keyed to sesion id
// or agent id.
- void addMessage(const LLUUID& session_id, const LLUUID& target_id,
- const char* from, const char* msg,
+ void addMessage(const LLUUID& session_id,
+ const LLUUID& target_id,
+ const char* from,
+ const char* msg,
const char* session_name = NULL,
EInstantMessage dialog = IM_NOTHING_SPECIAL,
U32 parent_estate_id = 0,
const LLUUID& region_id = LLUUID::null,
const LLVector3& position = LLVector3::zero);
+ void addSystemMessage(const LLUUID& session_id, const LLString& message_name, const LLString::format_map_t& args);
+
// This method returns TRUE if the local viewer has a session
// currently open keyed to the uuid. The uuid can be keyed by
// either session id or agent id.
@@ -62,11 +63,23 @@ public:
const LLUUID& other_participant_id,
const LLDynamicArray<LLUUID>& ids);
+ // Creates a P2P session with the requisite handle for responding to voice calls
+ LLUUID addP2PSession(const std::string& name,
+ const LLUUID& other_participant_id,
+ const LLString& voice_session_handle);
+
// This removes the panel referenced by the uuid, and then
// restores internal consistency. The internal pointer is not
// deleted.
void removeSession(const LLUUID& session_id);
+ void inviteToSession(const LLUUID& session_id,
+ const LLString& session_name,
+ const LLUUID& caller,
+ const LLString& caller_name,
+ EInstantMessage type,
+ const LLString& session_handle = LLString::null);
+
//Updates a given session's session IDs. Does not open,
//create or do anything new. If the old session doesn't
//exist, then nothing happens.
@@ -80,6 +93,7 @@ public:
void refresh();
void notifyNewIM();
+ void clearNewIMNotification();
// IM received that you haven't seen yet
BOOL getIMReceived() const;
@@ -87,10 +101,7 @@ public:
void setFloaterOpen(BOOL open); /*Flawfinder: ignore*/
BOOL getFloaterOpen();
- LLFloaterIM * getFloater() { return mTalkFloater; }
-
- // close any sessions which are not available in the newimpanel.
- void pruneSessions();
+ 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
@@ -111,9 +122,13 @@ public:
// is no matching panel.
LLFloaterIMPanel* findFloaterBySession(const LLUUID& session_id);
- void onDropRequestReplyReceived(const LLUUID& session_id);
+ static LLUUID computeSessionID(EInstantMessage dialog, const LLUUID& other_participant_id);
+ void clearPendingVoiceInviation(const LLUUID& session_id);
+
private:
+ class LLIMSessionInvite;
+
// 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
@@ -139,9 +154,8 @@ private:
void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
-public:
- LLFloaterIM* mTalkFloater;
- LLFloaterNewIM* mNewIMFloater;
+ static void inviteUserResponse(S32 option, void* user_data);
+ static void onInviteNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* userdata);
private:
std::set<LLViewHandle> mFloaters;
@@ -150,7 +164,7 @@ private:
// An IM has been received that you haven't seen yet.
BOOL mIMReceived;
- LLSD mSessionsDropRequested;
+ LLSD mPendingVoiceInvitations;
};
@@ -158,13 +172,10 @@ class LLFloaterIM : public LLMultiFloater
{
public:
LLFloaterIM();
- ///*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
/*virtual*/ BOOL postBuild();
- /*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainerCommon::END);
};
// Globals
-extern LLIMView *gIMView;
+extern LLIMMgr *gIMMgr;
#endif // LL_LLIMView_H