#include <llfloaterfriends.h>
Public Member Functions | |
LLPanelFriends () | |
virtual | ~LLPanelFriends () |
virtual BOOL | tick () |
This method either creates or brings to the front the current instantiation of this floater. There is only once since you can currently only look at your local friends. | |
void | updateFriends (U32 changed_mask) |
This method is called in response to the LLAvatarTracker sending out a changed() message. | |
virtual BOOL | postBuild () |
Static Public Member Functions | |
static void | requestFriendshipDialog (const LLUUID &target_id, const std::string &target_name) |
static void | requestFriendship (const LLUUID &target_id, const LLString &target_name) |
Private Types | |
enum | FRIENDS_COLUMN_ORDER { LIST_ONLINE_STATUS, LIST_FRIEND_NAME, LIST_VISIBLE_ONLINE, LIST_VISIBLE_MAP, LIST_EDIT_MINE, LIST_EDIT_THEIRS, LIST_FRIEND_UPDATE_GEN } |
enum | EGrantRevoke { GRANT, REVOKE } |
typedef std::map< LLUUID, S32 > | rights_map_t |
Private Member Functions | |
void | reloadNames () |
void | refreshNames () |
void | refreshUI () |
void | refreshRightsChangeList () |
void | applyRightsToFriends () |
BOOL | addFriend (const LLUUID &agent_id) |
BOOL | updateFriendItem (const LLUUID &agent_id, const LLRelationship *relationship) |
void | confirmModifyRights (rights_map_t &ids, EGrantRevoke command) |
void | sendRightsGrant (rights_map_t &ids) |
LLDynamicArray< LLUUID > | getSelectedIDs () |
Static Private Member Functions | |
static void | onSelectName (LLUICtrl *ctrl, void *user_data) |
static void | callbackAddFriend (S32 option, void *user_data) |
static void | onPickAvatar (const std::vector< std::string > &names, const std::vector< LLUUID > &ids, void *user_data) |
static void | onMaximumSelect (void *user_data) |
static void | onClickIM (void *user_data) |
static void | onClickProfile (void *user_data) |
static void | onClickAddFriend (void *user_data) |
static void | onClickRemove (void *user_data) |
static void | onClickOfferTeleport (void *user_data) |
static void | onClickPay (void *user_data) |
static void | onClickModifyStatus (LLUICtrl *ctrl, void *user_data) |
static void | handleRemove (S32 option, void *user_data) |
static void | modifyRightsConfirmation (S32 option, void *user_data) |
Private Attributes | |
LLFriendObserver * | mObserver |
LLUUID | mAddFriendID |
LLString | mAddFriendName |
LLScrollListCtrl * | mFriendsList |
BOOL | mShowMaxSelectWarning |
BOOL | mAllowRightsChange |
S32 | mNumRightsChanged |
Definition at line 54 of file llfloaterfriends.h.
typedef std::map<LLUUID, S32> LLPanelFriends::rights_map_t [private] |
Definition at line 98 of file llfloaterfriends.h.
enum LLPanelFriends::FRIENDS_COLUMN_ORDER [private] |
LIST_ONLINE_STATUS | |
LIST_FRIEND_NAME | |
LIST_VISIBLE_ONLINE | |
LIST_VISIBLE_MAP | |
LIST_EDIT_MINE | |
LIST_EDIT_THEIRS | |
LIST_FRIEND_UPDATE_GEN |
Definition at line 86 of file llfloaterfriends.h.
enum LLPanelFriends::EGrantRevoke [private] |
LLPanelFriends::LLPanelFriends | ( | ) |
Definition at line 103 of file llfloaterfriends.cpp.
References LLAvatarTracker::addObserver(), LLAvatarTracker::instance(), LLEventTimer::mEventTimer, mObserver, and LLTimer::stop().
LLPanelFriends::~LLPanelFriends | ( | ) | [virtual] |
Definition at line 116 of file llfloaterfriends.cpp.
References LLAvatarTracker::instance(), mObserver, and LLAvatarTracker::removeObserver().
BOOL LLPanelFriends::tick | ( | ) | [virtual] |
This method either creates or brings to the front the current instantiation of this floater. There is only once since you can currently only look at your local friends.
Implements LLEventTimer.
Definition at line 122 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, DEFAULT_PERIOD, FALSE, mAllowRightsChange, LLEventTimer::mEventTimer, LLEventTimer::mPeriod, LLTimer::stop(), TRUE, and updateFriends().
Referenced by updateFriends().
void LLPanelFriends::updateFriends | ( | U32 | changed_mask | ) |
This method is called in response to the LLAvatarTracker sending out a changed() message.
Definition at line 131 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, LLPanel::childGetListInterface(), LLPanel::childGetScrollInterface(), FALSE, getSelectedIDs(), mAllowRightsChange, LLEventTimer::mEventTimer, mNumRightsChanged, LLEventTimer::mPeriod, mShowMaxSelectWarning, LLFriendObserver::ONLINE, LLFriendObserver::POWERS, refreshNames(), refreshUI(), LLFriendObserver::REMOVE, RIGHTS_CHANGE_TIMEOUT, LLCtrlSelectionInterface::setCurrentByID(), LLCtrlSelectionInterface::setSelectedByValue(), LLTimer::start(), and tick().
Referenced by postBuild(), tick(), and LLLocalFriendsObserver::tick().
BOOL LLPanelFriends::postBuild | ( | void | ) | [virtual] |
Reimplemented from LLPanel.
Definition at line 179 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetDoubleClickCallback(), FALSE, MAX_FRIEND_SELECT, mFriendsList, onClickAddFriend(), onClickIM(), onClickOfferTeleport(), onClickPay(), onClickProfile(), onClickRemove(), onMaximumSelect(), onSelectName(), refreshNames(), refreshUI(), LLScrollListCtrl::setCommitOnSelectionChange(), LLPanel::setDefaultBtn(), LLScrollListCtrl::setMaximumSelectCallback(), LLScrollListCtrl::setMaxSelectable(), LLScrollListCtrl::sortByColumn(), TRUE, and updateFriends().
void LLPanelFriends::requestFriendshipDialog | ( | const LLUUID & | target_id, | |
const std::string & | target_name | |||
) | [static] |
Definition at line 582 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), callbackAddFriend(), gAgentID, gViewerWindow, LLAddFriendData::mID, LLAddFriendData::mName, and LLNotifyBox::showXml().
Referenced by LLPanelAvatar::onClickAddFriend(), and onPickAvatar().
void LLPanelFriends::requestFriendship | ( | const LLUUID & | target_id, | |
const LLString & | target_name | |||
) | [static] |
Definition at line 542 of file llfloaterfriends.cpp.
References LLUUID::asString(), LLAssetType::AT_CALLINGCARD, LLInventoryModel::findCategoryUUIDForType(), gInventory, IM_FRIENDSHIP_OFFERED, IM_ONLINE, and send_improved_im().
Referenced by callbackAddFriend(), and request_friendship().
void LLPanelFriends::reloadNames | ( | ) | [private] |
void LLPanelFriends::refreshNames | ( | ) | [private] |
Definition at line 362 of file llfloaterfriends.cpp.
References addFriend(), LLAvatarTracker::copyBuddyList(), LLScrollListCtrl::deleteItems(), LLScrollListCtrl::getAllData(), LLScrollListCtrl::getScrollPos(), getSelectedIDs(), LLAvatarTracker::instance(), LIST_FRIEND_UPDATE_GEN, LLEventTimer::mEventTimer, mFriendsList, S32, LLScrollListCtrl::selectMultiple(), LLScrollListCtrl::setScrollPos(), LLScrollListCtrl::sortItems(), LLTimer::start(), TRUE, and updateFriendItem().
Referenced by postBuild(), and updateFriends().
void LLPanelFriends::refreshUI | ( | ) | [private] |
Definition at line 426 of file llfloaterfriends.cpp.
References LLSD::asString(), LLPanel::childSetEnabled(), LLPanel::childSetText(), FALSE, LLScrollListCtrl::getAllSelected(), LLScrollListItem::getColumn(), LLScrollListCtrl::getFirstSelected(), LLPanel::getString(), LLScrollListCell::getValue(), LIST_FRIEND_NAME, mFriendsList, LLStringBase< char >::null, refreshRightsChangeList(), and TRUE.
Referenced by modifyRightsConfirmation(), onSelectName(), postBuild(), and updateFriends().
void LLPanelFriends::refreshRightsChangeList | ( | ) | [private] |
Definition at line 296 of file llfloaterfriends.cpp.
References LLPanel::childSetEnabled(), FALSE, LLAvatarTracker::getBuddyInfo(), getSelectedIDs(), LLAvatarTracker::instance(), LLRelationship::isOnline(), mAllowRightsChange, NULL, S32, and LLView::setVisible().
Referenced by refreshUI().
void LLPanelFriends::applyRightsToFriends | ( | ) | [private] |
Definition at line 744 of file llfloaterfriends.cpp.
References confirmModifyRights(), FALSE, LLScrollListCtrl::getAllSelected(), LLAvatarTracker::getBuddyInfo(), LLRelationship::getRightsGrantedTo(), GRANT, LLRelationship::GRANT_MAP_LOCATION, LLRelationship::GRANT_MODIFY_OBJECTS, LLRelationship::GRANT_ONLINE_STATUS, LLAvatarTracker::instance(), LLRelationship::isRightGrantedTo(), LIST_EDIT_MINE, LIST_VISIBLE_MAP, LIST_VISIBLE_ONLINE, mFriendsList, NULL, REVOKE, S32, sendRightsGrant(), and TRUE.
Referenced by onSelectName().
Definition at line 210 of file llfloaterfriends.cpp.
References ADD_BOTTOM, LLScrollListCtrl::addElement(), FALSE, gCacheName, LLAvatarTracker::getBuddyInfo(), LLRelationship::getChangeSerialNum(), LLCacheName::getFullName(), LLRelationship::GRANT_MAP_LOCATION, LLRelationship::GRANT_MODIFY_OBJECTS, LLRelationship::GRANT_ONLINE_STATUS, LLAvatarTracker::instance(), LLRelationship::isOnline(), LLRelationship::isRightGrantedFrom(), LLRelationship::isRightGrantedTo(), LIST_EDIT_MINE, LIST_EDIT_THEIRS, LIST_FRIEND_NAME, LIST_FRIEND_UPDATE_GEN, LIST_ONLINE_STATUS, LIST_VISIBLE_MAP, LIST_VISIBLE_ONLINE, and mFriendsList.
Referenced by refreshNames().
BOOL LLPanelFriends::updateFriendItem | ( | const LLUUID & | agent_id, | |
const LLRelationship * | relationship | |||
) | [private] |
Definition at line 268 of file llfloaterfriends.cpp.
References LLFontGL::BOLD, FALSE, gCacheName, LLRelationship::getChangeSerialNum(), LLScrollListItem::getColumn(), LLCacheName::getFullName(), LLScrollListCtrl::getItem(), LLRelationship::GRANT_MAP_LOCATION, LLRelationship::GRANT_MODIFY_OBJECTS, LLRelationship::GRANT_ONLINE_STATUS, LLRelationship::isOnline(), LLRelationship::isRightGrantedTo(), LIST_EDIT_MINE, LIST_FRIEND_NAME, LIST_FRIEND_UPDATE_GEN, LIST_ONLINE_STATUS, LIST_VISIBLE_MAP, LIST_VISIBLE_ONLINE, mFriendsList, LLFontGL::NORMAL, LLStringBase< char >::null, S32, LLScrollListItem::setEnabled(), LLScrollListCell::setValue(), LLScrollListCtrl::sortItems(), and TRUE.
Referenced by modifyRightsConfirmation(), and refreshNames().
void LLPanelFriends::confirmModifyRights | ( | rights_map_t & | ids, | |
EGrantRevoke | command | |||
) | [private] |
Definition at line 669 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), gCacheName, LLCacheName::getName(), GRANT, gViewerWindow, and modifyRightsConfirmation().
Referenced by applyRightsToFriends().
void LLPanelFriends::sendRightsGrant | ( | rights_map_t & | ids | ) | [private] |
Definition at line 837 of file llfloaterfriends.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_AgentRelated, _PREHASH_GrantUserRights, _PREHASH_RelatedRights, _PREHASH_Rights, _PREHASH_SessionID, LLMessageSystem::addS32(), LLMessageSystem::addUUID(), gAgent, LLAgent::getID(), LLAgent::getSessionID(), gMessageSystem, mNumRightsChanged, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), and LLAgent::sendReliableMessage().
Referenced by applyRightsToFriends(), and modifyRightsConfirmation().
LLDynamicArray< LLUUID > LLPanelFriends::getSelectedIDs | ( | ) | [private] |
Definition at line 463 of file llfloaterfriends.cpp.
References LLScrollListCtrl::getAllSelected(), and mFriendsList.
Referenced by onClickIM(), onClickOfferTeleport(), onClickPay(), onClickProfile(), onClickRemove(), refreshNames(), refreshRightsChangeList(), and updateFriends().
void LLPanelFriends::onSelectName | ( | LLUICtrl * | ctrl, | |
void * | user_data | |||
) | [static, private] |
Definition at line 476 of file llfloaterfriends.cpp.
References applyRightsToFriends(), and refreshUI().
Referenced by postBuild().
void LLPanelFriends::callbackAddFriend | ( | S32 | option, | |
void * | user_data | |||
) | [static, private] |
Definition at line 561 of file llfloaterfriends.cpp.
References requestFriendship().
Referenced by requestFriendshipDialog().
void LLPanelFriends::onPickAvatar | ( | const std::vector< std::string > & | names, | |
const std::vector< LLUUID > & | ids, | |||
void * | user_data | |||
) | [static, private] |
Definition at line 572 of file llfloaterfriends.cpp.
References requestFriendshipDialog().
Referenced by onClickAddFriend().
void LLPanelFriends::onMaximumSelect | ( | void * | user_data | ) | [static, private] |
Definition at line 489 of file llfloaterfriends.cpp.
References llformat(), MAX_FRIEND_SELECT, and LLNotifyBox::showXml().
Referenced by postBuild().
void LLPanelFriends::onClickIM | ( | void * | user_data | ) | [static, private] |
Definition at line 513 of file llfloaterfriends.cpp.
References LLIMMgr::addSession(), gCacheName, LLAvatarTracker::getBuddyInfo(), LLCacheName::getFullName(), getSelectedIDs(), gIMMgr, IM_NOTHING_SPECIAL, IM_SESSION_CONFERENCE_START, LLAvatarTracker::instance(), make_ui_sound(), LLIMMgr::setFloaterOpen(), and TRUE.
Referenced by postBuild().
void LLPanelFriends::onClickProfile | ( | void * | user_data | ) | [static, private] |
Definition at line 497 of file llfloaterfriends.cpp.
References getSelectedIDs(), LLAvatarTracker::instance(), LLAvatarTracker::isBuddyOnline(), and LLFloaterAvatarInfo::showFromFriend().
Referenced by postBuild().
void LLPanelFriends::onClickAddFriend | ( | void * | user_data | ) | [static, private] |
Definition at line 602 of file llfloaterfriends.cpp.
References LLFloater::addDependentFloater(), FALSE, LLFloaterView::getParentFloater(), gFloaterView, onPickAvatar(), LLFloaterAvatarPicker::show(), and TRUE.
Referenced by postBuild().
void LLPanelFriends::onClickRemove | ( | void * | user_data | ) | [static, private] |
Definition at line 614 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), gCacheName, LLCacheName::getName(), getSelectedIDs(), gViewerWindow, and handleRemove().
Referenced by postBuild().
void LLPanelFriends::onClickOfferTeleport | ( | void * | user_data | ) | [static, private] |
Definition at line 646 of file llfloaterfriends.cpp.
References getSelectedIDs(), and handle_lure().
Referenced by postBuild().
void LLPanelFriends::onClickPay | ( | void * | user_data | ) | [static, private] |
Definition at line 658 of file llfloaterfriends.cpp.
References getSelectedIDs(), and handle_pay_by_id().
Referenced by postBuild().
static void LLPanelFriends::onClickModifyStatus | ( | LLUICtrl * | ctrl, | |
void * | user_data | |||
) | [static, private] |
void LLPanelFriends::handleRemove | ( | S32 | option, | |
void * | user_data | |||
) | [static, private] |
Definition at line 865 of file llfloaterfriends.cpp.
References LLInventoryModel::addChangedMask(), LLInventoryObserver::CALLING_CARD, LLAvatarTracker::empower(), FALSE, LLAvatarTracker::getBuddyInfo(), gInventory, LLRelationship::GRANT_MODIFY_OBJECTS, LLAvatarTracker::instance(), LLRelationship::isRightGrantedTo(), LLInventoryObserver::LABEL, llendl, llinfos, LLInventoryModel::notifyObservers(), LLAvatarTracker::notifyObservers(), LLUUID::null, and LLAvatarTracker::terminateBuddy().
Referenced by onClickRemove().
void LLPanelFriends::modifyRightsConfirmation | ( | S32 | option, | |
void * | user_data | |||
) | [static, private] |
Definition at line 715 of file llfloaterfriends.cpp.
References LLAvatarTracker::getBuddyInfo(), LLAvatarTracker::instance(), refreshUI(), sendRightsGrant(), and updateFriendItem().
Referenced by confirmModifyRights().
LLFriendObserver* LLPanelFriends::mObserver [private] |
Definition at line 139 of file llfloaterfriends.h.
Referenced by LLPanelFriends(), and ~LLPanelFriends().
LLUUID LLPanelFriends::mAddFriendID [private] |
Definition at line 140 of file llfloaterfriends.h.
LLString LLPanelFriends::mAddFriendName [private] |
Definition at line 141 of file llfloaterfriends.h.
LLScrollListCtrl* LLPanelFriends::mFriendsList [private] |
Definition at line 142 of file llfloaterfriends.h.
Referenced by addFriend(), applyRightsToFriends(), getSelectedIDs(), postBuild(), refreshNames(), refreshUI(), and updateFriendItem().
BOOL LLPanelFriends::mShowMaxSelectWarning [private] |
BOOL LLPanelFriends::mAllowRightsChange [private] |
Definition at line 144 of file llfloaterfriends.h.
Referenced by refreshRightsChangeList(), tick(), and updateFriends().
S32 LLPanelFriends::mNumRightsChanged [private] |
Definition at line 145 of file llfloaterfriends.h.
Referenced by sendRightsGrant(), and updateFriends().