summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-28 14:11:17 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-28 14:11:17 -0700
commitfc4939033e089354bc05fd0ca7fe402a4a1198bd (patch)
tree1cdef2ecf856b25f4455b7839270c5662c8d2b55 /indra/newview/llmarketplacefunctions.cpp
parent6d7b33f77e6d6facd585faf8c5d355f68942fcef (diff)
DD-22 : WIP : Fix initialization glitch and got rid of old Merchant Outbox remnants in Marketplace
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 607f907ed1..c3aaf66071 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -602,7 +602,8 @@ LLMarketplaceTuple::LLMarketplaceTuple(const LLUUID& folder_id, S32 listing_id,
// Data map
LLMarketplaceData::LLMarketplaceData() :
- mMarketPlaceStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED)
+ mMarketPlaceStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED),
+ mStatusUpdatedSignal(NULL)
{
mTestCurrentMarketplaceID = 1234567;
}
@@ -612,9 +613,14 @@ S32 LLMarketplaceData::getTestMarketplaceID()
return mTestCurrentMarketplaceID++;
}
-void LLMarketplaceData::initializeSLM()
+void LLMarketplaceData::initializeSLM(const status_updated_signal_t::slot_type& cb)
{
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING;
+ if (mStatusUpdatedSignal == NULL)
+ {
+ mStatusUpdatedSignal = new status_updated_signal_t();
+ }
+ mStatusUpdatedSignal->connect(cb);
// Get DirectDelivery cap
std::string url = "";
@@ -638,6 +644,17 @@ void LLMarketplaceData::initializeSLM()
LLHTTPClient::get(url, new LLSLMMerchantResponder(), LLSD());
}
+void LLMarketplaceData::setSLMStatus(U32 status)
+{
+ mMarketPlaceStatus = status; /* call cb if status is "done" */
+
+ // Make sure we trigger the status change with the current state
+ if (mStatusUpdatedSignal)
+ {
+ (*mStatusUpdatedSignal)();
+ }
+}
+
// Creation / Deletion
bool LLMarketplaceData::addListing(const LLUUID& folder_id)
{