LLPermissions Class Reference

#include <llpermissions.h>

Inheritance diagram for LLPermissions:

Inheritance graph
[legend]
Collaboration diagram for LLPermissions:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLPermissions ()
void init (const LLUUID &creator, const LLUUID &owner, const LLUUID &last_owner, const LLUUID &group)
void initMasks (PermissionMask base, PermissionMask owner, PermissionMask everyone, PermissionMask group, PermissionMask next)
const LLUUID & getCreator () const
const LLUUID & getOwner () const
const LLUUID & getGroup () const
const LLUUID & getLastOwner () const
U32 getMaskBase () const
U32 getMaskOwner () const
U32 getMaskGroup () const
U32 getMaskEveryone () const
U32 getMaskNextOwner () const
bool isOwned () const
bool isGroupOwned () const
BOOL getOwnership (LLUUID &owner_id, BOOL &is_group_owned) const
LLUUID getSafeOwner () const
U32 getCRC32 () const
void fix ()
void set (const LLPermissions &permissions)
void setMaskBase (U32 mask)
void setMaskOwner (U32 mask)
void setMaskEveryone (U32 mask)
void setMaskGroup (U32 mask)
void setMaskNext (U32 mask)
void accumulate (const LLPermissions &perm)
BOOL setOwnerAndGroup (const LLUUID &agent, const LLUUID &owner, const LLUUID &group, bool is_atomic)
BOOL deedToGroup (const LLUUID &agent, const LLUUID &group)
BOOL setBaseBits (const LLUUID &agent, BOOL set, PermissionMask bits)
BOOL setOwnerBits (const LLUUID &agent, BOOL set, PermissionMask bits)
BOOL setGroupBits (const LLUUID &agent, const LLUUID &group, BOOL set, PermissionMask bits)
BOOL setEveryoneBits (const LLUUID &agent, const LLUUID &group, BOOL set, PermissionMask bits)
BOOL setNextOwnerBits (const LLUUID &agent, const LLUUID &group, BOOL set, PermissionMask bits)
BOOL allowOperationBy (PermissionBit op, const LLUUID &agent, const LLUUID &group=LLUUID::null) const
BOOL allowModifyBy (const LLUUID &agent_id) const
BOOL allowCopyBy (const LLUUID &agent_id) const
BOOL allowMoveBy (const LLUUID &agent_id) const
BOOL allowModifyBy (const LLUUID &agent_id, const LLUUID &group) const
BOOL allowCopyBy (const LLUUID &agent_id, const LLUUID &group) const
BOOL allowMoveBy (const LLUUID &agent_id, const LLUUID &group) const
BOOL allowTransferTo (const LLUUID &agent_id) const
LLSD packMessage () const
void unpackMessage (LLSD perms)
void packMessage (LLMessageSystem *msg) const
void unpackMessage (LLMessageSystem *msg, const char *block, S32 block_num=0)
BOOL importFile (LLFILE *fp)
BOOL exportFile (LLFILE *fp) const
BOOL importLegacyStream (std::istream &input_stream)
BOOL exportLegacyStream (std::ostream &output_stream) const
LLXMLNode * exportFileXML () const
bool importXML (LLXMLNode *node)
bool operator== (const LLPermissions &rhs) const
bool operator!= (const LLPermissions &rhs) const
virtual const LLMetaClass & getMetaClass () const

Static Public Attributes

static const LLPermissions DEFAULT

Private Member Functions

void fixFairUse ()
void fixOwnership ()

Private Attributes

LLUUID mCreator
LLUUID mOwner
LLUUID mLastOwner
LLUUID mGroup
PermissionMask mMaskBase
PermissionMask mMaskOwner
PermissionMask mMaskEveryone
PermissionMask mMaskGroup
PermissionMask mMaskNextOwner
bool mIsGroupOwned

Friends

class LLMetaClassT< LLPermissions >
std::ostream & operator<< (std::ostream &s, const LLPermissions &perm)


Detailed Description

Definition at line 90 of file llpermissions.h.


Constructor & Destructor Documentation

LLPermissions::LLPermissions (  ) 

Definition at line 49 of file llpermissions.cpp.

References init(), and LLUUID::null.

Here is the call graph for this function:


Member Function Documentation

void LLPermissions::fixFairUse (  )  [private]

Definition at line 171 of file llpermissions.cpp.

References mMaskBase, mMaskNextOwner, PERM_COPY, PERM_MOVE, PERM_NONE, and PERM_TRANSFER.

Referenced by deedToGroup(), importFile(), importLegacyStream(), and initMasks().

Here is the caller graph for this function:

void LLPermissions::fixOwnership (  )  [private]

Definition at line 185 of file llpermissions.cpp.

