LLMuteList Class Reference

#include <llmutelist.h>

Collaboration diagram for LLMuteList:

Collaboration graph
[legend]
List of all members.

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 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< LLMutegetMutes () const
void requestFromServer (const LLUUID &agent_id)
void cache (const LLUUID &agent_id)

Private Types

typedef std::set< LLMute,
compare_by_id
mute_set_t
typedef std::set< LLStringstring_set_t
typedef std::set< LLMuteListObserver * > observer_set_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

Friends

class LLDispatchEmptyMuteList

Classes

struct  compare_by_id
struct  compare_by_name

Detailed Description

Definition at line 82 of file llmutelist.h.


Member Typedef Documentation

typedef std::set<LLMute, compare_by_id> LLMuteList::mute_set_t [private]

Definition at line 146 of file llmutelist.h.

typedef std::set<LLMuteListObserver*> LLMuteList::observer_set_t [private]

Definition at line 152 of file llmutelist.h.

typedef std::set<LLString> LLMuteList::string_set_t [private]

Definition at line 149 of file llmutelist.h.


Constructor & Destructor Documentation

LLMuteList::LLMuteList (  ) 

Definition at line 160 of file llmutelist.cpp.

References _PREHASH_MuteListUpdate, _PREHASH_UseCachedMuteList, LLDispatcher::addHandler(), gGenericDispatcher, gMessageSystem, processMuteListUpdate(), processUseCachedMuteList(), sDispatchEmptyMuteList, and LLMessageSystem::setHandlerFuncFast().

LLMuteList::~LLMuteList (  ) 

Definition at line 175 of file llmutelist.cpp.


Member Function Documentation

BOOL LLMuteList::add ( const LLMute mute,
U32  flags = 0 
)

Definition at line 195 of file llmutelist.cpp.

References LLMute::AGENT, LLViewerWindow::alertXml(), LLMute::BY_NAME, FALSE, LLMute::flagAll, LLMute::flagParticles, LLMute::flagTextChat, gAgent, LLAgent::getID(), gViewerWindow, gWorldPointer, 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(), cmd_mute(), LLObjectMute::handleEvent(), inventory_offer_mute_callback(), LLIMMgr::inviteUserResponse(), LLPanelAvatar::onClickMute(), LLFloaterChat::onClickMute(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), LLFloaterMute::onPickUser(), and script_question_cb().

void LLMuteList::addObserver ( LLMuteListObserver observer  ) 

Definition at line 633 of file llmutelist.cpp.

References mObservers.

Referenced by LLVoiceClient::stateMachine().

void LLMuteList::cache ( const LLUUID agent_id  ) 

Definition at line 564 of file llmutelist.cpp.

References gDirUtilp, LLDir::getExpandedFilename(), LL_MAX_PATH, LL_PATH_CACHE, mIsLoaded, saveToFile(), LLUUID::toString(), and UUID_STR_LENGTH.

Referenced by cleanup_app().

std::vector< LLMute > LLMuteList::getMutes (  )  const

Definition at line 402 of file llmutelist.cpp.

References mLegacyMutes, mMutes, and LLUUID::null.

Referenced by LLFloaterMute::refreshMuteList().

BOOL LLMuteList::isLinden ( const LLString name  )  const

Definition at line 179 of file llmutelist.cpp.

References FALSE.

Referenced by add(), LLIMMgr::addMessage(), inventory_offer_callback(), LLViewerChatterBoxInvitation::post(), process_chat_from_simulator(), process_improved_im(), and LLPanelActiveSpeakers::refreshSpeakers().

BOOL LLMuteList::isLoaded (  )  const [inline]

Definition at line 105 of file llmutelist.h.

References mIsLoaded.

Referenced by request_initial_instant_messages().

BOOL LLMuteList::isMuted ( const LLUUID id,
U32  flags 
) const [inline]

Definition at line 101 of file llmutelist.h.

References isMuted(), and LLStringBase< char >::null.

BOOL LLMuteList::isMuted ( const LLUUID id,
const LLString name = LLString::null,
U32  flags = 0 
) const

Definition at line 515 of file llmutelist.cpp.

References FALSE, mLegacyMutes, mMutes, and TRUE.

