PageRenderTime 87ms CodeModel.GetById 33ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/llfoldertype.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 111 lines | 49 code | 31 blank | 31 comment | 0 complexity | f815fa76516a996eca2d3f52a449795e MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfoldertype.h
  3. * @brief Declaration of LLFolderType.
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLFOLDERTYPE_H
  27. #define LL_LLFOLDERTYPE_H
  28. #include <string>
  29. #include "llassettype.h"
  30. // This class handles folder types (similar to assettype, except for folders)
  31. // and operations on those.
  32. class LL_COMMON_API LLFolderType
  33. {
  34. public:
  35. // ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums.
  36. enum EType
  37. {
  38. FT_TEXTURE = 0,
  39. FT_SOUND = 1,
  40. FT_CALLINGCARD = 2,
  41. FT_LANDMARK = 3,
  42. FT_CLOTHING = 5,
  43. FT_OBJECT = 6,
  44. FT_NOTECARD = 7,
  45. FT_ROOT_INVENTORY = 8,
  46. // We'd really like to change this to 9 since AT_CATEGORY is 8,
  47. // but "My Inventory" has been type 8 for a long time.
  48. FT_LSL_TEXT = 10,
  49. FT_BODYPART = 13,
  50. FT_TRASH = 14,
  51. FT_SNAPSHOT_CATEGORY = 15,
  52. FT_LOST_AND_FOUND = 16,
  53. FT_ANIMATION = 20,
  54. FT_GESTURE = 21,
  55. FT_FAVORITE = 23,
  56. FT_ENSEMBLE_START = 26,
  57. FT_ENSEMBLE_END = 45,
  58. // This range is reserved for special clothing folder types.
  59. FT_CURRENT_OUTFIT = 46,
  60. FT_OUTFIT = 47,
  61. FT_MY_OUTFITS = 48,
  62. FT_MESH = 49,
  63. FT_INBOX = 50,
  64. FT_OUTBOX = 51,
  65. FT_BASIC_ROOT = 52,
  66. FT_COUNT,
  67. FT_NONE = -1
  68. };
  69. static EType lookup(const std::string& type_name);
  70. static const std::string& lookup(EType folder_type);
  71. static bool lookupIsProtectedType(EType folder_type);
  72. static bool lookupIsEnsembleType(EType folder_type);
  73. static LLAssetType::EType folderTypeToAssetType(LLFolderType::EType folder_type);
  74. static LLFolderType::EType assetTypeToFolderType(LLAssetType::EType asset_type);
  75. static const std::string& badLookup(); // error string when a lookup fails
  76. protected:
  77. LLFolderType() {}
  78. ~LLFolderType() {}
  79. };
  80. #endif // LL_LLFOLDERTYPE_H