References LLUUID::isNull(), mGroup, mIsGroupOwned, mOwner, and LLUUID::notNull().

Referenced by init(), and setOwnerAndGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPermissions::init ( const LLUUID &  creator,
const LLUUID &  owner,
const LLUUID &  last_owner,
const LLUUID &  group 
)

void LLPermissions::initMasks ( PermissionMask  base,
PermissionMask  owner,
PermissionMask  everyone,
PermissionMask  group,
PermissionMask  next 
)

const LLUUID& LLPermissions::getCreator (  )  const [inline]

const LLUUID& LLPermissions::getOwner (  )  const [inline]

Definition at line 141 of file llpermissions.h.

References mOwner.

Referenced by LLTaskSoundBridge::buildContextMenu(), confirm_replace_attachment_rez(), LLToolDragAndDrop::dad3dActivateGesture(), LLToolDragAndDrop::dad3dRezAttachmentFromInv(), LLToolDragAndDrop::dad3dWearItem(), LLOutfitObserver::done(), LLViewerObject::doUpdateInventory(), LLFolderBridge::dragItemIntoFolder(), enable_save_into_inventory(), enable_take(), LLInventoryFetchComboObserver::fetch(), LLViewerInventoryItem::fetchFromServer(), LLInventoryFetchObserver::fetchItems(), LLItemBridge::getLabelSuffix(), LLAttachObject::handleEvent(), LLPreview::handleHover(), LLFloaterCompileQueue::handleInventory(), LLAgent::isGrantedProxy(), ll_create_sd_from_permissions(), LLPreviewTexture::LLPreviewTexture(), LLLiveLSLEditor::loadAsset(), LLPreviewLSL::loadAsset(), LLPreviewNotecard::loadAsset(), LLPanelEstateCovenant::loadInvItem(), LLAgent::makeNewOutfit(), object_is_wearable(), LLPreview::onBtnCopyToInv(), LLFloaterProperties::onClickOwner(), LLFloaterInspect::onClickOwnerProfile(), LLPreview::onCommit(), LLWearableBridge::openItem(), operator<<(), LLInventoryItem::packBinaryBucket(), LLFolderBridge::pasteFromClipboard(), LLObjectBridge::performAction(), LLFloaterInspect::refresh(), LLFloaterProperties::refreshFromItem(), LLAgent::saveWearableAs(), send_group_notice(), LLViewerInventoryItem::updateServer(), LLHoverView::updateText(), wear_inventory_category_on_avatar_step2(), LLWearableBridge::wearOnAvatar(), and LLToolDragAndDrop::willObjectAcceptInventory().

Here is the caller graph for this function:

const LLUUID& LLPermissions::getGroup (  )  const [inline]

const LLUUID& LLPermissions::getLastOwner (  )  const [inline]

Definition at line 149 of file llpermissions.h.

References mLastOwner.

Referenced by ll_create_sd_from_permissions(), LLInventoryItem::packBinaryBucket(), and LLSelectMgr::selectGetLastOwner().

Here is the caller graph for this function:

U32 LLPermissions::getMaskBase (  )  const [inline]

U32 LLPermissions::getMaskOwner (  )  const [inline]

U32 LLPermissions::getMaskGroup (  )  const [inline]

U32 LLPermissions::getMaskEveryone (  )  const [inline]

U32 LLPermissions::getMaskNextOwner (  )  const [inline]

bool LLPermissions::isOwned (  )  const [inline]

Definition at line 158 of file llpermissions.h.

References mIsGroupOwned, mOwner, and LLUUID::notNull().

Referenced by LLAgent::allowOperation(), LLSelectNode::allowOperationOnNode(), and LLFloaterProperties::refreshFromItem().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLPermissions::isGroupOwned (  )  const [inline]

BOOL LLPermissions::getOwnership ( LLUUID &  owner_id,
BOOL &  is_group_owned 
) const

Definition at line 85 of file llpermissions.cpp.

References FALSE, mGroup, mIsGroupOwned, mOwner, LLUUID::notNull(), and TRUE.

Referenced by LLAgent::allowOperation(), LLSelectNode::allowOperationOnNode(), LLFloaterBuyContents::inventoryChanged(), LLFloaterPay::payViaObject(), and LLSelectMgr::selectGetOwner().

Here is the call graph for this function:

Here is the caller graph for this function:

LLUUID LLPermissions::getSafeOwner (  )  const

Definition at line 102 of file llpermissions.cpp.

References LLUUID::generate(), llendl, llwarns, mGroup, mIsGroupOwned, mOwner, and LLUUID::notNull().

Here is the call graph for this function:

U32 LLPermissions::getCRC32 (  )  const

Definition at line 122 of file llpermissions.cpp.

