#include <llcachename.h>
Public Member Functions | |
LLCacheName (LLMessageSystem *msg) | |
LLCacheName (LLMessageSystem *msg, const LLHost &upstream_host) | |
~LLCacheName () | |
void | setUpstream (const LLHost &upstream_host) |
void | addObserver (LLCacheNameCallback callback) |
void | removeObserver (LLCacheNameCallback callback) |
void | cancelCallback (const LLUUID &id, LLCacheNameCallback callback, void *user_data=NULL) |
void | importFile (LLFILE *fp) |
bool | importFile (std::istream &istr) |
void | exportFile (std::ostream &ostr) |
BOOL | getName (const LLUUID &id, char *first, char *last) |
BOOL | getName (const LLUUID &id, std::string &first, std::string &last) |
BOOL | getFullName (const LLUUID &id, std::string &fullname) |
BOOL | getGroupName (const LLUUID &id, char *group) |
BOOL | getGroupName (const LLUUID &id, std::string &group) |
void | get (const LLUUID &id, BOOL is_group, LLCacheNameCallback callback, void *user_data=NULL) |
void | getName (const LLUUID &id, LLCacheNameCallback callback, void *user_data=NULL) |
void | processPending () |
void | deleteEntriesOlderThan (S32 secs) |
void | dump () |
void | dumpStats () |
Static Public Member Functions | |
static LLString | getDefaultName () |
Private Attributes | |
Impl & | impl |
Classes | |
class | Impl |
Definition at line 49 of file llcachename.h.
LLCacheName::LLCacheName | ( | LLMessageSystem * | msg | ) |
-------------------------------------------------------------------------- class LLCacheName ---------------------------------------------------------------------------
Definition at line 246 of file llcachename.cpp.
LLCacheName::LLCacheName | ( | LLMessageSystem * | msg, | |
const LLHost & | upstream_host | |||
) |
Definition at line 250 of file llcachename.cpp.
References setUpstream().
LLCacheName::~LLCacheName | ( | ) |
void LLCacheName::setUpstream | ( | const LLHost & | upstream_host | ) |
Definition at line 281 of file llcachename.cpp.
References impl, and LLCacheName::Impl::mUpstreamHost.
Referenced by idle_startup(), LLCacheName(), and process_agent_movement_complete().
void LLCacheName::addObserver | ( | LLCacheNameCallback | callback | ) |
Definition at line 286 of file llcachename.cpp.
References impl, and LLCacheName::Impl::mObservers.
Referenced by idle_startup(), and LLFloaterBuyLandUI::soleInstance().
void LLCacheName::removeObserver | ( | LLCacheNameCallback | callback | ) |
void LLCacheName::cancelCallback | ( | const LLUUID & | id, | |
LLCacheNameCallback | callback, | |||
void * | user_data = NULL | |||
) |
Definition at line 307 of file llcachename.cpp.
References impl, PendingReply::mCallback, PendingReply::mData, PendingReply::mID, and LLCacheName::Impl::mReplyQueue.
Referenced by LLFloaterPay::~LLFloaterPay().
void LLCacheName::importFile | ( | LLFILE * | fp | ) |
Definition at line 326 of file llcachename.cpp.
References BUFFER_SIZE, CN_FILE_VERSION, LLStringBase< char >::copy(), DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, i, impl, llendl, llinfos, llwarns, MAX_STRING, LLCacheName::Impl::mCache, LLCacheNameEntry::mCreateTime, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mIsGroup, LLCacheNameEntry::mLastName, NULL, S32, and UUID_BYTES.
Referenced by LLAppViewer::loadNameCache().
bool LLCacheName::importFile | ( | std::istream & | istr | ) |
Definition at line 403 of file llcachename.cpp.
References AGENTS(), LLSD::asString(), LLSD::beginMap(), CTIME(), DB_FIRST_NAME_BUF_SIZE, DB_GROUP_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, LLSD::endMap(), FIRST(), LLSDSerialize::fromXML(), GROUPS(), impl, LAST(), llendl, llinfos, llmin(), LLCacheName::Impl::mCache, LLCacheNameEntry::mCreateTime, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mGroupName, LLCacheNameEntry::mIsGroup, LLCacheNameEntry::mLastName, NAME(), NULL, and S32.
void LLCacheName::exportFile | ( | std::ostream & | ostr | ) |
Definition at line 464 of file llcachename.cpp.
References AGENTS(), CTIME(), FIRST(), GROUPS(), impl, LAST(), LLCacheName::Impl::mCache, LLCacheNameEntry::mCreateTime, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mGroupName, LLCacheNameEntry::mIsGroup, LLCacheNameEntry::mLastName, NAME(), NULL, S32, and LLSDSerialize::toPrettyXML().
Referenced by LLAppViewer::saveNameCache().
Definition at line 538 of file llcachename.cpp.
Referenced by LLFloaterNewIM::addAgent(), LLAvatarTracker::addBuddyList(), LLMuteList::autoRemove(), LLPanelLandObjects::callbackReturnOwnerObjects(), LLPanelFriends::confirmModifyRights(), LLViewerParcelMgr::deedLandToGroup(), getFullName(), inventory_offer_callback(), inventory_offer_handler(), LLIMMgr::inviteToSession(), LLSpeaker::lookupName(), LLIMMgr::noteMutedUsers(), LLIMMgr::noteOfflineUsers(), LLPanelFriends::onClickRemove(), LLCollectAllBuddies::operator()(), LLCollectOnlineBuddies::operator()(), LLCollectMappableBuddies::operator()(), process_covenant_reply(), LLAvatarTracker::processChange(), LLAvatarTracker::processNotify(), and LLPanelAvatarSecondLife::updatePartnerName().
Definition at line 500 of file llcachename.cpp.
References CN_NOBODY, CN_WAITING, FALSE, get_ptr_in_map(), impl, LLCacheName::Impl::isRequestPending(), LLCacheName::Impl::mAskNameQueue, LLCacheName::Impl::mCache, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mLastName, and TRUE.
Definition at line 529 of file llcachename.cpp.
References getName().
Referenced by LLNameListCtrl::addElement(), LLPanelFriends::addFriend(), LLNameListCtrl::addNameItem(), LLPanelEvent::draw(), LLPanelFriends::onClickIM(), LLPanelLandObjects::onClickReturnOtherObjects(), LLPanelLandObjects::onClickReturnOwnerObjects(), LLSelectMgr::processObjectPropertiesFamily(), LLStatusBar::refresh(), LLFloaterInspect::refresh(), LLFloaterAvatarTextures::refresh(), LLFloaterProperties::refreshFromItem(), LLPanelLandGeneral::refreshNames(), LLSelectMgr::selectGetCreator(), LLSelectMgr::selectGetLastOwner(), LLSelectMgr::selectGetOwner(), LLNameEditor::setNameID(), LLNameBox::setNameID(), LLPanelFriends::updateFriendItem(), LLPanelGroupMembersSubTab::updateMembers(), LLFloaterBuyLandUI::updateNames(), LLFloaterSellLandUI::updateParcelInfo(), and LLHoverView::updateText().
Definition at line 582 of file llcachename.cpp.
Referenced by LLNameListCtrl::addElement(), LLNameListCtrl::addGroupNameItem(), LLPanelLandObjects::callbackReturnGroupObjects(), LLViewerParcelMgr::deedLandToGroup(), inventory_offer_callback(), inventory_offer_handler(), LLPanelLandObjects::onClickReturnGroupObjects(), LLPanelLandObjects::onClickReturnOtherObjects(), LLPanelLandAccess::onCommitAny(), LLPanelLandAccess::onCommitPublicAccess(), LLStatusBar::refresh(), LLPanelLandAccess::refresh(), LLPanelLandAccess::refresh_ui(), LLFloaterProperties::refreshFromItem(), LLPanelLandAccess::refreshNames(), LLPanelLandGeneral::refreshNames(), LLNameEditor::setNameID(), LLNameBox::setNameID(), LLFloaterBuyContents::show(), LLFloaterBuyLandUI::updateNames(), and LLHoverView::updateText().
Definition at line 547 of file llcachename.cpp.
References CN_NONE, CN_WAITING, FALSE, get_ptr_in_map(), impl, LLCacheName::Impl::isRequestPending(), lldebugs, llendl, LLCacheName::Impl::mAskGroupQueue, LLCacheName::Impl::mCache, LLCacheNameEntry::mGroupName, NULL, and TRUE.
void LLCacheName::get | ( | const LLUUID & | id, | |
BOOL | is_group, | |||
LLCacheNameCallback | callback, | |||
void * | user_data = NULL | |||
) |
Definition at line 593 of file llcachename.cpp.
References CN_NOBODY, get_ptr_in_map(), impl, LLCacheName::Impl::isRequestPending(), LLCacheName::Impl::mAskGroupQueue, LLCacheName::Impl::mAskNameQueue, LLCacheName::Impl::mCache, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mGroupName, LLCacheNameEntry::mIsGroup, LLCacheNameEntry::mLastName, and LLCacheName::Impl::mReplyQueue.
Referenced by LLMuteList::autoRemove(), LLFloaterPay::finishPayUI(), inventory_offer_callback(), LLDispatchEstateUpdateInfo::operator()(), process_load_url(), process_mean_collision_alert_message(), and LLFloaterGroupInfo::showFromUUID().
void LLCacheName::getName | ( | const LLUUID & | id, | |
LLCacheNameCallback | callback, | |||
void * | user_data = NULL | |||
) | [inline] |
void LLCacheName::processPending | ( | ) |
Definition at line 631 of file llcachename.cpp.
References LLFrameTimer::checkExpirationAndReset(), impl, LLHost::isOk(), lldebugs, llendl, LLCacheName::Impl::mProcessTimer, LLCacheName::Impl::mUpstreamHost, LLCacheName::Impl::processPendingAsks(), and LLCacheName::Impl::processPendingReplies().
Referenced by LLAppViewer::idleNetwork().
void LLCacheName::deleteEntriesOlderThan | ( | S32 | secs | ) |
Definition at line 650 of file llcachename.cpp.
References impl, LLCacheName::Impl::mCache, LLCacheNameEntry::mCreateTime, LLCacheName::Impl::mPendingQueue, NULL, and PENDING_TIMEOUT_SECS.
void LLCacheName::dump | ( | ) |
Definition at line 680 of file llcachename.cpp.
References impl, llendl, llinfos, LLCacheName::Impl::mCache, LLCacheNameEntry::mCreateTime, LLCacheNameEntry::mFirstName, LLCacheNameEntry::mGroupName, LLCacheNameEntry::mIsGroup, and LLCacheNameEntry::mLastName.
void LLCacheName::dumpStats | ( | ) |
Definition at line 706 of file llcachename.cpp.
References impl, llendl, llinfos, LLCacheName::Impl::mAskGroupQueue, LLCacheName::Impl::mAskNameQueue, LLCacheName::Impl::mCache, LLCacheName::Impl::mObservers, LLCacheName::Impl::mPendingQueue, and LLCacheName::Impl::mReplyQueue.
LLString LLCacheName::getDefaultName | ( | ) | [static] |
Definition at line 719 of file llcachename.cpp.
References CN_WAITING.
Referenced by LLPanelActiveSpeakers::addSpeaker(), and LLPanelActiveSpeakers::refreshSpeakers().
Impl& LLCacheName::impl [private] |
Definition at line 114 of file llcachename.h.
Referenced by addObserver(), cancelCallback(), deleteEntriesOlderThan(), dump(), dumpStats(), exportFile(), get(), getGroupName(), getName(), importFile(), processPending(), removeObserver(), setUpstream(), and ~LLCacheName().