diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llinventory/lltransactionflags.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp new file mode 100644 index 0000000..16d6101 --- /dev/null +++ b/linden/indra/llinventory/lltransactionflags.cpp | |||
@@ -0,0 +1,62 @@ | |||
1 | /** | ||
2 | * @file lltransactionflags.cpp | ||
3 | * @brief Some exported symbols and functions for dealing with | ||
4 | * transaction flags. | ||
5 | * | ||
6 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
7 | * | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
29 | #include "linden_common.h" | ||
30 | |||
31 | #include "lltransactionflags.h" | ||
32 | |||
33 | const U8 TRANSACTION_FLAGS_NONE = 0; | ||
34 | const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; | ||
35 | const U8 TRANSACTION_FLAG_DEST_GROUP = 2; | ||
36 | const U8 TRANSACTION_FLAG_OWNER_GROUP = 4; | ||
37 | const U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION = 8; | ||
38 | const U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL = 16; | ||
39 | |||
40 | U8 pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group) | ||
41 | { | ||
42 | U8 rv = 0; | ||
43 | if(is_source_group) rv |= TRANSACTION_FLAG_SOURCE_GROUP; | ||
44 | if(is_dest_group) rv |= TRANSACTION_FLAG_DEST_GROUP; | ||
45 | return rv; | ||
46 | } | ||
47 | |||
48 | BOOL is_tf_source_group(TransactionFlags flags) | ||
49 | { | ||
50 | return ((flags & TRANSACTION_FLAG_SOURCE_GROUP) == TRANSACTION_FLAG_SOURCE_GROUP); | ||
51 | } | ||
52 | |||
53 | BOOL is_tf_dest_group(TransactionFlags flags) | ||
54 | { | ||
55 | return ((flags & TRANSACTION_FLAG_DEST_GROUP) == TRANSACTION_FLAG_DEST_GROUP); | ||
56 | } | ||
57 | |||
58 | BOOL is_tf_owner_group(TransactionFlags flags) | ||
59 | { | ||
60 | return ((flags & TRANSACTION_FLAG_OWNER_GROUP) == TRANSACTION_FLAG_OWNER_GROUP); | ||
61 | } | ||
62 | |||