llpermissionsflags.h

Go to the documentation of this file.
00001 
00031 #ifndef LL_LLPERMISSIONSFLAGS_H
00032 #define LL_LLPERMISSIONSFLAGS_H
00033 
00034 // llpermissionsflags.h
00035 // Copyright 2002, Linden Research, Inc.
00036 //
00037 // Flags for various permissions bits.
00038 // Shared between viewer and simulator.
00039 
00040 // permission bits
00041 typedef U32 PermissionMask;
00042 typedef U32 PermissionBit;
00043 
00044 
00045 // Do you have permission to transfer ownership of the object or
00046 // item. Fair use rules dictate that if you cannot copy, you can
00047 // always transfer.
00048 const PermissionBit PERM_TRANSFER           = (1 << 13); // 0x00002000
00049 
00050 // objects, scale or change textures
00051 // parcels, allow building on it
00052 const PermissionBit PERM_MODIFY                         = (1 << 14); // 0x00004000
00053 
00054 // objects, allow copy
00055 const PermissionBit PERM_COPY                           = (1 << 15); // 0x00008000
00056 
00057 // parcels, allow entry, deprecated
00058 //const PermissionBit PERM_ENTER                        = (1 << 16); // 0x00010000
00059 
00060 // parcels, allow terraform, deprecated
00061 //const PermissionBit PERM_TERRAFORM            = (1 << 17); // 0x00020000
00062 
00063 // NOTA BENE: This flag is NO LONGER USED!!! However, it is possible that some 
00064 // objects in the universe have it set so DON"T USE IT going forward.
00065 //const PermissionBit PERM_OWNER_DEBIT          = (1 << 18); // 0x00040000
00066 
00067 // objects, can grab/translate/rotate
00068 const PermissionBit PERM_MOVE                           = (1 << 19); // 0x00080000
00069 
00070 // parcels, avatars take damage, deprecated
00071 //const PermissionBit   PERM_DAMAGE                     = (1 << 20); // 0x00100000
00072 
00073 // don't use bit 31 -- printf/scanf with "%x" assume signed numbers
00074 const PermissionBit PERM_RESERVED                       = ((U32)1) << 31;
00075 
00076 const PermissionMask PERM_NONE                          = 0x00000000;
00077 const PermissionMask PERM_ALL                           = 0x7FFFFFFF;
00078 //const PermissionMask PERM_ALL_PARCEL          = PERM_MODIFY | PERM_ENTER | PERM_TERRAFORM | PERM_DAMAGE;
00079 const PermissionMask PERM_ITEM_UNRESTRICTED =  PERM_MODIFY | PERM_COPY | PERM_TRANSFER;
00080 
00081 
00082 // Useful stuff for transmission.
00083 // Which permissions field are we trying to change?
00084 const U8 PERM_BASE              = 0x01;
00085 // TODO: Add another PERM_OWNER operation type for allowOperationBy  DK 04/03/06
00086 const U8 PERM_OWNER             = 0x02;
00087 const U8 PERM_GROUP             = 0x04;
00088 const U8 PERM_EVERYONE  = 0x08;
00089 const U8 PERM_NEXT_OWNER = 0x10;
00090 
00091 // This is just a quickie debugging key
00092 // no modify: PERM_ALL & ~PERM_MODIFY                  = 0x7fffbfff 
00093 // no copy:   PERM_ALL & ~PERM_COPY                    = 0x7fff7fff
00094 // no modify or copy:                                  = 0x7fff3fff
00095 // no transfer: PERM_ALL & ~PERM_TRANSFER              = 0x7fffdfff
00096 // no modify, no transfer                              = 0x7fff9fff
00097 // no copy, no transfer (INVALID!)                     = 0x7fff5fff
00098 // no modify, no copy, no transfer (INVALID!)          = 0x7fff1fff
00099 
00100 
00101 #endif

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