From 117e22047c5752352342d64e3fb7ce00a4eb8113 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:04 -0500 Subject: Second Life viewer sources 1.18.1.2 --- linden/indra/newview/llimview.h | 57 ++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 23 deletions(-) (limited to 'linden/indra/newview/llimview.h') diff --git a/linden/indra/newview/llimview.h b/linden/indra/newview/llimview.h index c0b0f79..ca3ef5f 100644 --- a/linden/indra/newview/llimview.h +++ b/linden/indra/newview/llimview.h @@ -1,5 +1,5 @@ /** - * @file llimview.h + * @file LLIMMgr.h * @brief Container for Instant Messaging * * Copyright (c) 2001-2007, Linden Research, Inc. @@ -33,31 +33,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 { 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. @@ -82,11 +83,23 @@ public: const LLUUID& other_participant_id, const LLDynamicArray& 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. @@ -100,6 +113,7 @@ public: void refresh(); void notifyNewIM(); + void clearNewIMNotification(); // IM received that you haven't seen yet BOOL getIMReceived() const; @@ -107,10 +121,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 @@ -131,9 +142,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 @@ -159,9 +174,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 mFloaters; @@ -170,7 +184,7 @@ private: // An IM has been received that you haven't seen yet. BOOL mIMReceived; - LLSD mSessionsDropRequested; + LLSD mPendingVoiceInvitations; }; @@ -178,13 +192,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 -- cgit v1.1