diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-04-30 19:50:05 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-04-30 19:50:05 -0700 |
commit | 806d09b1143894ad66cea2c228f467e8c39a8adf (patch) | |
tree | 512bfa5d5a8fe92ac4616fd9169e1c458b0e8b87 /indra/newview/llviewerinventory.h | |
parent | b06ec66a5d11628905da256e084d0036f39ba529 (diff) |
Merge 3.5.1 into Materials
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rw-r--r-- | indra/newview/llviewerinventory.h | 83 |
1 files changed, 49 insertions, 34 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 3cf03c3bc5..ab19a12014 100644 --- 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(); - -private: - LLViewerJointAttachment* mAttach; -}; + LLBoostFuncInventoryCallback(inventory_func_type fire_func, + nullary_func_type destroy_func = no_op): + mFireFunc(fire_func), + mDestroyFunc(destroy_func) + { + } -class ActivateGestureCallback : public LLInventoryCallback + // virtual + void fire(const LLUUID& item_id) { -public: - void fire(const LLUUID& inv_item); -}; + mFireFunc(item_id); + } -class CreateGestureCallback : public LLInventoryCallback + // virtual + ~LLBoostFuncInventoryCallback() { -public: - void fire(const LLUUID& inv_item); + mDestroyFunc(); + } + + +private: + inventory_func_type mFireFunc; + nullary_func_type mDestroyFunc; }; // misc functions |