#include <lluserrelations.h>
Collaboration diagram for LLRelationship:
enum | { GRANT_NONE = 0x0, GRANT_ONLINE_STATUS = 0x1, GRANT_MAP_LOCATION = 0x2, GRANT_MODIFY_OBJECTS = 0x4 } |
Anonymous enumeration for specifying rights. More... | |
bool | isRightGrantedTo (S32 rights) const |
Check for a set of rights granted to agent. | |
bool | isRightGrantedFrom (S32 rights) const |
Check for a set of rights granted from an agent. | |
S32 | getRightsGrantedTo () const |
Get the rights granted to the other agent. | |
S32 | getRightsGrantedFrom () const |
Get the rights granted from the other agent. | |
void | setRightsTo (S32 to_agent) |
void | setRightsFrom (S32 from_agent) |
void | grantRights (S32 to_agent, S32 from_agent) |
Grant a set of rights. | |
void | revokeRights (S32 to_agent, S32 from_agent) |
Revoke a set of rights. | |
static const U8 | GRANTED_VISIBLE_MASK = LLRelationship::GRANT_MODIFY_OBJECTS | LLRelationship::GRANT_MAP_LOCATION |
Public Member Functions | |
LLRelationship () | |
Constructors. | |
LLRelationship (S32 grant_to, S32 grant_from, bool is_online) | |
Status functionality | |
I thought it would be keen to have a generic status interface, but the only thing we currently cache is online status. As this assumption changes, this API may evolve. | |
bool | isOnline () const |
Does this instance believe the related agent is currently online or available. | |
void | online (bool is_online) |
Set the online status. | |
Static Public Attributes | |
static const LLRelationship | DEFAULT_RELATIONSHIP = LLRelationship(GRANT_ONLINE_STATUS, GRANT_ONLINE_STATUS, false) |
Protected Attributes | |
S32 | mGrantToAgent |
S32 | mGrantFromAgent |
bool | mIsOnline |
You are expected to use this in a map or similar structure, eg: typedef std::map<LLUUID, LLRelationship> agent_relationship_map;
Definition at line 52 of file lluserrelations.h.
anonymous enum |
LLRelationship::LLRelationship | ( | ) |
Definition at line 48 of file lluserrelations.cpp.
S32 LLRelationship::getRightsGrantedFrom | ( | ) | const |
Get the rights granted from the other agent.
Definition at line 80 of file lluserrelations.cpp.
References mGrantFromAgent.
S32 LLRelationship::getRightsGrantedTo | ( | ) | const |
Get the rights granted to the other agent.
Definition at line 75 of file lluserrelations.cpp.
References mGrantToAgent.
Referenced by LLAvatarTracker::addBuddyList(), and LLPanelFriends::applyRightsToFriends().
Grant a set of rights.
Any bit which is set will grant that right if it is set in the instance. You can pass in LLGrantedRights::NONE to not change that field.
to_agent | The rights to grant to agent_id. | |
from_agent | The rights granted from agent_id. |
Definition at line 85 of file lluserrelations.cpp.
References mGrantFromAgent, and mGrantToAgent.
Referenced by LLAvatarTracker::setBuddyEmpowered().
bool LLRelationship::isOnline | ( | ) | const |
Does this instance believe the related agent is currently online or available.
NOTE: This API may be deprecated if there is any transient status other than online status, for example, away/busy/etc.
This call does not check any kind of central store or make any deep information calls - it simply checks a cache of online status.
Definition at line 55 of file lluserrelations.cpp.
References mIsOnline.
Referenced by LLAvatarTracker::addBuddyList(), LLPanelFriends::addFriend(), deliver_message(), LLAvatarTracker::isBuddyOnline(), LLIMMgr::noteOfflineUsers(), LLCollectAllBuddies::operator()(), LLCollectOnlineBuddies::operator()(), LLCollectMappableBuddies::operator()(), LLPanelFriends::refreshRightsChangeList(), and LLTracker::render3D().
bool LLRelationship::isRightGrantedFrom | ( | S32 | rights | ) | const |
Check for a set of rights granted from an agent.
rights | A bitfield to check for rights. |
Definition at line 70 of file lluserrelations.cpp.
References mGrantFromAgent.
Referenced by LLPanelFriends::addFriend(), LLCollectMappableBuddies::operator()(), and LLCollectProxyBuddies::operator()().
bool LLRelationship::isRightGrantedTo | ( | S32 | rights | ) | const |
Check for a set of rights granted to agent.
rights | A bitfield to check for rights. |
Definition at line 65 of file lluserrelations.cpp.
References mGrantToAgent.
Referenced by LLPanelFriends::addFriend(), LLPanelFriends::handleRemove(), LLAvatarTracker::isBuddyEmpowered(), and LLPanelFriends::refreshRightsChangeList().
void LLRelationship::online | ( | bool | is_online | ) |
Set the online status.
NOTE: This API may be deprecated if there is any transient status other than online status.
is_online | Se the online status |
Definition at line 60 of file lluserrelations.cpp.
References mIsOnline.
Referenced by LLAvatarTracker::setBuddyOnline().
Revoke a set of rights.
Any bit which is set will revoke that right if it is set in the instance. You can pass in LLGrantedRights::NONE to not change that field.
to_agent | The rights to grant to agent_id. | |
from_agent | The rights granted from agent_id. |
Definition at line 91 of file lluserrelations.cpp.
References mGrantFromAgent, and mGrantToAgent.
const LLRelationship LLRelationship::DEFAULT_RELATIONSHIP = LLRelationship(GRANT_ONLINE_STATUS, GRANT_ONLINE_STATUS, false) [static] |
Definition at line 61 of file lluserrelations.h.
const U8 LLRelationship::GRANTED_VISIBLE_MASK = LLRelationship::GRANT_MODIFY_OBJECTS | LLRelationship::GRANT_MAP_LOCATION [static] |
???
Definition at line 113 of file lluserrelations.h.
S32 LLRelationship::mGrantFromAgent [protected] |
Definition at line 173 of file lluserrelations.h.
Referenced by getRightsGrantedFrom(), grantRights(), isRightGrantedFrom(), revokeRights(), and setRightsFrom().
S32 LLRelationship::mGrantToAgent [protected] |
Definition at line 172 of file lluserrelations.h.
Referenced by getRightsGrantedTo(), grantRights(), isRightGrantedTo(), revokeRights(), and setRightsTo().
bool LLRelationship::mIsOnline [protected] |