#include <llimview.h>
Inheritance diagram for LLIMMgr:
Public Member Functions | |
LLIMMgr () | |
virtual | ~LLIMMgr () |
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 ®ion_id=LLUUID::null, const LLVector3 &position=LLVector3::zero) |
void | addSystemMessage (const LLUUID &session_id, const LLString &message_name, const LLString::format_map_t &args) |
BOOL | isIMSessionOpen (const LLUUID &uuid) |
LLUUID | addSession (const std::string &name, EInstantMessage dialog, const LLUUID &other_participant_id) |
LLUUID | addSession (const std::string &name, EInstantMessage dialog, const LLUUID &other_participant_id, const LLDynamicArray< LLUUID > &ids) |
LLUUID | addP2PSession (const std::string &name, const LLUUID &other_participant_id, const LLString &voice_session_handle) |
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) |
void | updateFloaterSessionID (const LLUUID &old_session_id, const LLUUID &new_session_id) |
void | processIMTypingStart (const LLIMInfo *im_info) |
void | processIMTypingStop (const LLIMInfo *im_info) |
void | refresh () |
void | notifyNewIM () |
void | clearNewIMNotification () |
BOOL | getIMReceived () const |
void | setFloaterOpen (BOOL open) |
BOOL | getFloaterOpen () |
LLFloaterChatterBox * | getFloater () |
void | disconnectAllSessions () |
BOOL | hasSession (const LLUUID &session_id) |
LLFloaterIMPanel * | findFloaterBySession (const LLUUID &session_id) |
void | clearPendingVoiceInviation (const LLUUID &session_id) |
LLSD | getPendingAgentListUpdates (const LLUUID &session_id) |
void | addPendingAgentListUpdates (const LLUUID &sessioN_id, const LLSD &updates) |
void | clearPendingAgentListUpdates (const LLUUID &session_id) |
Static Public Member Functions | |
static void | toggle (void *) |
static EInstantMessage | defaultIMTypeForAgent (const LLUUID &agent_id) |
static LLUUID | computeSessionID (EInstantMessage dialog, const LLUUID &other_participant_id) |
Private Member Functions | |
LLFloaterIMPanel * | createFloater (const LLUUID &session_id, const LLUUID &target_id, const std::string &name, EInstantMessage dialog, BOOL user_initiated=FALSE) |
LLFloaterIMPanel * | createFloater (const LLUUID &session_id, const LLUUID &target_id, const std::string &name, const LLDynamicArray< LLUUID > &ids, EInstantMessage dialog, BOOL user_initiated=FALSE) |
void | noteOfflineUsers (LLFloaterIMPanel *panel, const LLDynamicArray< LLUUID > &ids) |
void | processIMTypingCore (const LLIMInfo *im_info, BOOL typing) |
Static Private Member Functions | |
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 Attributes | |
std::set< LLViewHandle > | mFloaters |
LLFriendObserver * | mFriendObserver |
BOOL | mIMReceived |
LLSD | mPendingVoiceInvitations |
LLSD | mPendingAgentListUpdates |
Classes | |
class | LLIMSessionInvite |
Definition at line 45 of file llimview.h.
LLIMMgr::LLIMMgr | ( | ) |
Definition at line 300 of file llimview.cpp.
References LLAvatarTracker::addObserver(), LLSD::emptyMap(), LLAvatarTracker::instance(), mFriendObserver, mPendingAgentListUpdates, and mPendingVoiceInvitations.
LLIMMgr::~LLIMMgr | ( | ) | [virtual] |
Definition at line 316 of file llimview.cpp.
References LLAvatarTracker::instance(), mFriendObserver, and LLAvatarTracker::removeObserver().
void LLIMMgr::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 | |||
) |
Definition at line 324 of file llimview.cpp.
References LLFloaterIMPanel::addHistoryLine(), computeSessionID(), createFloater(), FALSE, findFloaterBySession(), LLMute::flagTextChat, gAgent, LLMultiFloater::getActiveFloater(), LLControlGroup::getColor4(), LLAgent::getID(), getIMReceived(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), LLView::getVisible(), gMuteListp, gSavedSettings, LLAgent::isGodlike(), LLMuteList::isLinden(), LLMuteList::isMuted(), LLUUID::isNull(), llendl, llinfos, make_ui_sound(), notifyNewIM(), LLUUID::null, LLMultiFloater::selectFloater(), LLMultiFloater::setFloaterFlashing(), and TRUE.
Referenced by addSystemMessage(), LLVoiceChannelGroup::handleError(), LLViewerChatterBoxInvitation::post(), and process_improved_im().
LLUUID LLIMMgr::addP2PSession | ( | const std::string & | name, | |
const LLUUID & | other_participant_id, | |||
const LLString & | voice_session_handle | |||
) |
Definition at line 504 of file llimview.cpp.
References addSession(), findFloaterBySession(), LLFloaterIMPanel::getVoiceChannel(), IM_NOTHING_SPECIAL, and LLVoiceChannelP2P::setSessionHandle().
Referenced by inviteUserResponse().
Definition at line 955 of file llimview.cpp.
References LLUUID::asString(), LLSD::beginMap(), LLSD::endMap(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxSessionAgentListUpdates::post().
LLUUID LLIMMgr::addSession | ( | const std::string & | name, | |
EInstantMessage | dialog, | |||
const LLUUID & | other_participant_id, | |||
const LLDynamicArray< LLUUID > & | ids | |||
) |
Definition at line 557 of file llimview.cpp.
References computeSessionID(), createFloater(), findFloaterBySession(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), LLDynamicArray< Type, BlockSize >::getLength(), LLFloaterIMPanel::getSessionID(), noteOfflineUsers(), LLUUID::null, LLFloaterIMPanel::setInputFocus(), LLMultiFloater::showFloater(), and TRUE.
LLUUID LLIMMgr::addSession | ( | const std::string & | name, | |
EInstantMessage | dialog, | |||
const LLUUID & | other_participant_id | |||
) |
Definition at line 524 of file llimview.cpp.
References computeSessionID(), createFloater(), findFloaterBySession(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), LLFloaterIMPanel::getSessionID(), noteOfflineUsers(), LLFloater::open(), LLDynamicArray< Type, BlockSize >::put(), LLFloaterIMPanel::setInputFocus(), LLMultiFloater::showFloater(), and TRUE.
Referenced by addP2PSession(), LLAvatarSendIM::handleEvent(), LLBeginIMSession::handleEvent(), inviteUserResponse(), LLPanelAvatar::onClickIM(), LLPanelFriends::onClickIM(), LLFloaterAvatarList::onClickIM(), LLFloaterNewIM::onStart(), LLCallingCardBridge::performAction(), and LLPanelGroups::startIM().
void LLIMMgr::addSystemMessage | ( | const LLUUID & | session_id, | |
const LLString & | message_name, | |||
const LLString::format_map_t & | args | |||
) |
Definition at line 448 of file llimview.cpp.
References LLFloaterChat::addChatHistory(), addMessage(), CHAT_SOURCE_SYSTEM, findFloaterBySession(), LLUIInstanceMgr< LLFloaterChat, LLFloaterChat >::getInstance(), LLUIString::getString(), LLPanel::getUIString(), gIMMgr, LLUUID::isNull(), LLChat::mSourceType, LLUUID::null, LLUIString::setArgList(), and SYSTEM_FROM.
Referenced by LLVoiceChannelGroup::setState(), and LLVoiceChannel::setState().
void LLIMMgr::clearNewIMNotification | ( | ) |
Definition at line 485 of file llimview.cpp.
References FALSE, and mIMReceived.
Referenced by LLFloaterChatterBox::draw().
Definition at line 971 of file llimview.cpp.
References LLUUID::asString(), LLSD::erase(), LLSD::has(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxSessionStartReply::post(), and LLViewerChatterBoxInvitationAcceptResponder::result().
Definition at line 935 of file llimview.cpp.
References LLUUID::asString(), LLSD::erase(), LLSD::has(), and mPendingVoiceInvitations.
Referenced by LLViewerChatterBoxInvitationAcceptResponder::error(), inviteUserResponse(), and LLViewerChatterBoxInvitationAcceptResponder::result().
LLUUID LLIMMgr::computeSessionID | ( | EInstantMessage | dialog, | |
const LLUUID & | other_participant_id | |||
) | [static] |
Definition at line 107 of file llimview.cpp.
References gAgent, LLUUID::generate(), LLAgent::getID(), IM_SESSION_CONFERENCE_START, IM_SESSION_GROUP_START, and IM_SESSION_INVITE.
Referenced by addMessage(), addSession(), processIMTypingCore(), and LLVoiceClient::sessionNewEvent().
LLFloaterIMPanel * LLIMMgr::createFloater | ( | const LLUUID & | session_id, | |
const LLUUID & | target_id, | |||
const std::string & | name, | |||
const LLDynamicArray< LLUUID > & | ids, | |||
EInstantMessage | dialog, | |||
BOOL | user_initiated = FALSE | |||
) | [private] |
Definition at line 1009 of file llimview.cpp.
References LLFloaterChatterBox::addFloater(), LLTabContainerCommon::END, FALSE, LLPanel::getHandle(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), LLUUID::isNull(), llendl, llinfos, llwarns, mFloaters, and LLTabContainerCommon::RIGHT_OF_CURRENT.
LLFloaterIMPanel * LLIMMgr::createFloater | ( | const LLUUID & | session_id, | |
const LLUUID & | target_id, | |||
const std::string & | name, | |||
EInstantMessage | dialog, | |||
BOOL | user_initiated = FALSE | |||
) | [private] |
Definition at line 983 of file llimview.cpp.
References LLFloaterChatterBox::addFloater(), LLTabContainerCommon::END, FALSE, LLPanel::getHandle(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), LLUUID::isNull(), llendl, llinfos, llwarns, mFloaters, and LLTabContainerCommon::RIGHT_OF_CURRENT.
Referenced by addMessage(), and addSession().
EInstantMessage LLIMMgr::defaultIMTypeForAgent | ( | const LLUUID & | agent_id | ) | [static] |
Definition at line 235 of file llimview.cpp.
References IM_NOTHING_SPECIAL, IM_SESSION_CONFERENCE_START, LLAvatarTracker::instance(), is_agent_friend(), and type.
Referenced by LLFloaterNewIM::onStart().
void LLIMMgr::disconnectAllSessions | ( | ) |
Definition at line 886 of file llimview.cpp.
References LLFloater::close(), FALSE, LLFloater::getFloaterByHandle(), mFloaters, NULL, LLView::setEnabled(), and TRUE.
Referenced by idle_shutdown().
LLFloaterIMPanel * LLIMMgr::findFloaterBySession | ( | const LLUUID & | session_id | ) |
Definition at line 911 of file llimview.cpp.
References LLFloater::getFloaterByHandle(), LLFloaterIMPanel::getSessionID(), mFloaters, and NULL.
Referenced by addMessage(), addP2PSession(), addSession(), addSystemMessage(), hasSession(), inviteUserResponse(), isIMSessionOpen(), LLViewerChatterBoxSessionAgentListUpdates::post(), LLViewerForceCloseChatterBoxSession::post(), LLViewerChatterBoxSessionEventReply::post(), LLViewerChatterBoxSessionStartReply::post(), processIMTypingCore(), removeSession(), LLViewerChatterBoxInvitationAcceptResponder::result(), and updateFloaterSessionID().
LLFloaterChatterBox * LLIMMgr::getFloater | ( | ) |
Definition at line 1097 of file llimview.cpp.
References LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance().
BOOL LLIMMgr::getFloaterOpen | ( | ) |
Definition at line 881 of file llimview.cpp.
References LLFloaterChatterBox::instanceVisible().
Referenced by notifyNewIM(), and toggle().
BOOL LLIMMgr::getIMReceived | ( | ) | const |
Definition at line 490 of file llimview.cpp.
References mIMReceived.
Referenced by addMessage(), and LLOverlayBar::refresh().
Definition at line 943 of file llimview.cpp.
References LLUUID::asString(), LLSD::has(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxSessionStartReply::post(), and LLViewerChatterBoxInvitationAcceptResponder::result().
Definition at line 930 of file llimview.cpp.
References findFloaterBySession(), and NULL.
Referenced by process_improved_im().
void LLIMMgr::inviteToSession | ( | const LLUUID & | session_id, | |
const LLString & | session_name, | |||
const LLUUID & | caller, | |||
const LLString & | caller_name, | |||
EInstantMessage | type, | |||
const LLString & | session_handle = LLString::null | |||
) |
Definition at line 605 of file llimview.cpp.
References LLUUID::asString(), LLVoiceChannel::callStarted(), FALSE, gAgent, gCacheName, LLControlGroup::getBOOL(), LLVoiceChannel::getChannelByID(), LLCacheName::getName(), gMuteListp, gSavedSettings, LLSD::has(), IM_SESSION_P2P_INVITE, LLAvatarTracker::instance(), inviteUserResponse(), LLAgent::isInGroup(), LLMuteList::isMuted(), mPendingVoiceInvitations, NULL, onInviteNameLookup(), LLNotifyBox::showXml(), and TRUE.
Referenced by LLViewerChatterBoxInvitation::post(), and LLVoiceClient::sessionNewEvent().
Definition at line 786 of file llimview.cpp.
References LLMuteList::add(), addP2PSession(), addSession(), LLMute::AGENT, clearPendingVoiceInviation(), findFloaterBySession(), gAgent, LLViewerRegion::getCapability(), LLAgent::getRegion(), gIMMgr, gMuteListp, gVoiceClient, IM_SESSION_P2P_INVITE, LLMuteList::isMuted(), LLIMMgr::LLIMSessionInvite::mCallerID, LLIMMgr::LLIMSessionInvite::mCallerName, LLIMMgr::LLIMSessionInvite::mSessionHandle, LLIMMgr::LLIMSessionInvite::mSessionID, LLIMMgr::LLIMSessionInvite::mSessionName, LLIMMgr::LLIMSessionInvite::mType, LLFloaterIMPanel::onClickStartCall(), LLHTTPClient::post(), LLFloaterIMPanel::requestAutoConnect(), LLFloaterChatterBox::showInstance(), and TRUE.
Referenced by inviteToSession(), and onInviteNameLookup().
void LLIMMgr::noteOfflineUsers | ( | LLFloaterIMPanel * | panel, | |
const LLDynamicArray< LLUUID > & | ids | |||
) | [private] |
Definition at line 1037 of file llimview.cpp.
References LLFloaterIMPanel::addHistoryLine(), LLDynamicArray< Type, BlockSize >::count(), count, DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, first, gCacheName, LLDynamicArray< Type, BlockSize >::get(), LLAvatarTracker::getBuddyInfo(), LLControlGroup::getColor4(), LLCacheName::getName(), gSavedSettings, i, LLAvatarTracker::instance(), LLRelationship::isOnline(), NULL, S32, LLUIString::setArg(), sOfflineMessage, and sOnlyUserMessage.
Referenced by addSession().
void LLIMMgr::notifyNewIM | ( | ) |
Definition at line 477 of file llimview.cpp.
References getFloaterOpen(), gIMMgr, mIMReceived, and TRUE.
Referenced by addMessage().
void LLIMMgr::onInviteNameLookup | ( | const LLUUID & | id, | |
const char * | first, | |||
const char * | last, | |||
BOOL | is_group, | |||
void * | userdata | |||
) | [static, private] |
Definition at line 692 of file llimview.cpp.
References inviteUserResponse(), llformat(), LLIMMgr::LLIMSessionInvite::mCallerName, LLIMMgr::LLIMSessionInvite::mNotifyBox, LLIMMgr::LLIMSessionInvite::mSessionName, and LLNotifyBox::showXml().
Referenced by inviteToSession().
Definition at line 1076 of file llimview.cpp.
References computeSessionID(), findFloaterBySession(), LLIMInfo::mFromID, LLIMInfo::mIMType, and LLFloaterIMPanel::processIMTyping().
Referenced by processIMTypingStart(), and processIMTypingStop().
Definition at line 1066 of file llimview.cpp.
References processIMTypingCore(), and TRUE.
Referenced by process_improved_im().
Definition at line 1071 of file llimview.cpp.
References FALSE, and processIMTypingCore().
Referenced by process_improved_im().
void LLIMMgr::refresh | ( | ) |
Definition at line 864 of file llimview.cpp.
Referenced by LLIMViewFriendObserver::changed(), set_god_level(), and update_group_floaters().
Definition at line 594 of file llimview.cpp.
References findFloaterBySession(), LLPanel::getHandle(), LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::getInstance(), mFloaters, and LLFloaterChatterBox::removeFloater().
Referenced by LLFloaterIMPanel::onClose().
Definition at line 868 of file llimview.cpp.
References LLUIInstanceMgr< LLFloaterChatterBox, LLFloaterChatterBox >::hideInstance(), and LLFloaterChatterBox::showInstance().
Referenced by LLAgent::endAnimationUpdateUI(), LLAvatarSendIM::handleEvent(), LLBeginIMSession::handleEvent(), LLFloaterNewIM::onClickClose(), LLPanelAvatar::onClickIM(), LLPanelFriends::onClickIM(), LLFloaterAvatarList::onClickIM(), LLOverlayBar::onClickIMReceived(), LLCallingCardBridge::performAction(), LLPanelGroups::startIM(), and toggle().
Definition at line 256 of file llimview.cpp.
References LLAgent::cameraMouselook(), LLAgent::cameraThirdPerson(), LLAgent::changeCameraToDefault(), LLAgent::changeCameraToMouselook(), FALSE, gAgent, getFloaterOpen(), gIMMgr, llassert, setFloaterOpen(), and TRUE.
Referenced by LLFloaterIMPanel::handleKeyHere(), and LLFloaterNewIM::handleKeyHere().
void LLIMMgr::updateFloaterSessionID | ( | const LLUUID & | old_session_id, | |
const LLUUID & | new_session_id | |||
) |
Definition at line 1086 of file llimview.cpp.
References findFloaterBySession(), and LLFloaterIMPanel::sessionInitReplyReceived().
Referenced by LLViewerChatterBoxSessionStartReply::post().
std::set<LLViewHandle> LLIMMgr::mFloaters [private] |
Definition at line 190 of file llimview.h.
Referenced by createFloater(), disconnectAllSessions(), findFloaterBySession(), and removeSession().
LLFriendObserver* LLIMMgr::mFriendObserver [private] |
BOOL LLIMMgr::mIMReceived [private] |
Definition at line 194 of file llimview.h.
Referenced by clearNewIMNotification(), getIMReceived(), and notifyNewIM().
LLSD LLIMMgr::mPendingAgentListUpdates [private] |
Definition at line 197 of file llimview.h.
Referenced by addPendingAgentListUpdates(), clearPendingAgentListUpdates(), getPendingAgentListUpdates(), and LLIMMgr().
LLSD LLIMMgr::mPendingVoiceInvitations [private] |
Definition at line 196 of file llimview.h.
Referenced by clearPendingVoiceInviation(), inviteToSession(), and LLIMMgr().