summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.h
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-08-04 16:45:49 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-08-04 16:45:49 +0300
commitf94a19e09ebcf51e3e6cd3437fe364b60755406f (patch)
treefa4f585008c6f5aa7850b2f5128a681b0065fcdc /indra/newview/llinventoryfunctions.h
parentd04a3b6d4e67dafa0b6dd8e88b752c5a929de5b0 (diff)
parent310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (diff)
Merge downstream code and become version 3.8.3
Diffstat (limited to 'indra/newview/llinventoryfunctions.h')
-rwxr-xr-xindra/newview/llinventoryfunctions.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 92780eb10f..f12802912a 100755
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -32,6 +32,10 @@
#include "llinventory.h"
#include "llwearabletype.h"
+// compute_stock_count() return error code
+const S32 COMPUTE_STOCK_INFINITE = -1;
+const S32 COMPUTE_STOCK_NOT_EVALUATED = -2;
+
/********************************************************************************
** **
** MISCELLANEOUS GLOBAL FUNCTIONS
@@ -58,18 +62,33 @@ void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id);
void show_item_original(const LLUUID& item_uuid);
void reset_inventory_filter();
+// Nudge the listing categories in the inventory to signal that their marketplace status changed
+void update_marketplace_category(const LLUUID& cat_id, bool perform_consistency_enforcement = true);
+// Nudge all listing categories to signal that their marketplace status changed
+void update_all_marketplace_count();
+
void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name);
-void copy_inventory_category(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& parent_id, const LLUUID& root_copy_id = LLUUID::null);
+void copy_inventory_category(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& parent_id, const LLUUID& root_copy_id = LLUUID::null, bool move_no_copy_items = false);
// Generates a string containing the path to the item specified by item_id.
void append_path(const LLUUID& id, std::string& path);
void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id);
void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, S32 operation_id);
-
void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder, S32 operation_id);
+typedef boost::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_callback_t;
+
+bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInventoryCategory* dest_folder, LLInventoryItem* inv_item, std::string& tooltip_msg, S32 bundle_size = 1, bool from_paste = false);
+bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLInventoryCategory* dest_folder, LLInventoryCategory* inv_cat, std::string& tooltip_msg, S32 bundle_size = 1, bool check_items = true, bool from_paste = false);
+bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy = false);
+bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, bool copy = false, bool move_no_copy_items = false);
+bool validate_marketplacelistings(LLInventoryCategory* inv_cat, validation_callback_t cb = NULL, bool fix_hierarchy = true, S32 depth = -1);
+S32 depth_nesting_in_marketplace(LLUUID cur_uuid);
+LLUUID nested_parent_id(LLUUID cur_uuid, S32 depth);
+S32 compute_stock_count(LLUUID cat_uuid, bool force_count = false);
+
/** Miscellaneous global functions
** **
*******************************************************************************/
@@ -437,8 +456,15 @@ public:
struct LLInventoryAction
{
- static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
+ static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE);
+ static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
+ static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
static void removeItemFromDND(LLFolderView* root);
+
+private:
+ static void buildMarketplaceFolders(LLFolderView* root);
+ static void updateMarketplaceFolders();
+ static std::list<LLUUID> sMarketplaceFolders; // Marketplace folders that will need update once the action is completed
};