lluserrelations.h

Go to the documentation of this file.
00001 
00034 #ifndef LL_LLUSERRELAIONS_H
00035 #define LL_LLUSERRELAIONS_H
00036 
00037 #include <map>
00038 #include "lluuid.h"
00039 
00052 class LLRelationship
00053 {
00054 public:
00058         LLRelationship();
00059         LLRelationship(S32 grant_to, S32 grant_from, bool is_online);
00060         
00061         static const LLRelationship DEFAULT_RELATIONSHIP;
00062 
00084         bool isOnline() const;
00085 
00093         void online(bool is_online);
00095 
00096         /* @name Granted rights
00097          */
00099 
00102         enum
00103         {
00104                 GRANT_NONE = 0x0,
00105                 GRANT_ONLINE_STATUS = 0x1,
00106                 GRANT_MAP_LOCATION = 0x2,
00107                 GRANT_MODIFY_OBJECTS = 0x4,
00108         };
00109 
00113         static const U8 GRANTED_VISIBLE_MASK;
00114 
00121         bool isRightGrantedTo(S32 rights) const;
00122 
00129         bool isRightGrantedFrom(S32 rights) const;
00130 
00136         S32 getRightsGrantedTo() const;
00137 
00143         S32 getRightsGrantedFrom() const;
00144 
00145         void setRightsTo(S32 to_agent) { mGrantToAgent = to_agent; }
00146         void setRightsFrom(S32 from_agent) { mGrantFromAgent = from_agent; }
00147 
00157         void grantRights(S32 to_agent, S32 from_agent);
00158         
00168         void revokeRights(S32 to_agent, S32 from_agent);
00170 
00171 protected:
00172         S32 mGrantToAgent;
00173         S32 mGrantFromAgent;
00174         bool mIsOnline;
00175 };
00176 
00177 #endif // LL_LLUSERRELAIONS_H

Generated on Thu Jul 1 06:09:24 2010 for Second Life Viewer by  doxygen 1.4.7