References LLUUID::getCRC32(), mCreator, mGroup, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskOwner, and mOwner.

Referenced by LLInventoryItem::getCRC32().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPermissions::fix (  ) 

void LLPermissions::set ( const LLPermissions &  permissions  ) 

void LLPermissions::setMaskBase ( U32  mask  )  [inline]

Definition at line 196 of file llpermissions.h.

References mMaskBase.

Referenced by ll_permissions_from_sd().

Here is the caller graph for this function:

void LLPermissions::setMaskOwner ( U32  mask  )  [inline]

Definition at line 197 of file llpermissions.h.

References mMaskOwner.

Referenced by ll_permissions_from_sd().

Here is the caller graph for this function:

void LLPermissions::setMaskEveryone ( U32  mask  )  [inline]

Definition at line 198 of file llpermissions.h.

References mMaskEveryone.

Referenced by ll_permissions_from_sd().

Here is the caller graph for this function:

void LLPermissions::setMaskGroup ( U32  mask  )  [inline]

Definition at line 199 of file llpermissions.h.

References mMaskGroup.

Referenced by ll_permissions_from_sd(), and SetItemOwnerAndGroup::operator()().

Here is the caller graph for this function:

void LLPermissions::setMaskNext ( U32  mask  )  [inline]

Definition at line 200 of file llpermissions.h.

References mMaskNextOwner.

Referenced by LLInventoryItem::fromLLSD(), LLWearable::importFile(), LLInventoryItem::importFile(), LLInventoryItem::importLegacyStream(), and ll_permissions_from_sd().

Here is the caller graph for this function:

void LLPermissions::accumulate ( const LLPermissions &  perm  ) 

Definition at line 200 of file llpermissions.cpp.

References fix(), mCreator, mGroup, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, and LLUUID::null.

Referenced by LLSelectMgr::selectGetPermissions().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::setOwnerAndGroup ( const LLUUID &  agent,
const LLUUID &  owner,
const LLUUID &  group,
bool  is_atomic 
)

Definition at line 230 of file llpermissions.cpp.

References FALSE, fix(), fixOwnership(), LLUUID::isNull(), mGroup, mLastOwner, mMaskBase, mMaskNextOwner, mMaskOwner, mOwner, PERM_COPY, PERM_MOVE, PERM_NONE, PERM_TRANSFER, and TRUE.

Referenced by LLViewerObject::doUpdateInventory(), and SetItemOwnerAndGroup::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::deedToGroup ( const LLUUID &  agent,
const LLUUID &  group 
)

BOOL LLPermissions::setBaseBits ( const LLUUID &  agent,
BOOL  set,
PermissionMask  bits 
)

Definition at line 301 of file llpermissions.cpp.

References FALSE, fix(), LLUUID::isNull(), mMaskBase, and TRUE.

Here is the call graph for this function:

BOOL LLPermissions::setOwnerBits ( const LLUUID &  agent,
BOOL  set,
PermissionMask  bits 
)

Definition at line 329 of file llpermissions.cpp.

References FALSE, fix(), LLUUID::isNull(), mMaskOwner, mOwner, and TRUE.

Here is the call graph for this function:

BOOL LLPermissions::setGroupBits ( const LLUUID &  agent,
const LLUUID &  group,
BOOL  set,
PermissionMask  bits 
)

Definition at line 361 of file llpermissions.cpp.

References FALSE, fix(), LLUUID::isNull(), mGroup, mMaskGroup, mOwner, and TRUE.

Referenced by SetNotForSale::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::setEveryoneBits ( const LLUUID &  agent,
const LLUUID &  group,
BOOL  set,
PermissionMask  bits 
)

Definition at line 390 of file llpermissions.cpp.

References FALSE, fix(), LLUUID::isNull(), mGroup, mMaskEveryone, mOwner, and TRUE.

Referenced by SetNotForSale::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::setNextOwnerBits ( const LLUUID &  agent,
const LLUUID &  group,
BOOL  set,
PermissionMask  bits 
)

Definition at line 419 of file llpermissions.cpp.

References FALSE, fix(), LLUUID::isNull(), mGroup, mMaskNextOwner, mOwner, PERM_COPY, PERM_TRANSFER, and TRUE.

Here is the call graph for this function:

BOOL LLPermissions::allowOperationBy ( PermissionBit  op,
const LLUUID &  agent,
const LLUUID &  group = LLUUID::null 
) const

BOOL LLPermissions::allowModifyBy ( const LLUUID &  agent_id  )  const [inline]

BOOL LLPermissions::allowCopyBy ( const LLUUID &  agent_id  )  const [inline]

BOOL LLPermissions::allowMoveBy ( const LLUUID &  agent_id  )  const [inline]