Referenced by LLIMMgr::addMessage(), callback_load_url_name(), LLFloaterIMPanel::draw(), LLObjectMute::handleEvent(), LLVOAvatar::idleUpdate(), inventory_offer_callback(), inventory_offer_handler(), LLIMMgr::inviteToSession(), LLIMMgr::inviteUserResponse(), isMuted(), LLPanelAvatar::onClickMute(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), LLToolPie::pickAndShowMenu(), LLViewerChatterBoxInvitation::post(), 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(), LLVOAvatar::processSingleAnimationStateChange(), LLPanelActiveSpeakers::refreshSpeakers(), LLViewerObject::unpackParticleSource(), LLVOAvatar::updateCharacter(), LLAudioSourceVO::updateGain(), and LLVoiceClient::updateMuteState().

BOOL LLMuteList::loadFromFile ( const LLString filename  )  [private]

Definition at line 428 of file llmutelist.cpp.

References LLMute::BY_NAME, FALSE, LLFile::fopen(), LLUUID::isNull(), llendl, llwarns, MAX_STRING, LLMute::mID, mIsLoaded, mLegacyMutes, mMutes, LLMute::mName, LLMute::mType, notifyObservers(), S32, TRUE, and type.

Referenced by onFileMuteList(), and processUseCachedMuteList().

void LLMuteList::notifyObservers (  )  [private]

Definition at line 649 of file llmutelist.cpp.

References gFloaterMute, mObservers, and LLFloaterMute::refreshMuteList().

Referenced by add(), loadFromFile(), remove(), and setLoaded().

void LLMuteList::onFileMuteList ( void **  user_data,
S32  code,
LLExtStat  ext_status 
) [static, private]

Definition at line 619 of file llmutelist.cpp.

References gMuteListp, llendl, llinfos, loadFromFile(), and LLFile::remove().

Referenced by processMuteListUpdate().

void LLMuteList::processMuteListUpdate ( LLMessageSystem msg,
void **   
) [static, private]

Definition at line 582 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 LLMuteList().

void LLMuteList::processUseCachedMuteList ( LLMessageSystem msg,
void **   
) [static, private]

Definition at line 607 of file llmutelist.cpp.

References gAgent, gDirUtilp, LLDir::getExpandedFilename(), LLAgent::getID(), gMuteListp, LL_MAX_PATH, LL_PATH_CACHE, llendl, llinfos, loadFromFile(), LLUUID::toString(), and UUID_STR_LENGTH.

Referenced by LLMuteList().

BOOL LLMuteList::remove ( const LLMute mute,
U32  flags = 0 
)

Definition at line 318 of file llmutelist.cpp.

References LLMute::BY_NAME, FALSE, LLMute::flagAll, llendl, llinfos, mLegacyMutes, mMutes, LLMute::mName, notifyObservers(), LLUUID::null, TRUE, updateAdd(), and updateRemove().

Referenced by cmd_unmute(), LLObjectMute::handleEvent(), LLPanelActiveSpeakers::onClickMuteTextCommit(), LLFloaterIMPanel::onClickMuteVoice(), LLPanelActiveSpeakers::onClickMuteVoiceCommit(), and LLFloaterMute::onClickRemove().

void LLMuteList::removeObserver ( LLMuteListObserver observer  ) 

Definition at line 638 of file llmutelist.cpp.

References mObservers.

void LLMuteList::requestFromServer ( const LLUUID agent_id  ) 

Definition at line 541 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().

BOOL LLMuteList::saveToFile ( const LLString filename  )  [private]

Definition at line 479 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 643 of file llmutelist.cpp.

References mIsLoaded, notifyObservers(), and TRUE.

Referenced by LLDispatchEmptyMuteList::operator()().

void LLMuteList::updateAdd ( const LLMute mute  )  [private]

Definition at line 299 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 388 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().


Friends And Related Function Documentation

friend class LLDispatchEmptyMuteList [friend]

Definition at line 157 of file llmutelist.h.


Member Data Documentation

BOOL LLMuteList::mIsLoaded [private]

Definition at line 155 of file llmutelist.h.

Referenced by cache(), isLoaded(), loadFromFile(), setLoaded(), and updateAdd().

string_set_t LLMuteList::mLegacyMutes [private]

Definition at line 150 of file llmutelist.h.

Referenced by add(), getMutes(), isMuted(), loadFromFile(), remove(), and saveToFile().

mute_set_t LLMuteList::mMutes [private]

Definition at line 147 of file llmutelist.h.

Referenced by add(), getMutes(), isMuted(), loadFromFile(), remove(), and saveToFile().

observer_set_t LLMuteList::mObservers [private]

Definition at line 153 of file llmutelist.h.

Referenced by addObserver(), notifyObservers(), and removeObserver().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:32 2010 for Second Life Viewer by  doxygen 1.4.7