PageRenderTime 57ms CodeModel.GetById 15ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLTRANSACTIONFLAGS_H
  26. #define LL_LLTRANSACTIONFLAGS_H
  27. class LLUUID;
  28. typedef U8 TransactionFlags;
  29. // defined in common/llinventory/lltransactionflags.cpp
  30. extern const TransactionFlags TRANSACTION_FLAGS_NONE;
  31. extern const TransactionFlags TRANSACTION_FLAG_SOURCE_GROUP;
  32. extern const TransactionFlags TRANSACTION_FLAG_DEST_GROUP;
  33. extern const TransactionFlags TRANSACTION_FLAG_OWNER_GROUP;
  34. extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION;
  35. extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL;
  36. // very simple helper functions
  37. TransactionFlags pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group);
  38. BOOL is_tf_source_group(TransactionFlags flags);
  39. BOOL is_tf_dest_group(TransactionFlags flags);
  40. BOOL is_tf_owner_group(TransactionFlags flags);
  41. // stupid helper functions which should be replaced with some kind of
  42. // internationalizeable message.
  43. std::string build_transfer_message_to_source(
  44. S32 amount,
  45. const LLUUID& source_id,
  46. const LLUUID& dest_id,
  47. const std::string& dest_name,
  48. S32 transaction_type,
  49. const std::string& description);
  50. std::string build_transfer_message_to_destination(
  51. S32 amount,
  52. const LLUUID& dest_id,
  53. const LLUUID& source_id,
  54. const std::string& source_name,
  55. S32 transaction_type,
  56. const std::string& description);
  57. #endif // LL_LLTRANSACTIONFLAGS_H