PageRenderTime 15ms CodeModel.GetById 2ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llinventory/lltransactionflags.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 65 lines | 29 code | 8 blank | 28 comment | 0 complexity | b765c913ef2f2e8195220de60f45a747 MD5 | raw file
 1/** 
 2 * @file lltransactionflags.h
 3 *
 4 * $LicenseInfo:firstyear=2003&license=viewerlgpl$
 5 * Second Life Viewer Source Code
 6 * Copyright (C) 2010, Linden Research, Inc.
 7 * 
 8 * This library is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation;
11 * version 2.1 of the License only.
12 * 
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 * Lesser General Public License for more details.
17 * 
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 * 
22 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
23 * $/LicenseInfo$
24 */
25
26#ifndef LL_LLTRANSACTIONFLAGS_H
27#define LL_LLTRANSACTIONFLAGS_H
28
29class LLUUID;
30
31typedef U8 TransactionFlags;
32
33// defined in common/llinventory/lltransactionflags.cpp
34extern const TransactionFlags TRANSACTION_FLAGS_NONE;
35extern const TransactionFlags TRANSACTION_FLAG_SOURCE_GROUP;
36extern const TransactionFlags TRANSACTION_FLAG_DEST_GROUP;
37extern const TransactionFlags TRANSACTION_FLAG_OWNER_GROUP;
38extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION;
39extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL;
40
41// very simple helper functions
42TransactionFlags pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group);
43BOOL is_tf_source_group(TransactionFlags flags);
44BOOL is_tf_dest_group(TransactionFlags flags);
45BOOL is_tf_owner_group(TransactionFlags flags);
46
47// stupid helper functions which should be replaced with some kind of
48// internationalizeable message.
49std::string build_transfer_message_to_source(
50	S32 amount,
51	const LLUUID& source_id,
52	const LLUUID& dest_id,
53	const std::string& dest_name,
54	S32 transaction_type,
55	const std::string& description);
56
57std::string build_transfer_message_to_destination(
58	S32 amount,
59	const LLUUID& dest_id,
60	const LLUUID& source_id,
61	const std::string& source_name,
62	S32 transaction_type,
63	const std::string& description);
64
65#endif // LL_LLTRANSACTIONFLAGS_H