llpermissionsflags.h
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:4k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2.  * @file llpermissionsflags.h
  3.  *
  4.  * $LicenseInfo:firstyear=2002&license=viewergpl$
  5.  * 
  6.  * Copyright (c) 2002-2010, Linden Research, Inc.
  7.  * 
  8.  * Second Life Viewer Source Code
  9.  * The source code in this file ("Source Code") is provided by Linden Lab
  10.  * to you under the terms of the GNU General Public License, version 2.0
  11.  * ("GPL"), unless you have obtained a separate licensing agreement
  12.  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  13.  * the GPL can be found in doc/GPL-license.txt in this distribution, or
  14.  * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  15.  * 
  16.  * There are special exceptions to the terms and conditions of the GPL as
  17.  * it is applied to this Source Code. View the full text of the exception
  18.  * in the file doc/FLOSS-exception.txt in this software distribution, or
  19.  * online at
  20.  * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  21.  * 
  22.  * By copying, modifying or distributing this software, you acknowledge
  23.  * that you have read and understood your obligations described above,
  24.  * and agree to abide by those obligations.
  25.  * 
  26.  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  27.  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  28.  * COMPLETENESS OR PERFORMANCE.
  29.  * $/LicenseInfo$
  30.  */
  31. #ifndef LL_LLPERMISSIONSFLAGS_H
  32. #define LL_LLPERMISSIONSFLAGS_H
  33. // Flags for various permissions bits.
  34. // Shared between viewer and simulator.
  35. // permission bits
  36. typedef U32 PermissionMask;
  37. typedef U32 PermissionBit;
  38. // Do you have permission to transfer ownership of the object or
  39. // item. Fair use rules dictate that if you cannot copy, you can
  40. // always transfer.
  41. const PermissionBit PERM_TRANSFER           = (1 << 13); // 0x00002000
  42. // objects, scale or change textures
  43. // parcels, allow building on it
  44. const PermissionBit PERM_MODIFY = (1 << 14); // 0x00004000
  45. // objects, allow copy
  46. const PermissionBit PERM_COPY = (1 << 15); // 0x00008000
  47. // parcels, allow entry, deprecated
  48. //const PermissionBit PERM_ENTER = (1 << 16); // 0x00010000
  49. // parcels, allow terraform, deprecated
  50. //const PermissionBit PERM_TERRAFORM = (1 << 17); // 0x00020000
  51. // NOTA BENE: This flag is NO LONGER USED!!! However, it is possible that some 
  52. // objects in the universe have it set so DON"T USE IT going forward.
  53. //const PermissionBit PERM_OWNER_DEBIT = (1 << 18); // 0x00040000
  54. // objects, can grab/translate/rotate
  55. const PermissionBit PERM_MOVE = (1 << 19); // 0x00080000
  56. // parcels, avatars take damage, deprecated
  57. //const PermissionBit PERM_DAMAGE = (1 << 20); // 0x00100000
  58. // don't use bit 31 -- printf/scanf with "%x" assume signed numbers
  59. const PermissionBit PERM_RESERVED = ((U32)1) << 31;
  60. const PermissionMask PERM_NONE = 0x00000000;
  61. const PermissionMask PERM_ALL = 0x7FFFFFFF;
  62. //const PermissionMask PERM_ALL_PARCEL  = PERM_MODIFY | PERM_ENTER | PERM_TERRAFORM | PERM_DAMAGE;
  63. const PermissionMask PERM_ITEM_UNRESTRICTED =  PERM_MODIFY | PERM_COPY | PERM_TRANSFER;
  64. // Useful stuff for transmission.
  65. // Which permissions field are we trying to change?
  66. const U8 PERM_BASE = 0x01;
  67. // TODO: Add another PERM_OWNER operation type for allowOperationBy  DK 04/03/06
  68. const U8 PERM_OWNER = 0x02;
  69. const U8 PERM_GROUP = 0x04;
  70. const U8 PERM_EVERYONE = 0x08;
  71. const U8 PERM_NEXT_OWNER = 0x10;
  72. // This is just a quickie debugging key
  73. // no modify: PERM_ALL & ~PERM_MODIFY                  = 0x7fffbfff 
  74. // no copy:   PERM_ALL & ~PERM_COPY                    = 0x7fff7fff
  75. // no modify or copy:                                  = 0x7fff3fff
  76. // no transfer: PERM_ALL & ~PERM_TRANSFER              = 0x7fffdfff
  77. // no modify, no transfer                              = 0x7fff9fff
  78. // no copy, no transfer (INVALID!)                     = 0x7fff5fff
  79. // no modify, no copy, no transfer (INVALID!)          = 0x7fff1fff
  80. #endif