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