PageRenderTime 31ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llinventory/llpermissionsflags.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 93 lines | 18 code | 19 blank | 56 comment | 0 complexity | 49e36b075978e7c59e749af23b2d0a72 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpermissionsflags.h
  3. *
  4. * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  5. * Second Life Viewer Source Code
  6. * Copyright (C) 2010, Linden Research, Inc.
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation;
  11. * version 2.1 of the License only.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. *
  22. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  23. * $/LicenseInfo$
  24. */
  25. #ifndef LL_LLPERMISSIONSFLAGS_H
  26. #define LL_LLPERMISSIONSFLAGS_H
  27. // Flags for various permissions bits.
  28. // Shared between viewer and simulator.
  29. // permission bits
  30. typedef U32 PermissionMask;
  31. typedef U32 PermissionBit;
  32. // Do you have permission to transfer ownership of the object or
  33. // item. Fair use rules dictate that if you cannot copy, you can
  34. // always transfer.
  35. const PermissionBit PERM_TRANSFER = (1 << 13); // 0x00002000
  36. // objects, scale or change textures
  37. // parcels, allow building on it
  38. const PermissionBit PERM_MODIFY = (1 << 14); // 0x00004000
  39. // objects, allow copy
  40. const PermissionBit PERM_COPY = (1 << 15); // 0x00008000
  41. // parcels, allow entry, deprecated
  42. //const PermissionBit PERM_ENTER = (1 << 16); // 0x00010000
  43. // parcels, allow terraform, deprecated
  44. //const PermissionBit PERM_TERRAFORM = (1 << 17); // 0x00020000
  45. // NOTA BENE: This flag is NO LONGER USED!!! However, it is possible that some
  46. // objects in the universe have it set so DON"T USE IT going forward.
  47. //const PermissionBit PERM_OWNER_DEBIT = (1 << 18); // 0x00040000
  48. // objects, can grab/translate/rotate
  49. const PermissionBit PERM_MOVE = (1 << 19); // 0x00080000
  50. // parcels, avatars take damage, deprecated
  51. //const PermissionBit PERM_DAMAGE = (1 << 20); // 0x00100000
  52. // don't use bit 31 -- printf/scanf with "%x" assume signed numbers
  53. const PermissionBit PERM_RESERVED = ((U32)1) << 31;
  54. const PermissionMask PERM_NONE = 0x00000000;
  55. const PermissionMask PERM_ALL = 0x7FFFFFFF;
  56. //const PermissionMask PERM_ALL_PARCEL = PERM_MODIFY | PERM_ENTER | PERM_TERRAFORM | PERM_DAMAGE;
  57. const PermissionMask PERM_ITEM_UNRESTRICTED = PERM_MODIFY | PERM_COPY | PERM_TRANSFER;
  58. // Useful stuff for transmission.
  59. // Which permissions field are we trying to change?
  60. const U8 PERM_BASE = 0x01;
  61. // TODO: Add another PERM_OWNER operation type for allowOperationBy DK 04/03/06
  62. const U8 PERM_OWNER = 0x02;
  63. const U8 PERM_GROUP = 0x04;
  64. const U8 PERM_EVERYONE = 0x08;
  65. const U8 PERM_NEXT_OWNER = 0x10;
  66. // This is just a quickie debugging key
  67. // no modify: PERM_ALL & ~PERM_MODIFY = 0x7fffbfff
  68. // no copy: PERM_ALL & ~PERM_COPY = 0x7fff7fff
  69. // no modify or copy: = 0x7fff3fff
  70. // no transfer: PERM_ALL & ~PERM_TRANSFER = 0x7fffdfff
  71. // no modify, no transfer = 0x7fff9fff
  72. // no copy, no transfer (INVALID!) = 0x7fff5fff
  73. // no modify, no copy, no transfer (INVALID!) = 0x7fff1fff
  74. #endif