diff options
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rwxr-xr-x | indra/newview/llviewerinventory.h | 86 |
1 files changed, 70 insertions, 16 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index a10eda947d..d345c49cfb 100755 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -118,14 +118,13 @@ public: void cloneViewerItem(LLPointer<LLViewerInventoryItem>& newitem) const; // virtual methods - virtual void removeFromServer( void ); virtual void updateParentOnServer(BOOL restamp) const; virtual void updateServer(BOOL is_new) const; void fetchFromServer(void) const; - //virtual void packMessage(LLMessageSystem* msg) const; + virtual void packMessage(LLMessageSystem* msg) const; virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); - virtual BOOL unpackMessage(LLSD item); + virtual BOOL unpackMessage(const LLSD& item); virtual BOOL importFile(LLFILE* fp); virtual BOOL importLegacyStream(std::istream& input_stream); @@ -139,7 +138,6 @@ public: void setComplete(BOOL complete) { mIsComplete = complete; } //void updateAssetOnServer() const; - virtual void packMessage(LLMessageSystem* msg) const; virtual void setTransactionID(const LLTransactionID& transaction_id); struct comparePointers { @@ -198,10 +196,11 @@ public: LLViewerInventoryCategory(const LLViewerInventoryCategory* other); void copyViewerCategory(const LLViewerInventoryCategory* other); - virtual void removeFromServer(); virtual void updateParentOnServer(BOOL restamp_children) const; virtual void updateServer(BOOL is_new) const; + virtual void packMessage(LLMessageSystem* msg) const; + const LLUUID& getOwnerID() const { return mOwnerID; } // Version handling @@ -218,6 +217,8 @@ public: enum { DESCENDENT_COUNT_UNKNOWN = -1 }; S32 getDescendentCount() const { return mDescendentCount; } void setDescendentCount(S32 descendents) { mDescendentCount = descendents; } + // How many descendents do we currently have information for in the InventoryModel? + S32 getViewerDescendentCount() const; // file handling on the viewer. These are not meant for anything // other than caching. @@ -225,6 +226,8 @@ public: bool importFileLocal(LLFILE* fp); void determineFolderType(); void changeType(LLFolderType::EType new_folder_type); + virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); + virtual BOOL unpackMessage(const LLSD& category); private: friend class LLInventoryModel; @@ -249,7 +252,9 @@ void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachme void activate_gesture_cb(const LLUUID& inv_item); +void create_script_cb(const LLUUID& inv_item); void create_gesture_cb(const LLUUID& inv_item); +void create_notecard_cb(const LLUUID& inv_item); class AddFavoriteLandmarkCallback : public LLInventoryCallback { @@ -264,9 +269,11 @@ private: }; typedef boost::function<void(const LLUUID&)> inventory_func_type; -void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func - +typedef boost::function<void(const LLSD&)> llsd_func_type; typedef boost::function<void()> nullary_func_type; + +void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func +void no_op_llsd_func(const LLSD&); // likewise for LLSD void no_op(); // A do-nothing nullary func. // Shim between inventory callback and boost function/callable @@ -274,7 +281,7 @@ class LLBoostFuncInventoryCallback: public LLInventoryCallback { public: - LLBoostFuncInventoryCallback(inventory_func_type fire_func, + LLBoostFuncInventoryCallback(inventory_func_type fire_func = no_op_inventory_func, nullary_func_type destroy_func = no_op): mFireFunc(fire_func), mDestroyFunc(destroy_func) @@ -348,14 +355,16 @@ 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 std::string& new_description, - const LLAssetType::EType asset_type, - LLPointer<LLInventoryCallback> cb); +// utility functions for inventory linking. +void link_inventory_object(const LLUUID& category, + LLConstPointer<LLInventoryObject> baseobj, + LLPointer<LLInventoryCallback> cb); +void link_inventory_object(const LLUUID& category, + const LLUUID& id, + LLPointer<LLInventoryCallback> cb); +void link_inventory_array(const LLUUID& category, + LLInventoryObject::const_object_list_t& baseobj_array, + LLPointer<LLInventoryCallback> cb); void move_inventory_item( const LLUUID& agent_id, @@ -365,6 +374,44 @@ void move_inventory_item( const std::string& new_name, LLPointer<LLInventoryCallback> cb); +void update_inventory_item( + LLViewerInventoryItem *update_item, + LLPointer<LLInventoryCallback> cb); + +void update_inventory_item( + const LLUUID& item_id, + const LLSD& updates, + LLPointer<LLInventoryCallback> cb); + +void update_inventory_category( + const LLUUID& cat_id, + const LLSD& updates, + LLPointer<LLInventoryCallback> cb); + +void remove_inventory_items( + LLInventoryObject::object_list_t& items, + LLPointer<LLInventoryCallback> cb); + +void remove_inventory_item( + LLPointer<LLInventoryObject> obj, + LLPointer<LLInventoryCallback> cb); + +void remove_inventory_item( + const LLUUID& item_id, + LLPointer<LLInventoryCallback> cb); + +void remove_inventory_category( + const LLUUID& cat_id, + LLPointer<LLInventoryCallback> cb); + +void remove_inventory_object( + const LLUUID& object_id, + LLPointer<LLInventoryCallback> cb); + +void purge_descendents_of( + const LLUUID& cat_id, + LLPointer<LLInventoryCallback> cb); + const LLUUID get_folder_by_itemtype(const LLInventoryItem *src); void copy_inventory_from_notecard(const LLUUID& destination_id, @@ -379,4 +426,11 @@ void menu_create_inventory_item(LLInventoryPanel* root, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null); +void slam_inventory_folder(const LLUUID& folder_id, + const LLSD& contents, + LLPointer<LLInventoryCallback> cb); + +void remove_folder_contents(const LLUUID& folder_id, bool keep_outfit_links, + LLPointer<LLInventoryCallback> cb); + #endif // LL_LLVIEWERINVENTORY_H |