#include <llimview.h>
Public Types | |
enum | EInvitationType { INVITATION_TYPE_INSTANT_MESSAGE = 0, INVITATION_TYPE_VOICE = 1, INVITATION_TYPE_IMMEDIATE = 2 } |
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, bool link_name=false) |
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, EInvitationType inv_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 | clearPendingInviation (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) |
const std::set< LLHandle < LLFloater > > & | getIMFloaterHandles () |
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 | noteMutedUsers (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< LLHandle< LLFloater > > | mFloaters |
LLFriendObserver * | mFriendObserver |
BOOL | mIMReceived |
LLSD | mPendingInvitations |
LLSD | mPendingAgentListUpdates |
Classes | |
class | LLIMSessionInvite |
Definition at line 45 of file llimview.h.
Definition at line 48 of file llimview.h.
LLIMMgr::LLIMMgr | ( | ) |
Definition at line 372 of file llimview.cpp.
References LLAvatarTracker::addObserver(), LLSD::emptyMap(), LLAvatarTracker::instance(), mFriendObserver, mPendingAgentListUpdates, and mPendingInvitations.
LLIMMgr::~LLIMMgr | ( | ) | [virtual] |
Definition at line 388 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 , |
|||
bool | link_name = false | |||
) |
Definition at line 396 of file llimview.cpp.
References LLFloaterIMPanel::addHistoryLine(), computeSessionID(), createFloater(), FALSE, findFloaterBySession(), LLMute::flagTextChat, gAgent, LLMultiFloater::getActiveFloater(), LLControlGroup::getColor(), LLControlGroup::getColor4(), LLAgent::getID(), getIMReceived(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::getInstance(), LLMuteList::getInstance(), LLView::getVisible(), gSavedSettings, LLAgent::isGodlike(), LLUUID::isNull(), llendl, llinfos, make_ui_sound(), notifyNewIM(), LLUUID::null, LLMultiFloater::selectFloater(), LLMultiFloater::setFloaterFlashing(), SYSTEM_FROM, and TRUE.
Referenced by addSystemMessage(), LLVoiceChannelGroup::handleError(), LLViewerChatterBoxInvitation::post(), and process_improved_im().
void LLIMMgr::addSystemMessage | ( | const LLUUID & | session_id, | |
const LLString & | message_name, | |||
const LLString::format_map_t & | args | |||
) |
Definition at line 521 of file llimview.cpp.
References LLFloaterChat::addChatHistory(), addMessage(), CHAT_SOURCE_SYSTEM, findFloaterBySession(), LLUIFactory< LLFloaterChat, LLUISingleton< LLFloaterChat, LLFloaterChat >, LLFloaterChat >::getInstance(), LLUIString::getString(), LLPanel::getUIString(), LLUUID::isNull(), LLChat::mSourceType, LLUUID::null, LLUIString::setArgList(), and SYSTEM_FROM.
Referenced by LLVoiceChannelProximal::handleStatusChange(), LLVoiceChannelP2P::setState(), LLVoiceChannelGroup::setState(), and LLVoiceChannel::setState().
Definition at line 570 of file llimview.cpp.
References FALSE, findFloaterBySession(), and TRUE.
LLUUID LLIMMgr::addSession | ( | const std::string & | name, | |
EInstantMessage | dialog, | |||
const LLUUID & | other_participant_id | |||
) |
Definition at line 597 of file llimview.cpp.
References computeSessionID(), createFloater(), findFloaterBySession(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::getInstance(), LLFloaterIMPanel::getSessionID(), noteMutedUsers(), noteOfflineUsers(), LLFloater::open(), LLDynamicArray< Type, BlockSize >::put(), LLFloaterIMPanel::setInputFocus(), LLMultiFloater::showFloater(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::showInstance(), and TRUE.
Referenced by addP2PSession(), LLAvatarSendIM::handleEvent(), LLBeginIMSession::handleEvent(), inviteUserResponse(), LLPanelAvatar::onClickIM(), LLPanelFriends::onClickIM(), LLPanelActiveSpeakers::onDoubleClickSpeaker(), LLFloaterNewIM::onStart(), LLCallingCardBridge::performAction(), and LLPanelGroups::startIM().
LLUUID LLIMMgr::addSession | ( | const std::string & | name, | |
EInstantMessage | dialog, | |||
const LLUUID & | other_participant_id, | |||
const LLDynamicArray< LLUUID > & | ids | |||
) |
Definition at line 634 of file llimview.cpp.
References computeSessionID(), createFloater(), findFloaterBySession(), LLDynamicArray< Type, BlockSize >::getLength(), LLFloaterIMPanel::getSessionID(), noteMutedUsers(), noteOfflineUsers(), LLUUID::null, LLFloater::open(), LLFloaterIMPanel::setInputFocus(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::showInstance(), and TRUE.
LLUUID LLIMMgr::addP2PSession | ( | const std::string & | name, | |
const LLUUID & | other_participant_id, | |||
const LLString & | voice_session_handle | |||
) |
Definition at line 577 of file llimview.cpp.
References addSession(), findFloaterBySession(), LLFloaterIMPanel::getVoiceChannel(), IM_NOTHING_SPECIAL, and LLVoiceChannelP2P::setSessionHandle().
Referenced by inviteUserResponse().
void LLIMMgr::removeSession | ( | const LLUUID & | session_id | ) |
Definition at line 679 of file llimview.cpp.
References clearPendingAgentListUpdates(), clearPendingInviation(), findFloaterBySession(), LLFloater::getHandle(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::getInstance(), mFloaters, and LLFloaterChatterBox::removeFloater().
Referenced by LLFloaterIMPanel::onClose().
void LLIMMgr::inviteToSession | ( | const LLUUID & | session_id, | |
const LLString & | session_name, | |||
const LLUUID & | caller, | |||
const LLString & | caller_name, | |||
EInstantMessage | type, | |||
EInvitationType | inv_type, | |||
const LLString & | session_handle = LLString::null | |||
) |
Definition at line 693 of file llimview.cpp.
References LLUUID::asString(), LLVoiceChannel::callStarted(), FALSE, gAgent, gCacheName, LLControlGroup::getBOOL(), LLVoiceChannel::getChannelByID(), LLMuteList::getInstance(), LLCacheName::getName(), gSavedSettings, LLSD::has(), IM_SESSION_P2P_INVITE, LLAvatarTracker::instance(), INVITATION_TYPE_IMMEDIATE, INVITATION_TYPE_VOICE, inviteUserResponse(), LLAgent::isInGroup(), mPendingInvitations, NULL, onInviteNameLookup(), LLNotifyBox::showXml(), and TRUE.
Referenced by LLViewerChatterBoxInvitation::post(), and LLVoiceClient::sessionNewEvent().
void LLIMMgr::updateFloaterSessionID | ( | const LLUUID & | old_session_id, | |
const LLUUID & | new_session_id | |||
) |
Definition at line 1285 of file llimview.cpp.
References findFloaterBySession(), and LLFloaterIMPanel::sessionInitReplyReceived().
Referenced by LLViewerChatterBoxSessionStartReply::post().
void LLIMMgr::processIMTypingStart | ( | const LLIMInfo * | im_info | ) |
Definition at line 1265 of file llimview.cpp.
References processIMTypingCore(), and TRUE.
Referenced by process_improved_im().
void LLIMMgr::processIMTypingStop | ( | const LLIMInfo * | im_info | ) |
Definition at line 1270 of file llimview.cpp.
References FALSE, and processIMTypingCore().
Referenced by process_improved_im().
void LLIMMgr::refresh | ( | ) |
Definition at line 998 of file llimview.cpp.
Referenced by set_god_level(), and update_group_floaters().
void LLIMMgr::notifyNewIM | ( | ) |
Definition at line 550 of file llimview.cpp.
References getFloaterOpen(), mIMReceived, and TRUE.
Referenced by addMessage().
void LLIMMgr::clearNewIMNotification | ( | ) |
Definition at line 558 of file llimview.cpp.
References FALSE, and mIMReceived.
Referenced by LLFloaterChatterBox::draw().
BOOL LLIMMgr::getIMReceived | ( | ) | const |
Definition at line 563 of file llimview.cpp.
References mIMReceived.
Referenced by addMessage(), and LLOverlayBar::refresh().
void LLIMMgr::setFloaterOpen | ( | BOOL | open | ) |
Definition at line 1002 of file llimview.cpp.
References LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::hideInstance(), and LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::showInstance().
Referenced by LLAgent::endAnimationUpdateUI(), LLAvatarSendIM::handleEvent(), LLBeginIMSession::handleEvent(), LLFloaterNewIM::onClickClose(), LLPanelAvatar::onClickIM(), LLPanelFriends::onClickIM(), LLOverlayBar::onClickIMReceived(), LLCallingCardBridge::performAction(), LLPanelGroups::startIM(), and toggle().
BOOL LLIMMgr::getFloaterOpen | ( | ) |
Definition at line 1015 of file llimview.cpp.
Referenced by notifyNewIM(), and toggle().
LLFloaterChatterBox * LLIMMgr::getFloater | ( | ) |
void LLIMMgr::disconnectAllSessions | ( | ) |
Definition at line 1020 of file llimview.cpp.
References LLFloater::close(), FALSE, mFloaters, NULL, LLView::setEnabled(), and TRUE.
Referenced by LLAppViewer::idleShutdown().
void LLIMMgr::toggle | ( | void * | ) | [static] |
Definition at line 328 of file llimview.cpp.
References LLAgent::cameraMouselook(), LLAgent::cameraThirdPerson(), LLAgent::changeCameraToDefault(), LLAgent::changeCameraToMouselook(), FALSE, gAgent, getFloaterOpen(), llassert, setFloaterOpen(), and TRUE.
Referenced by LLFloaterIMPanel::handleKeyHere(), and LLFloaterNewIM::handleKeyHere().
EInstantMessage LLIMMgr::defaultIMTypeForAgent | ( | const LLUUID & | agent_id | ) | [static] |
Definition at line 307 of file llimview.cpp.
References IM_NOTHING_SPECIAL, IM_SESSION_CONFERENCE_START, LLAvatarTracker::instance(), and is_agent_friend().
Referenced by LLFloaterNewIM::onStart().
Definition at line 1064 of file llimview.cpp.
References findFloaterBySession(), and NULL.
Referenced by process_improved_im().
LLFloaterIMPanel * LLIMMgr::findFloaterBySession | ( | const LLUUID & | session_id | ) |
Definition at line 1045 of file llimview.cpp.
References LLFloaterIMPanel::getSessionID(), mFloaters, and NULL.
Referenced by addMessage(), addP2PSession(), addSession(), addSystemMessage(), LLViewerChatterBoxInvitationAcceptResponder::error(), LLFloaterChatterBox::getFloater(), hasSession(), inviteUserResponse(), isIMSessionOpen(), notify_automute_callback(), LLFloaterIMPanel::onConfirmForceCloseError(), LLPanelActiveSpeakers::onModeratorMuteText(), LLPanelActiveSpeakers::onModeratorMuteVoice(), LLViewerChatterBoxSessionUpdate::post(), LLViewerChatterBoxSessionAgentListUpdates::post(), LLViewerForceCloseChatterBoxSession::post(), LLViewerChatterBoxSessionEventReply::post(), LLViewerChatterBoxSessionStartReply::post(), processIMTypingCore(), LLAvatarTracker::processNotify(), removeSession(), LLViewerChatterBoxInvitationAcceptResponder::result(), and updateFloaterSessionID().
LLUUID LLIMMgr::computeSessionID | ( | EInstantMessage | dialog, | |
const LLUUID & | other_participant_id | |||
) | [static] |
Definition at line 108 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(), LLAvatarTracker::processNotify(), and LLVoiceClient::sessionNewEvent().
void LLIMMgr::clearPendingInviation | ( | const LLUUID & | session_id | ) |
Definition at line 1069 of file llimview.cpp.
References LLUUID::asString(), LLSD::erase(), LLSD::has(), and mPendingInvitations.
Referenced by LLViewerChatterBoxInvitationAcceptResponder::error(), inviteUserResponse(), removeSession(), and LLViewerChatterBoxInvitationAcceptResponder::result().
Definition at line 1077 of file llimview.cpp.
References LLUUID::asString(), LLSD::has(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxSessionStartReply::post(), and LLViewerChatterBoxInvitationAcceptResponder::result().
Definition at line 1089 of file llimview.cpp.
References LLSD::append(), LLUUID::asString(), LLSD::beginArray(), LLSD::beginMap(), LLSD::emptyArray(), LLSD::emptyMap(), LLSD::endArray(), LLSD::endMap(), LLSD::has(), LLSD::isMap(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxSessionAgentListUpdates::post().
void LLIMMgr::clearPendingAgentListUpdates | ( | const LLUUID & | session_id | ) |
Definition at line 1149 of file llimview.cpp.
References LLUUID::asString(), LLSD::erase(), LLSD::has(), and mPendingAgentListUpdates.
Referenced by LLViewerChatterBoxInvitationAcceptResponder::error(), inviteUserResponse(), LLViewerChatterBoxSessionStartReply::post(), removeSession(), and LLViewerChatterBoxInvitationAcceptResponder::result().
Definition at line 169 of file llimview.h.
References mFloaters.
Referenced by LLToolBar::onClickCommunicate(), and LLToolBar::updateCommunicateList().
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 1161 of file llimview.cpp.
References LLFloaterChatterBox::addFloater(), LLTabContainer::END, FALSE, LLFloater::getHandle(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::getInstance(), LLUUID::isNull(), llendl, llinfos, llwarns, mFloaters, and LLTabContainer::RIGHT_OF_CURRENT.
Referenced by addMessage(), and addSession().
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 1185 of file llimview.cpp.
References LLFloaterChatterBox::addFloater(), LLTabContainer::END, FALSE, LLFloater::getHandle(), LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::getInstance(), LLUUID::isNull(), llendl, llinfos, llwarns, mFloaters, and LLTabContainer::RIGHT_OF_CURRENT.
void LLIMMgr::noteOfflineUsers | ( | LLFloaterIMPanel * | panel, | |
const LLDynamicArray< LLUUID > & | ids | |||
) | [private] |
Definition at line 1211 of file llimview.cpp.
References LLFloaterIMPanel::addHistoryLine(), LLDynamicArray< Type, BlockSize >::count(), gCacheName, LLDynamicArray< Type, BlockSize >::get(), LLAvatarTracker::getBuddyInfo(), LLControlGroup::getColor4(), LLCacheName::getName(), gSavedSettings, i, LLAvatarTracker::instance(), LLRelationship::isOnline(), NULL, S32, and LLUIString::setArg().
Referenced by addSession().
void LLIMMgr::noteMutedUsers | ( | LLFloaterIMPanel * | panel, | |
const LLDynamicArray< LLUUID > & | ids | |||
) | [private] |
Definition at line 1240 of file llimview.cpp.
References LLFloaterIMPanel::addHistoryLine(), LLDynamicArray< Type, BlockSize >::count(), DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, gCacheName, LLDynamicArray< Type, BlockSize >::get(), LLAvatarTracker::getBuddyInfo(), LLMuteList::getInstance(), LLCacheName::getName(), i, LLAvatarTracker::instance(), LLMuteList::isMuted(), NULL, S32, and LLUIString::setArg().
Referenced by addSession().
Definition at line 1275 of file llimview.cpp.
References computeSessionID(), findFloaterBySession(), LLIMInfo::mFromID, LLIMInfo::mIMType, and LLFloaterIMPanel::processIMTyping().
Referenced by processIMTypingStart(), and processIMTypingStop().
void LLIMMgr::inviteUserResponse | ( | S32 | option, | |
void * | user_data | |||
) | [static, private] |
Definition at line 903 of file llimview.cpp.
References LLMuteList::add(), addP2PSession(), addSession(), LLMute::AGENT, clearPendingAgentListUpdates(), clearPendingInviation(), LLVoiceClient::declineInvite(), findFloaterBySession(), gAgent, LLViewerRegion::getCapability(), LLMuteList::getInstance(), LLAgent::getRegion(), gVoiceClient, IM_SESSION_P2P_INVITE, LLIMMgr::LLIMSessionInvite::mCallerID, LLIMMgr::LLIMSessionInvite::mCallerName, LLIMMgr::LLIMSessionInvite::mInvType, LLIMMgr::LLIMSessionInvite::mSessionHandle, LLIMMgr::LLIMSessionInvite::mSessionID, LLIMMgr::LLIMSessionInvite::mSessionName, LLIMMgr::LLIMSessionInvite::mType, NULL, LLFloaterIMPanel::onClickStartCall(), LLHTTPClient::post(), LLFloaterIMPanel::requestAutoConnect(), and LLUIFactory< LLFloaterChatterBox, LLUISingleton< LLFloaterChatterBox, LLFloaterChatterBox >, LLFloaterChatterBox >::showInstance().
Referenced by inviteToSession(), and onInviteNameLookup().
void LLIMMgr::onInviteNameLookup | ( | const LLUUID & | id, | |
const char * | first, | |||
const char * | last, | |||
BOOL | is_group, | |||
void * | userdata | |||
) | [static, private] |
Definition at line 795 of file llimview.cpp.
References inviteUserResponse(), llformat(), LLIMMgr::LLIMSessionInvite::mCallerName, LLIMMgr::LLIMSessionInvite::mNotifyBox, LLIMMgr::LLIMSessionInvite::mSessionName, and LLNotifyBox::showXml().
Referenced by inviteToSession().
std::set<LLHandle<LLFloater> > LLIMMgr::mFloaters [private] |
Definition at line 204 of file llimview.h.
Referenced by createFloater(), disconnectAllSessions(), findFloaterBySession(), getIMFloaterHandles(), and removeSession().
LLFriendObserver* LLIMMgr::mFriendObserver [private] |
BOOL LLIMMgr::mIMReceived [private] |
Definition at line 208 of file llimview.h.
Referenced by clearNewIMNotification(), getIMReceived(), and notifyNewIM().
LLSD LLIMMgr::mPendingInvitations [private] |
Definition at line 210 of file llimview.h.
Referenced by clearPendingInviation(), inviteToSession(), and LLIMMgr().
LLSD LLIMMgr::mPendingAgentListUpdates [private] |
Definition at line 211 of file llimview.h.
Referenced by addPendingAgentListUpdates(), clearPendingAgentListUpdates(), getPendingAgentListUpdates(), and LLIMMgr().