PageRenderTime 15ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 2ms 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
  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
 27#ifndef LL_LLINVENTORYDEFINES_H
 28#define LL_LLINVENTORYDEFINES_H
 29
 30// Consts for "key" field in the task inventory update message
 31extern const U8 TASK_INVENTORY_ITEM_KEY;
 32extern const U8 TASK_INVENTORY_ASSET_KEY;
 33
 34// Max inventory buffer size (for use in packBinaryBucket)
 35enum
 36{
 37	MAX_INVENTORY_BUFFER_SIZE = 1024
 38};
 39
 40//--------------------------------------------------------------------
 41// Inventory item flags enums
 42//   The shared flags at the top are shared among all inventory
 43//   types. After that section, all values of flags are type
 44//   dependent.  The shared flags will start at 2^30 and work
 45//   down while item type specific flags will start at 2^0 and work up.
 46//--------------------------------------------------------------------
 47class LLInventoryItemFlags
 48{
 49public:
 50	enum EType
 51	{
 52		II_FLAGS_NONE 								= 0,
 53		
 54		II_FLAGS_SHARED_SINGLE_REFERENCE 			= 0x40000000,
 55			// The asset has only one reference in the system. If the 
 56			// inventory item is deleted, or the assetid updated, then we 
 57			// can remove the old reference.
 58		
 59		II_FLAGS_LANDMARK_VISITED 					= 1,
 60
 61		II_FLAGS_OBJECT_SLAM_PERM 					= 0x100,
 62			// Object permissions should have next owner perm be more 
 63			// restrictive on rez. We bump this into the second byte of the 
 64			// flags since the low byte is used to track attachment points.
 65
 66		II_FLAGS_OBJECT_SLAM_SALE 					= 0x1000,
 67			// The object sale information has been changed.
 68		
 69		II_FLAGS_OBJECT_PERM_OVERWRITE_BASE			= 0x010000,
 70		II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER		= 0x020000,
 71		II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP		= 0x040000,
 72		II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE		= 0x080000,
 73		II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER	= 0x100000,
 74			// Specify which permissions masks to overwrite
 75			// upon rez.  Normally, if no permissions slam (above) or
 76			// overwrite flags are set, the asset's permissions are
 77			// used and the inventory's permissions are ignored.  If
 78			// any of these flags are set, the inventory's permissions
 79			// take precedence.
 80
 81		II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS			= 0x200000,
 82			// Whether a returned object is composed of multiple items.
 83
 84		II_FLAGS_WEARABLES_MASK = 0xff,
 85			// Wearables use the low order byte of flags to store the
 86			// LLWearableType::EType enumeration found in newview/llwearable.h
 87
 88		II_FLAGS_PERM_OVERWRITE_MASK = 				(II_FLAGS_OBJECT_SLAM_PERM |
 89													 II_FLAGS_OBJECT_SLAM_SALE |
 90													 II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
 91													 II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
 92													 II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
 93													 II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
 94													 II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
 95			// These bits need to be cleared whenever the asset_id is updated
 96			// on a pre-existing inventory item (DEV-28098 and DEV-30997)
 97	};
 98};
 99
100#endif // LL_LLINVENTORYDEFINES_H