#include <llmutelist.h>
Public Types | |
enum | EAutoReason { AR_IM = 0, AR_MONEY = 1, AR_INVENTORY = 2, AR_COUNT } |
Public Member Functions | |
LLMuteList () | |
~LLMuteList () | |
void | addObserver (LLMuteListObserver *observer) |
void | removeObserver (LLMuteListObserver *observer) |
BOOL | add (const LLMute &mute, U32 flags=0) |
BOOL | remove (const LLMute &mute, U32 flags=0) |
BOOL | autoRemove (const LLUUID &agent_id, const EAutoReason reason, const LLString &first_name="", const LLString &last_name="") |
BOOL | isMuted (const LLUUID &id, const LLString &name=LLString::null, U32 flags=0) const |
BOOL | isMuted (const LLUUID &id, U32 flags) const |
BOOL | isLinden (const LLString &name) const |
BOOL | isLoaded () const |
std::vector< LLMute > | getMutes () const |
void | requestFromServer (const LLUUID &agent_id) |
void | cache (const LLUUID &agent_id) |
void | setSavedResidentVolume (const LLUUID &id, F32 volume) |
F32 | getSavedResidentVolume (const LLUUID &id) |
Static Public Member Functions | |
static LLMuteList * | getInstance () |
Private Types | |
typedef std::set< LLMute, compare_by_id > | mute_set_t |
typedef std::set< LLString > | string_set_t |
typedef std::set < LLMuteListObserver * > | observer_set_t |
typedef std::map< LLUUID, F32 > | user_volume_map_t |
Private Member Functions | |
BOOL | loadFromFile (const LLString &filename) |
BOOL | saveToFile (const LLString &filename) |
void | setLoaded () |
void | notifyObservers () |
void | updateAdd (const LLMute &mute) |
void | updateRemove (const LLMute &mute) |
Static Private Member Functions | |
static void | processMuteListUpdate (LLMessageSystem *msg, void **) |
static void | processUseCachedMuteList (LLMessageSystem *msg, void **) |
static void | onFileMuteList (void **user_data, S32 code, LLExtStat ext_status) |
Private Attributes | |
mute_set_t | mMutes |
string_set_t | mLegacyMutes |
observer_set_t | mObservers |
BOOL | mIsLoaded |
Static Private Attributes | |
static user_volume_map_t | sUserVolumeSettings |
Friends | |
class | LLDispatchEmptyMuteList |
Classes | |
struct | compare_by_id |
struct | compare_by_name |
Definition at line 82 of file llmutelist.h.
typedef std::set<LLMute, compare_by_id> LLMuteList::mute_set_t [private] |
Definition at line 164 of file llmutelist.h.
typedef std::set<LLString> LLMuteList::string_set_t [private] |
Definition at line 167 of file llmutelist.h.
typedef std::set<LLMuteListObserver*> LLMuteList::observer_set_t [private] |
Definition at line 170 of file llmutelist.h.
typedef std::map<LLUUID, F32> LLMuteList::user_volume_map_t [private] |
Definition at line 177 of file llmutelist.h.
LLMuteList::LLMuteList | ( | ) |
Definition at line 184 of file llmutelist.cpp.
References LLDispatcher::addHandler(), LLSD::beginMap(), LLSD::endMap(), LLSDSerialize::fromXML(), gDirUtilp, LLDir::getExpandedFilename(), gGenericDispatcher, LL_PATH_PER_SL_ACCOUNT, llifstream, and sUserVolumeSettings.
LLMuteList::~LLMuteList | ( | ) |
Definition at line 211 of file llmutelist.cpp.
References gDirUtilp, LLDir::getExpandedFilename(), LL_PATH_PER_SL_ACCOUNT, llofstream, sUserVolumeSettings, and LLSDSerialize::toPrettyXML().
LLMuteList * LLMuteList::getInstance | ( | ) | [static] |
Reimplemented from LLSingleton< LLMuteList >.
Definition at line 167 of file llmutelist.cpp.
References _PREHASH_MuteListUpdate, _PREHASH_UseCachedMuteList, FALSE, LLSingleton< T >::getInstance(), gMessageSystem, NULL, processMuteListUpdate(), processUseCachedMuteList(), LLMessageSystem::setHandlerFuncFast(), and TRUE.
Referenced by LLIMMgr::addMessage(), callback_load_url_name(), LLFloaterMute::callbackMuteByName(), LLAppViewer::cleanup(), LLToolDragAndDrop::commitGiveInventoryCategory(), LLToolDragAndDrop::commitGiveInventoryItem(), deliver_message(), LLFloaterIMPanel::draw(), LLPipeline::generateImpostor(), LLFloaterPay::give(), LLObjectMute::handleEvent(), idle_startup(), LLVOAvatar::idleUpdate(), inventory_offer_callback(), inventory_offer_handler(), inventory_offer_mute_callback(), LLIMMgr::inviteToSession(), LLIMMgr::inviteUserResponse(), LLSpeaker::LLSpeaker(), LLIMMgr::noteMutedUsers(), LLPanelAvatar::onClickMute(), LLFloaterChat::onClickMute(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), LLFloaterMute::onClickRemove(), onFileMuteList(), LLFloaterMute::onPickUser(), LLPanelActiveSpeakers::onVolumeChange(), LLDispatchEmptyMuteList::operator()(), LLToolPie::pickAndShowMenu(), LLViewerChatterBoxInvitation::post(), LLFloaterMute::postBuild(), process_attached_sound(), process_chat_from_simulator(), process_improved_im(), process_load_url(), process_offer_callingcard(), process_preload_sound(), process_script_question(), process_sound_trigger(), LLSelectMgr::processObjectPropertiesFamily(), LLVOAvatar::processSingleAnimationStateChange(), processUseCachedMuteList(), LLFloaterMute::refreshMuteList(), LLPanelActiveSpeakers::refreshSpeakers(), request_initial_instant_messages(), script_question_cb(), LLVoiceClient::stateMachine(), LLViewerObject::unpackParticleSource(), LLVOAvatar::updateCharacter(), LLAudioSourceVO::updateGain(), and LLVoiceClient::updateMuteState().
void LLMuteList::addObserver | ( | LLMuteListObserver * | observer | ) |
Definition at line 779 of file llmutelist.cpp.
References mObservers.
Referenced by LLFloaterMute::postBuild(), and LLVoiceClient::stateMachine().
void LLMuteList::removeObserver | ( | LLMuteListObserver * | observer | ) |
Definition at line 242 of file llmutelist.cpp.
References LLMute::AGENT, LLViewerWindow::alertXml(), LLMute::BY_NAME, LLViewerPartSim::clearParticlesByOwnerID(), FALSE, LLMute::flagAll, LLMute::flagParticles, LLMute::flagTextChat, gAgent, LLAgent::getID(), LLSingleton< LLViewerPartSim >::getInstance(), gViewerWindow, isLinden(), llendl, llinfos, llwarns, LLMute::mFlags, LLMute::mID, mLegacyMutes, mMutes, LLMute::mName, LLMute::mType, notifyObservers(), LLUUID::notNull(), LLMute::OBJECT, TRUE, and updateAdd().
Referenced by LLFloaterMute::callbackMuteByName(), LLObjectMute::handleEvent(), LLIMMgr::inviteUserResponse(), LLPanelAvatar::onClickMute(), LLFloaterChat::onClickMute(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), LLFloaterMute::onPickUser(), and script_question_cb().
Definition at line 365 of file llmutelist.cpp.
References LLMute::BY_NAME, FALSE, LLMute::flagAll, llendl, llinfos, LLMute::mFlags, LLMute::mID, mLegacyMutes, mMutes, LLMute::mName, LLUUID::null, setLoaded(), updateAdd(), and updateRemove().
Referenced by LLObjectMute::handleEvent(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), and LLPanelActiveSpeakers::onClickMuteVoiceCommit().
BOOL LLMuteList::autoRemove | ( | const LLUUID & | agent_id, | |
const EAutoReason | reason, | |||
const LLString & | first_name = "" , |
|||
const LLString & | last_name = "" | |||
) |
Definition at line 483 of file llmutelist.cpp.
References LLMute::AGENT, DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, FALSE, gCacheName, LLCacheName::get(), LLCacheName::getName(), isMuted(), notify_automute_callback(), and TRUE.
Referenced by LLToolDragAndDrop::commitGiveInventoryCategory(), LLToolDragAndDrop::commitGiveInventoryItem(), deliver_message(), LLFloaterPay::give(), and LLSelectMgr::processObjectPropertiesFamily().
BOOL LLMuteList::isMuted | ( | const LLUUID & | id, | |
const LLString & | name = LLString::null , |
|||
U32 | flags = 0 | |||
) | const |
Definition at line 631 of file llmutelist.cpp.
References FALSE, LLViewerObjectList::findObject(), LLViewerObject::getID(), LLXform::getParent(), gObjectList, LLPrimitive::isAvatar(), mLegacyMutes, mMutes, and TRUE.
Referenced by autoRemove(), LLPipeline::generateImpostor(), LLVOAvatar::idleUpdate(), isMuted(), LLIMMgr::noteMutedUsers(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), LLViewerChatterBoxInvitation::post(), process_chat_from_simulator(), process_improved_im(), process_load_url(), process_offer_callingcard(), process_sound_trigger(), LLVOAvatar::updateCharacter(), LLAudioSourceVO::updateGain(), and LLVoiceClient::updateMuteState().
Definition at line 116 of file llmutelist.h.
References isMuted(), and LLStringBase< char >::null.
Definition at line 226 of file llmutelist.cpp.
References FALSE.
Referenced by add(), inventory_offer_callback(), LLViewerChatterBoxInvitation::post(), process_chat_from_simulator(), process_improved_im(), and LLPanelActiveSpeakers::refreshSpeakers().
BOOL LLMuteList::isLoaded | ( | ) | const [inline] |
std::vector< LLMute > LLMuteList::getMutes | ( | ) | const |
Definition at line 519 of file llmutelist.cpp.
References mLegacyMutes, mMutes, and LLUUID::null.
Referenced by LLFloaterMute::refreshMuteList().
void LLMuteList::requestFromServer | ( | const LLUUID & | agent_id | ) |
Definition at line 670 of file llmutelist.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_MuteCRC, _PREHASH_MuteData, _PREHASH_MuteListRequest, _PREHASH_SessionID, LLMessageSystem::addU32Fast(), LLMessageSystem::addUUIDFast(), gAgent, gDirUtilp, LLDir::getExpandedFilename(), LLAgent::getSessionID(), gMessageSystem, LL_MAX_PATH, LL_PATH_CACHE, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLAgent::sendReliableMessage(), LLUUID::toString(), and UUID_STR_LENGTH.
Referenced by idle_startup().
void LLMuteList::cache | ( | const LLUUID & | agent_id | ) |
Definition at line 693 of file llmutelist.cpp.
References gDirUtilp, LLDir::getExpandedFilename(), LL_MAX_PATH, LL_PATH_CACHE, mIsLoaded, saveToFile(), LLUUID::toString(), and UUID_STR_LENGTH.
Referenced by LLAppViewer::cleanup().
Definition at line 706 of file llmutelist.cpp.
References sUserVolumeSettings.
Referenced by LLPanelActiveSpeakers::onVolumeChange().
Definition at line 545 of file llmutelist.cpp.
References LLMute::BY_NAME, FALSE, LLFile::fopen(), LLUUID::isNull(), llendl, llwarns, MAX_STRING, LLMute::mID, mLegacyMutes, mMutes, LLMute::mName, LLMute::mType, S32, setLoaded(), and TRUE.
Referenced by onFileMuteList(), and processUseCachedMuteList().
Definition at line 595 of file llmutelist.cpp.
References LLMute::BY_NAME, FALSE, LLFile::fopen(), llendl, llwarns, mLegacyMutes, mMutes, LLUUID::null, S32, LLUUID::toString(), TRUE, and UUID_STR_LENGTH.
Referenced by cache().
void LLMuteList::setLoaded | ( | ) | [private] |
Definition at line 789 of file llmutelist.cpp.
References mIsLoaded, notifyObservers(), and TRUE.
Referenced by loadFromFile(), LLDispatchEmptyMuteList::operator()(), and remove().
void LLMuteList::notifyObservers | ( | ) | [private] |
Definition at line 795 of file llmutelist.cpp.
References mObservers, and LLMuteListObserver::onChange().
Referenced by add(), and setLoaded().
void LLMuteList::updateAdd | ( | const LLMute & | mute | ) | [private] |
Definition at line 346 of file llmutelist.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_MuteData, _PREHASH_MuteID, _PREHASH_MuteName, _PREHASH_SessionID, _PREHASH_UpdateMuteListEntry, LLMessageSystem::addS32(), LLMessageSystem::addStringFast(), LLMessageSystem::addU32(), LLMessageSystem::addUUIDFast(), gAgent, LLAgent::getID(), LLAgent::getSessionID(), gMessageSystem, LLMute::mFlags, LLMute::mID, mIsLoaded, LLMute::mName, LLMute::mType, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLAgent::sendReliableMessage(), and TRUE.
Referenced by add(), and remove().
void LLMuteList::updateRemove | ( | const LLMute & | mute | ) | [private] |
Definition at line 433 of file llmutelist.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_MuteData, _PREHASH_MuteID, _PREHASH_RemoveMuteListEntry, _PREHASH_SessionID, LLMessageSystem::addString(), LLMessageSystem::addUUIDFast(), gAgent, LLAgent::getID(), LLAgent::getSessionID(), gMessageSystem, LLMute::mID, LLMute::mName, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), and LLAgent::sendReliableMessage().
Referenced by remove().
void LLMuteList::processMuteListUpdate | ( | LLMessageSystem * | msg, | |
void ** | ||||
) | [static, private] |
Definition at line 730 of file llmutelist.cpp.
References _PREHASH_AgentID, _PREHASH_Filename, _PREHASH_MuteData, gAgent, gDirUtilp, LLDir::getExpandedFilename(), LLAgent::getID(), LLMessageSystem::getSender(), LLMessageSystem::getStringFast(), LLMessageSystem::getUUIDFast(), gXferManager, LLXferManager::HIGH_PRIORITY, LL_PATH_CACHE, llendl, llinfos, llwarns, MAX_STRING, onFileMuteList(), LLXferManager::requestFile(), and TRUE.
Referenced by getInstance().
void LLMuteList::processUseCachedMuteList | ( | LLMessageSystem * | msg, | |
void ** | ||||
) | [static, private] |
Definition at line 755 of file llmutelist.cpp.
References gAgent, gDirUtilp, LLDir::getExpandedFilename(), LLAgent::getID(), getInstance(), LL_MAX_PATH, LL_PATH_CACHE, llendl, llinfos, loadFromFile(), LLUUID::toString(), and UUID_STR_LENGTH.
Referenced by getInstance().
void LLMuteList::onFileMuteList | ( | void ** | user_data, | |
S32 | code, | |||
LLExtStat | ext_status | |||
) | [static, private] |
Definition at line 766 of file llmutelist.cpp.
References getInstance(), llendl, llinfos, loadFromFile(), and LLFile::remove().
Referenced by processMuteListUpdate().
friend class LLDispatchEmptyMuteList [friend] |
Definition at line 175 of file llmutelist.h.
mute_set_t LLMuteList::mMutes [private] |
Definition at line 165 of file llmutelist.h.
Referenced by add(), getMutes(), isMuted(), loadFromFile(), remove(), and saveToFile().
string_set_t LLMuteList::mLegacyMutes [private] |
Definition at line 168 of file llmutelist.h.
Referenced by add(), getMutes(), isMuted(), loadFromFile(), remove(), and saveToFile().
observer_set_t LLMuteList::mObservers [private] |
Definition at line 171 of file llmutelist.h.
Referenced by addObserver(), notifyObservers(), and removeObserver().
BOOL LLMuteList::mIsLoaded [private] |
Definition at line 173 of file llmutelist.h.
Referenced by cache(), isLoaded(), setLoaded(), and updateAdd().
std::map< LLUUID, F32 > LLMuteList::sUserVolumeSettings [static, private] |
Definition at line 178 of file llmutelist.h.
Referenced by getSavedResidentVolume(), LLMuteList(), setSavedResidentVolume(), and ~LLMuteList().