diff options
author | Merov Linden <merov@lindenlab.com> | 2014-05-08 15:56:38 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-05-08 15:56:38 -0700 |
commit | 4d14e1ca9600d7ca7023edbd3827fbff994c8110 (patch) | |
tree | ec1f9ee8ab1b45fbcdc49503282faba1324230a9 /indra/newview/llmarketplacefunctions.cpp | |
parent | 00c1094c7d230fdf0670a7e8c2218bb6b1a677ca (diff) |
DD-22 : WIP : Cleanep up the class definition, seting methods private and better isolate calls leading to HTTP requests
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rwxr-xr-x | indra/newview/llmarketplacefunctions.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 74ea453c50..f4b4d8aa27 100755 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -1049,6 +1049,26 @@ bool LLMarketplaceData::createListing(const LLUUID& folder_id) return true; } +bool LLMarketplaceData::clearListing(const LLUUID& folder_id) +{ + // Folder id can be the root of the listing or not so we need to retrieve the root first + S32 depth = depth_nesting_in_marketplace(folder_id); + LLUUID listing_uuid = nested_parent_id(folder_id, depth); + S32 listing_id = getListingID(listing_uuid); + if (listing_id == 0) + { + // Listing doesn't exists -> exit with error + return false; + } + + // Update the SLM Server so that this listing is not active anymore + // *TODO : use deleteSLMListing() + deleteListing(listing_uuid); + updateSLMListing(listing_uuid, listing_id, LLUUID::null, false); + + return true; +} + bool LLMarketplaceData::activateListing(const LLUUID& folder_id, bool activate) { // Folder id can be the root of the listing or not so we need to retrieve the root first @@ -1126,8 +1146,8 @@ bool LLMarketplaceData::deleteListing(const LLUUID& folder_id) // Listing doesn't exist -> exit with error return false; } - // *TODO : Implement SLM API for deleting SLM records once it exists there... mMarketplaceItems.erase(folder_id); + update_marketplace_category(folder_id); gInventory.notifyObservers(); return true; |