summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rw-r--r--indra/newview/llviewerinventory.h52
1 files changed, 49 insertions, 3 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 1ddf8a58f9..c4ff30bbfc 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -37,6 +37,10 @@
#include "llframetimer.h"
#include "llwearable.h"
+class LLFolderView;
+class LLFolderBridge;
+class LLViewerInventoryCategory;
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLViewerInventoryItem
//
@@ -44,15 +48,34 @@
// their inventory.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLViewerInventoryItem : public LLInventoryItem
+class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::trackable
{
public:
typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
protected:
~LLViewerInventoryItem( void ); // ref counted
+ BOOL extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const;
+ static char getSeparator() { return '@'; }
+ mutable std::string mDisplayName;
public:
+ virtual LLAssetType::EType getType() const;
+ virtual const LLUUID& getAssetUUID() const;
+ virtual const std::string& getName() const;
+ virtual const std::string& getDisplayName() const;
+ virtual S32 getSortField() const;
+ virtual void setSortField(S32 sortField);
+ virtual void rename(const std::string& new_name);
+ virtual const LLPermissions& getPermissions() const;
+ virtual const LLUUID& getCreatorUUID() const;
+ virtual const std::string& getDescription() const;
+ virtual const LLSaleInfo& getSaleInfo() const;
+ virtual LLInventoryType::EType getInventoryType() const;
+ virtual U32 getFlags() const;
+ virtual time_t getCreationDate() const;
+ virtual U32 getCRC32() const; // really more of a checksum.
+
// construct a complete viewer inventory item
LLViewerInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid,
const LLPermissions& permissions,
@@ -125,7 +148,14 @@ public:
};
LLTransactionID getTransactionID() const { return mTransactionID; }
-protected:
+ bool getIsBrokenLink() const; // true if the baseitem this points to doesn't exist in memory.
+ const LLViewerInventoryItem *getLinkedItem() const;
+ const LLViewerInventoryCategory *getLinkedCategory() const;
+
+ // callback
+ void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name);
+
+public:
BOOL mIsComplete;
LLTransactionID mTransactionID;
};
@@ -184,7 +214,8 @@ public:
// other than cacheing.
bool exportFileLocal(LLFILE* fp) const;
bool importFileLocal(LLFILE* fp);
-
+ void determineFolderType();
+ void changeType(LLAssetType::EType new_folder_type);
protected:
LLUUID mOwnerID;
S32 mVersion;
@@ -253,6 +284,7 @@ extern LLInventoryCallbackManager gInventoryCallbacks;
#define NOT_WEARABLE (EWearableType)0
+// *TODO: Find a home for these
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
const LLUUID& parent, const LLTransactionID& transaction_id,
const std::string& name,
@@ -261,6 +293,8 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb);
+void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent = LLUUID::null, LLPointer<LLInventoryCallback> cb=NULL);
+
/**
* @brief Securely create a new inventory item by copying from another.
*/
@@ -272,6 +306,14 @@ void copy_inventory_item(
const std::string& new_name,
LLPointer<LLInventoryCallback> cb);
+void link_inventory_item(
+ const LLUUID& agent_id,
+ const LLUUID& item_id,
+ const LLUUID& parent_id,
+ const std::string& new_name,
+ const LLAssetType::EType asset_type,
+ LLPointer<LLInventoryCallback> cb);
+
void move_inventory_item(
const LLUUID& agent_id,
const LLUUID& session_id,
@@ -286,4 +328,8 @@ void copy_inventory_from_notecard(const LLUUID& object_id,
U32 callback_id = 0);
+void menu_create_inventory_item(LLFolderView* folder,
+ LLFolderBridge* bridge,
+ const LLSD& userdata);
+
#endif // LL_LLVIEWERINVENTORY_H