lltransactionflags.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * @file lltransactionflags.h
  3. *
  4. * $LicenseInfo:firstyear=2003&license=viewergpl$
  5. *
  6. * Copyright (c) 2003-2009, 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_LLTRANSACTIONFLAGS_H
  32. #define LL_LLTRANSACTIONFLAGS_H
  33. class LLUUID;
  34. typedef U8 TransactionFlags;
  35. constexpr U8 TRANSACTION_FLAGS_NONE = 0;
  36. constexpr U8 TRANSACTION_FLAG_SOURCE_GROUP = 1;
  37. constexpr U8 TRANSACTION_FLAG_DEST_GROUP = 2;
  38. constexpr U8 TRANSACTION_FLAG_OWNER_GROUP = 4;
  39. constexpr U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION = 8;
  40. constexpr U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL = 16;
  41. // very simple helper functions
  42. TransactionFlags pack_transaction_flags(bool is_source_group,
  43. bool is_dest_group);
  44. // stupid helper functions which should be replaced with some kind of
  45. // internationalizeable message.
  46. std::string build_transfer_message_to_source(S32 amount,
  47. const LLUUID& source_id,
  48. const LLUUID& dest_id,
  49. const std::string& dest_name,
  50. S32 transaction_type,
  51. const std::string& description);
  52. std::string build_transfer_message_to_destination(S32 amount,
  53. const LLUUID& dest_id,
  54. const LLUUID& source_id,
  55. const std::string& source_name,
  56. S32 transaction_type,
  57. const std::string& description);
  58. #endif // LL_LLTRANSACTIONFLAGS_H