summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-05-30 23:51:33 +0000
committerMonty Brandenberg <monty@lindenlab.com>2013-05-30 23:51:33 +0000
commitaf8c2bc94868e056908b4ae2fc285925cd68b56b (patch)
tree2fc5e74073317ecc3e7b8e64b7c3784e88ba5099 /indra/newview/llviewerinventory.h
parent2df0a2494691ebfdd305e6a5ee280dd758a1b337 (diff)
parentdcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff)
Merge. Pull viewer-release to get the new version scheme changes.
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerinventory.h87
1 files changed, 51 insertions, 36 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 3cf03c3bc5..61b1b8d846 100644..100755
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -35,6 +35,7 @@
#include <boost/signals2.hpp> // boost::signals2::trackable
class LLInventoryPanel;
+class LLFolderView;
class LLFolderBridge;
class LLViewerInventoryCategory;
@@ -60,6 +61,10 @@ public:
virtual const LLUUID& getAssetUUID() const;
virtual const LLUUID& getProtectedAssetUUID() const; // returns LLUUID::null if current agent does not have permission to expose this asset's UUID to the user
virtual const std::string& getName() const;
+ virtual S32 getSortField() const;
+ //virtual void setSortField(S32 sortField);
+ virtual void getSLURL(); //Caches SLURL for landmark. //*TODO: Find a better way to do it and remove this method from here.
+ virtual const LLPermissions& getPermissions() const;
virtual const bool getIsFullPerm() const; // 'fullperm' in the popular sense: modify-ok & copy-ok & transfer-ok, no special god rules applied
virtual const LLUUID& getCreatorUUID() const;
virtual const std::string& getDescription() const;
@@ -68,11 +73,8 @@ public:
virtual bool isWearableType() const;
virtual LLWearableType::EType getWearableType() const;
virtual U32 getFlags() const;
-
- using LLInventoryItem::getPermissions;
- using LLInventoryItem::getCreationDate;
- using LLInventoryItem::setCreationDate;
- using LLInventoryItem::getCRC32;
+ virtual time_t getCreationDate() const;
+ virtual U32 getCRC32() const; // really more of a checksum.
static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName);
@@ -204,13 +206,13 @@ public:
// Version handling
enum { VERSION_UNKNOWN = -1, VERSION_INITIAL = 1 };
- S32 getVersion() const { return mVersion; }
- void setVersion(S32 version) { mVersion = version; }
+ S32 getVersion() const;
+ void setVersion(S32 version);
// Returns true if a fetch was issued.
bool fetch();
- // used to help make cacheing more robust - for example, if
+ // used to help make caching more robust - for example, if
// someone is getting 4 packets but logs out after 3. the viewer
// may never know the cache is wrong.
enum { DESCENDENT_COUNT_UNKNOWN = -1 };
@@ -218,7 +220,7 @@ public:
void setDescendentCount(S32 descendents) { mDescendentCount = descendents; }
// file handling on the viewer. These are not meant for anything
- // other than cacheing.
+ // other than caching.
bool exportFileLocal(LLFILE* fp) const;
bool importFileLocal(LLFILE* fp);
void determineFolderType();
@@ -241,47 +243,60 @@ public:
virtual void fire(const LLUUID& inv_item) = 0;
};
-class WearOnAvatarCallback : public LLInventoryCallback
+class LLViewerJointAttachment;
+
+void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp);
+
+void activate_gesture_cb(const LLUUID& inv_item);
+
+void create_gesture_cb(const LLUUID& inv_item);
+
+class AddFavoriteLandmarkCallback : public LLInventoryCallback
{
public:
- WearOnAvatarCallback(bool do_replace = false) : mReplace(do_replace) {}
-
+ AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {}
+ void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; }
+
+private:
void fire(const LLUUID& inv_item);
-protected:
- bool mReplace;
+ LLUUID mTargetLandmarkId;
};
-class ModifiedCOFCallback : public LLInventoryCallback
-{
- void fire(const LLUUID& inv_item);
-};
+typedef boost::function<void(const LLUUID&)> inventory_func_type;
+void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func
-class LLViewerJointAttachment;
+typedef boost::function<void()> nullary_func_type;
+void no_op(); // A do-nothing nullary func.
-class RezAttachmentCallback : public LLInventoryCallback
+// Shim between inventory callback and boost function/callable
+class LLBoostFuncInventoryCallback: public LLInventoryCallback
{
public:
- RezAttachmentCallback(LLViewerJointAttachment *attachmentp);
- void fire(const LLUUID& inv_item);
-protected:
- ~RezAttachmentCallback();
+ LLBoostFuncInventoryCallback(inventory_func_type fire_func,
+ nullary_func_type destroy_func = no_op):
+ mFireFunc(fire_func),
+ mDestroyFunc(destroy_func)
+ {
+ }
-private:
- LLViewerJointAttachment* mAttach;
-};
+ // virtual
+ void fire(const LLUUID& item_id)
+ {
+ mFireFunc(item_id);
+ }
-class ActivateGestureCallback : public LLInventoryCallback
-{
-public:
- void fire(const LLUUID& inv_item);
-};
+ // virtual
+ ~LLBoostFuncInventoryCallback()
+ {
+ mDestroyFunc();
+ }
+
-class CreateGestureCallback : public LLInventoryCallback
-{
-public:
- void fire(const LLUUID& inv_item);
+private:
+ inventory_func_type mFireFunc;
+ nullary_func_type mDestroyFunc;
};
// misc functions