PageRenderTime 27ms CodeModel.GetById 16ms app.highlight 7ms 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
  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
 27#ifndef LL_LLFOLDERTYPE_H
 28#define LL_LLFOLDERTYPE_H
 29
 30#include <string>
 31#include "llassettype.h"
 32
 33// This class handles folder types (similar to assettype, except for folders)
 34// and operations on those.
 35class LL_COMMON_API LLFolderType
 36{
 37public:
 38	// ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums.
 39	enum EType
 40	{
 41		FT_TEXTURE = 0,
 42
 43		FT_SOUND = 1, 
 44
 45		FT_CALLINGCARD = 2,
 46
 47		FT_LANDMARK = 3,
 48
 49		FT_CLOTHING = 5,
 50
 51		FT_OBJECT = 6,
 52
 53		FT_NOTECARD = 7,
 54
 55		FT_ROOT_INVENTORY = 8,
 56			// We'd really like to change this to 9 since AT_CATEGORY is 8,
 57			// but "My Inventory" has been type 8 for a long time.
 58
 59		FT_LSL_TEXT = 10,
 60
 61		FT_BODYPART = 13,
 62
 63		FT_TRASH = 14,
 64
 65		FT_SNAPSHOT_CATEGORY = 15,
 66
 67		FT_LOST_AND_FOUND = 16,
 68
 69		FT_ANIMATION = 20,
 70
 71		FT_GESTURE = 21,
 72
 73		FT_FAVORITE = 23,
 74
 75		FT_ENSEMBLE_START = 26,
 76		FT_ENSEMBLE_END = 45,
 77			// This range is reserved for special clothing folder types.
 78
 79		FT_CURRENT_OUTFIT = 46,
 80		FT_OUTFIT = 47,
 81		FT_MY_OUTFITS = 48,
 82		
 83		FT_MESH = 49,
 84
 85		FT_INBOX = 50,
 86		FT_OUTBOX = 51,
 87
 88		FT_BASIC_ROOT = 52,
 89
 90		FT_COUNT,
 91
 92		FT_NONE = -1
 93	};
 94
 95	static EType 				lookup(const std::string& type_name);
 96	static const std::string&	lookup(EType folder_type);
 97
 98	static bool 				lookupIsProtectedType(EType folder_type);
 99	static bool 				lookupIsEnsembleType(EType folder_type);
100
101	static LLAssetType::EType	folderTypeToAssetType(LLFolderType::EType folder_type);
102	static LLFolderType::EType	assetTypeToFolderType(LLAssetType::EType asset_type);
103
104	static const std::string&	badLookup(); // error string when a lookup fails
105
106protected:
107	LLFolderType() {}
108	~LLFolderType() {}
109};
110
111#endif // LL_LLFOLDERTYPE_H