Definition at line 351 of file llpermissions.h.

References allowOperationBy(), LLUUID::null, and PERM_MOVE.

Here is the call graph for this function:

BOOL LLPermissions::allowModifyBy ( const LLUUID &  agent_id,
const LLUUID &  group 
) const [inline]

Definition at line 325 of file llpermissions.h.

References allowOperationBy(), and PERM_MODIFY.

Here is the call graph for this function:

BOOL LLPermissions::allowCopyBy ( const LLUUID &  agent_id,
const LLUUID &  group 
) const [inline]

Definition at line 330 of file llpermissions.h.

References allowOperationBy(), and PERM_COPY.

Here is the call graph for this function:

BOOL LLPermissions::allowMoveBy ( const LLUUID &  agent_id,
const LLUUID &  group 
) const [inline]

Definition at line 336 of file llpermissions.h.

References allowOperationBy(), and PERM_MOVE.

Here is the call graph for this function:

BOOL LLPermissions::allowTransferTo ( const LLUUID &  agent_id  )  const [inline]

LLSD LLPermissions::packMessage (  )  const

Definition at line 479 of file llpermissions.cpp.

References mCreator, mGroup, mIsGroupOwned, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, and S32.

Referenced by LLViewerInventoryItem::packMessage(), and LLInventoryItem::packMessage().

Here is the caller graph for this function:

void LLPermissions::unpackMessage ( LLSD  perms  ) 

Definition at line 512 of file llpermissions.cpp.

References LLSD::asBoolean(), mCreator, mGroup, mIsGroupOwned, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, and mOwner.

Referenced by LLInventoryItem::unpackMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPermissions::packMessage ( LLMessageSystem *  msg  )  const

void LLPermissions::unpackMessage ( LLMessageSystem *  msg,
const char *  block,
S32  block_num = 0 
)

BOOL LLPermissions::importFile ( LLFILE *  fp  ) 

Definition at line 547 of file llpermissions.cpp.

References BUFSIZE, fix(), fixFairUse(), init(), llendl, llinfos, mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, NULL, LLUUID::null, S32, LLUUID::set(), and TRUE.

Referenced by LLWearable::importFile(), and LLInventoryItem::importFile().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::exportFile ( LLFILE *  fp  )  const

Definition at line 651 of file llpermissions.cpp.

References mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, LLUUID::toString(), and TRUE.

Referenced by LLWearable::exportFile(), LLInventoryItem::exportFile(), and LLViewerInventoryItem::exportFileLocal().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::importLegacyStream ( std::istream &  input_stream  ) 

Definition at line 685 of file llpermissions.cpp.

References BUFSIZE, fix(), fixFairUse(), init(), llendl, llinfos, mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, LLUUID::null, S32, LLUUID::set(), and TRUE.

Referenced by LLInventoryItem::importLegacyStream().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPermissions::exportLegacyStream ( std::ostream &  output_stream  )  const

Definition at line 785 of file llpermissions.cpp.

References mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, LLUUID::toString(), and TRUE.

Referenced by LLInventoryItem::exportLegacyStream().

Here is the call graph for this function:

Here is the caller graph for this function:

LLXMLNode * LLPermissions::exportFileXML (  )  const

Definition at line 825 of file llpermissions.cpp.

References LLXMLNode::createChild(), LLXMLNode::ENCODING_HEX, FALSE, mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, mOwner, and TRUE.

Referenced by LLInventoryItem::exportFileXML().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLPermissions::importXML ( LLXMLNode *  node  ) 

Definition at line 845 of file llpermissions.cpp.

References LLXMLNode::getChild(), LLXMLNode::getName(), lldebugs, llendl, mCreator, mGroup, mIsGroupOwned, mLastOwner, mMaskBase, mMaskEveryone, mMaskGroup, mMaskNextOwner, mMaskOwner, and mOwner.

Referenced by LLInventoryItem::importXML().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLPermissions::operator== ( const LLPermissions &  rhs  )  const

bool LLPermissions::operator!= ( const LLPermissions &  rhs  )  const

const LLMetaClass & LLPermissions::getMetaClass (  )  const [virtual]

Implements LLReflective.

Definition at line 935 of file llpermissions.cpp.

References LLMetaClassT< TObject >::instance().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class LLMetaClassT< LLPermissions > [friend]

Definition at line 320 of file llpermissions.h.

std::ostream& operator<< ( std::ostream &  s,
const LLPermissions &  perm 
) [friend]

Definition at line 913 of file llpermissions.cpp.


Member Data Documentation

---------------------------------------------------------------------------- Class LLPermissions ----------------------------------------------------------------------------

Definition at line 120 of file llpermissions.h.


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:59:15 2008 for SecondLife by  doxygen 1.5.5