PageRenderTime 32ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llinventory/llinventorydefines.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 100 lines | 35 code | 13 blank | 52 comment | 0 complexity | c5ec48eb3f7edf77cb0ca37692f3e517 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llinventorydefines.h
  3. * @brief LLInventoryDefines
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLINVENTORYDEFINES_H
  27. #define LL_LLINVENTORYDEFINES_H
  28. // Consts for "key" field in the task inventory update message
  29. extern const U8 TASK_INVENTORY_ITEM_KEY;
  30. extern const U8 TASK_INVENTORY_ASSET_KEY;
  31. // Max inventory buffer size (for use in packBinaryBucket)
  32. enum
  33. {
  34. MAX_INVENTORY_BUFFER_SIZE = 1024
  35. };
  36. //--------------------------------------------------------------------
  37. // Inventory item flags enums
  38. // The shared flags at the top are shared among all inventory
  39. // types. After that section, all values of flags are type
  40. // dependent. The shared flags will start at 2^30 and work
  41. // down while item type specific flags will start at 2^0 and work up.
  42. //--------------------------------------------------------------------
  43. class LLInventoryItemFlags
  44. {
  45. public:
  46. enum EType
  47. {
  48. II_FLAGS_NONE = 0,
  49. II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
  50. // The asset has only one reference in the system. If the
  51. // inventory item is deleted, or the assetid updated, then we
  52. // can remove the old reference.
  53. II_FLAGS_LANDMARK_VISITED = 1,
  54. II_FLAGS_OBJECT_SLAM_PERM = 0x100,
  55. // Object permissions should have next owner perm be more
  56. // restrictive on rez. We bump this into the second byte of the
  57. // flags since the low byte is used to track attachment points.
  58. II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
  59. // The object sale information has been changed.
  60. II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
  61. II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
  62. II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
  63. II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
  64. II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
  65. // Specify which permissions masks to overwrite
  66. // upon rez. Normally, if no permissions slam (above) or
  67. // overwrite flags are set, the asset's permissions are
  68. // used and the inventory's permissions are ignored. If
  69. // any of these flags are set, the inventory's permissions
  70. // take precedence.
  71. II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
  72. // Whether a returned object is composed of multiple items.
  73. II_FLAGS_WEARABLES_MASK = 0xff,
  74. // Wearables use the low order byte of flags to store the
  75. // LLWearableType::EType enumeration found in newview/llwearable.h
  76. II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
  77. II_FLAGS_OBJECT_SLAM_SALE |
  78. II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
  79. II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
  80. II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
  81. II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
  82. II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
  83. // These bits need to be cleared whenever the asset_id is updated
  84. // on a pre-existing inventory item (DEV-28098 and DEV-30997)
  85. };
  86. };
  87. #endif // LL_LLINVENTORYDEFINES_H