summaryrefslogtreecommitdiff
path: root/indra/llcommon/llassettype.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llassettype.h')
-rw-r--r--indra/llcommon/llassettype.h170
1 files changed, 98 insertions, 72 deletions
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 4077b8d2c1..5c30c8354f 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -30,8 +30,8 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLASSETTYPE
-#define LL_LLASSETTYPE
+#ifndef LL_LLASSETTYPE_H
+#define LL_LLASSETTYPE_H
#include <string>
@@ -42,137 +42,163 @@ class LLAssetType
public:
enum EType
{
- // Used for painting the faces of geometry.
- // Stored in typical j2c stream format
AT_TEXTURE = 0,
+ // Used for painting the faces of geometry.
+ // Stored in typical j2c stream format.
- // Used to fill the aural spectrum.
AT_SOUND = 1,
+ // Used to fill the aural spectrum.
- // Links instant message access to the user on the card. eg, a
- // card for yourself, a card for linden support, a card for
- // the guy you were talking to in the coliseum.
AT_CALLINGCARD = 2,
+ // Links instant message access to the user on the card.
+ // : E.G. A card for yourself, for linden support, for
+ // : the guy you were talking to in the coliseum.
- // Links to places in the world with location and a screen
- // shot or image saved. eg, home, linden headquarters, the
- // coliseum, or destinations where we want to increase
- // traffic.
AT_LANDMARK = 3,
+ // Links to places in the world with location and a screen shot or image saved.
+ // : E.G. Home, linden headquarters, the coliseum, destinations where
+ // : we want to increase traffic.
- // Valid scripts that can be attached to an object. eg. open a
- // door, jump into the air.
AT_SCRIPT = 4,
+ // Valid scripts that can be attached to an object.
+ // : E.G. Open a door, jump into the air.
- // A collection of textures and parameters that can be worn
- // by an avatar.
AT_CLOTHING = 5,
+ // A collection of textures and parameters that can be worn by an avatar.
- // Any combination of textures, sounds, and scripts that are
- // associated with a fixed piece of geometry. eg, a hot tub, a
- // house with working door.
AT_OBJECT = 6,
+ // Any combination of textures, sounds, and scripts that are
+ // associated with a fixed piece of geometry.
+ // : E.G. A hot tub, a house with working door.
- // Just text
AT_NOTECARD = 7,
+ // Just text.
- // A category holds a collection of inventory items. It's
- // treated as an item in the inventory, and therefore needs a
- // type.
AT_CATEGORY = 8,
+ // Holds a collection of inventory items.
+ // It's treated as an item in the inventory and therefore needs a type.
- // A root category is a user's root inventory category. We
- // decided to expose it visually, so it seems logical to fold
- // it into the asset types.
AT_ROOT_CATEGORY = 9,
+ // A user's root inventory category.
+ // We decided to expose it visually, so it seems logical to fold
+ // it into the asset types.
- // The LSL is the brand spanking new scripting language. We've
- // split it into a text and bytecode representation.
AT_LSL_TEXT = 10,
AT_LSL_BYTECODE = 11,
+ // The LSL is the scripting language.
+ // We've split it into a text and bytecode representation.
- // uncompressed TGA texture
AT_TEXTURE_TGA = 12,
+ // Uncompressed TGA texture.
- // A collection of textures and parameters that can be worn
- // by an avatar.
AT_BODYPART = 13,
+ // A collection of textures and parameters that can be worn by an avatar.
- // This asset type is meant to only be used as a marker for a
- // category preferred type. Using this, we can throw things in
- // the trash before completely deleting.
AT_TRASH = 14,
+ // Only to be used as a marker for a category preferred type.
+ // Using this, we can throw things in the trash before completely deleting.
- // This is a marker for a folder meant for snapshots. No
- // actual assets will be snapshots, though if there were, you
- // could interpret them as textures.
AT_SNAPSHOT_CATEGORY = 15,
+ // A marker for a folder meant for snapshots.
+ // No actual assets will be snapshots, though if there were, you
+ // could interpret them as textures.
- // This is used to stuff lost&found items into
AT_LOST_AND_FOUND = 16,
+ // Used to stuff lost&found items into.
- // uncompressed sound
AT_SOUND_WAV = 17,
+ // Uncompressed sound.
- // uncompressed image, non-square, and not appropriate for use
- // as a texture.
AT_IMAGE_TGA = 18,
+ // Uncompressed image, non-square.
+ // Not appropriate for use as a texture.
- // compressed image, non-square, and not appropriate for use
- // as a texture.
AT_IMAGE_JPEG = 19,
+ // Compressed image, non-square.
+ // Not appropriate for use as a texture.
- // animation
AT_ANIMATION = 20,
+ // Animation.
- // gesture, sequence of animations, sounds, chat, wait steps
AT_GESTURE = 21,
+ // Gesture, sequence of animations, sounds, chat, wait steps.
- // simstate file
AT_SIMSTATE = 22,
+ // Simstate file.
- // +*********************************************+
- // | TO ADD AN ELEMENT TO THIS ENUM: |
- // +*********************************************+
- // | 1. INSERT BEFORE AT_COUNT |
- // | 2. INCREMENT AT_COUNT BY 1 |
- // | 3. ADD TO LLAssetType::mAssetTypeNames |
- // | 4. ADD TO LLAssetType::mAssetTypeHumanNames |
- // +*********************************************+
+ AT_FAVORITE = 23,
+ // favorite items
- AT_COUNT = 23,
+ AT_LINK = 24,
+ // Inventory symbolic link
+
+ AT_LINK_FOLDER = 25,
+ // Inventory folder link
+
+ AT_FOLDER_ENSEMBLE_START = 26,
+ AT_FOLDER_ENSEMBLE_END = 45,
+ // This range is reserved for special clothing folder types.
+
+ AT_CURRENT_OUTFIT = 46,
+ // Current outfit
+
+ AT_OUTFIT = 47,
+ // Predefined outfit ("look")
+
+ AT_MY_OUTFITS = 48,
+ // Folder that holds your outfits.
+
+
+ AT_COUNT = 49,
+
+ // +*********************************************************+
+ // | TO ADD AN ELEMENT TO THIS ENUM: |
+ // +*********************************************************+
+ // | 1. INSERT BEFORE AT_COUNT |
+ // | 2. INCREMENT AT_COUNT BY 1 |
+ // | 3. ADD TO LLAssetDictionary in LLAssetType.cpp |
+ // | 3. ADD TO DEFAULT_ASSET_FOR_INV in LLInventoryType.cpp |
+ // +*********************************************************+
AT_NONE = -1
};
// machine transation between type and strings
- static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
- static EType lookup(const std::string& name);
- static const char* lookup(EType type);
+ static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
+ static EType lookup(const std::string& type_name);
+ static const char* lookup(EType asset_type);
// translation from a type to a human readable form.
- static EType lookupHumanReadable( const char* name ); // safe conversion to std::string, *TODO: deprecate
- static EType lookupHumanReadable( const std::string& name );
- static const char* lookupHumanReadable(EType type);
-
- static EDragAndDropType lookupDragAndDropType( EType );
+ static EType lookupHumanReadable(const char* desc_name); // safe conversion to std::string, *TODO: deprecate
+ static EType lookupHumanReadable(const std::string& readable_name);
+ static const char* lookupHumanReadable(EType asset_type);
// Generate a good default description. You may want to add a verb
// or agent name after this depending on your application.
- static void generateDescriptionFor(LLAssetType::EType type,
- std::string& desc);
+ static void generateDescriptionFor(LLAssetType::EType asset_type,
+ std::string& description);
+
+ static EType getType(const std::string& desc_name);
+ static const std::string& getDesc(EType asset_type);
+ static EDragAndDropType lookupDragAndDropType(EType asset_type);
+
+ static bool lookupCanLink(EType asset_type);
+ static bool lookupIsLinkType(EType asset_type);
- static EType getType(const std::string& sin);
- static std::string getDesc(EType type);
+ static const char* lookupCategoryName(EType asset_type);
+ static bool lookupIsProtectedCategoryType(EType asset_type);
+
+ /* TODO: Change return types from "const char *" to "const std::string &".
+ This is fairly straightforward, but requires changing some calls to use .c_str().
+ e.g.:
+ - fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
+ + fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType).c_str());
+ */
private:
// don't instantiate or derive one of these objects
LLAssetType( void ) {}
~LLAssetType( void ) {}
-
-private:
- static const char* mAssetTypeNames[];
- static const char* mAssetTypeHumanNames[];
};
-#endif // LL_LLASSETTYPE
+#endif // LL_LLASSETTYPE_H