From 5af39ea28be1a76ec0c3042a0bf34e7d64835c18 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 16 Sep 2011 11:46:37 -0700 Subject: EXP-1169 FIX -- No synch error icon given on Outbox on Agni where API does not exist * Moved marketplace URL related functions into a new file llmarketplacefunctions.cpp/h. This will the future home of more marketplace-related functions. * Disabled sync button when the marketplace API is unavailable. --- indra/newview/llmarketplacefunctions.h | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 indra/newview/llmarketplacefunctions.h (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h new file mode 100644 index 0000000000..e80e6a471c --- /dev/null +++ b/indra/newview/llmarketplacefunctions.h @@ -0,0 +1,42 @@ +/** + * @file llmarketplacefunctions.h + * @brief Miscellaneous marketplace-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLMARKETPLACEFUNCTIONS_H +#define LL_LLMARKETPLACEFUNCTIONS_H + + +std::string getMarketplaceURL_InventoryImport(); +std::string getMarketplaceURL_UserStatus(); + +bool getMarketplaceSyncEnabled(); +void setMarketplaceSyncEnabled(bool syncEnabled); + + +#endif // LL_LLMARKETPLACEFUNCTIONS_H + + + -- cgit v1.2.3 From 591891306366e683416b187207fa2b94bdc263a8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 5 Dec 2011 13:37:37 -0800 Subject: First pass at connecting to the new marketplace API --- indra/newview/llmarketplacefunctions.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index e80e6a471c..fda2fbb935 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -30,11 +30,20 @@ std::string getMarketplaceURL_InventoryImport(); -std::string getMarketplaceURL_UserStatus(); - -bool getMarketplaceSyncEnabled(); -void setMarketplaceSyncEnabled(bool syncEnabled); +bool getMarketplaceImportEnabled(); +void setMarketplaceImportEnabled(bool syncEnabled); + +namespace MarketplaceErrorCodes +{ + enum eCodes + { + IMPORT_DONE = 200, + IMPORT_PROCESSING = 202, + IMPORT_DONE_WITH_ERRORS = 409, + IMPORT_JOB_FAILED = 410, + }; +} #endif // LL_LLMARKETPLACEFUNCTIONS_H -- cgit v1.2.3 From 35020db3a9310742c9759673e3aa1bbb1d7aa02f Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 7 Dec 2011 15:04:39 -0800 Subject: Refactored marketplace inventory import HTTP requests and surrounding support to remove it from the UI panel code. --- indra/newview/llmarketplacefunctions.h | 43 ++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index fda2fbb935..5ca0bdfe77 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -29,14 +29,16 @@ #define LL_LLMARKETPLACEFUNCTIONS_H -std::string getMarketplaceURL_InventoryImport(); +#include +#include +#include + +#include "llsingleton.h" -bool getMarketplaceImportEnabled(); -void setMarketplaceImportEnabled(bool syncEnabled); namespace MarketplaceErrorCodes { - enum eCodes + enum eCode { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, @@ -45,7 +47,38 @@ namespace MarketplaceErrorCodes }; } -#endif // LL_LLMARKETPLACEFUNCTIONS_H +class LLMarketplaceInventoryImporter + : public LLSingleton +{ +public: + static void update(); + + LLMarketplaceInventoryImporter(); + + void initialize(); + + typedef boost::signals2::signal status_changed_signal_t; + typedef boost::signals2::signal status_report_signal_t; + boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); + boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); + + bool triggerImport(); + bool isImportInProgress() const { return mImportInProgress; } + +protected: + void updateImport(); + +private: + bool mImportInProgress; + bool mInitialized; + + status_changed_signal_t * mStatusChangedSignal; + status_report_signal_t * mStatusReportSignal; +}; + + + +#endif // LL_LLMARKETPLACEFUNCTIONS_H -- cgit v1.2.3 From e826cbd90750fd38565e4e44390948f36254cf1f Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 12 Dec 2011 15:02:52 -0800 Subject: EXP-1682 FIX EXP-1683 FIX EXP-1705 FIX EXP-1707 FIX * Outbox folder count now uses inventory API directly rather than inventory folder view for folder count and item status * Asynchronous fetches are triggered for the outbox content when the window is opened and when it receives focus * Marketplace URL's for empty and non-merchant outbox view have been updated * "Copy to Merchant Outbox" and "Delete" context menu items should be fully functional now with item counts, etc. --- indra/newview/llmarketplacefunctions.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 5ca0bdfe77..f501f1ee8b 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -34,6 +34,10 @@ #include #include "llsingleton.h" +#include "llstring.h" + + +LLStringUtil::format_map_t getMarketplaceStringSubstitutions(); namespace MarketplaceErrorCodes -- cgit v1.2.3 From 00b767e5a91d9e3379119c867164f9be40f888cc Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 11 Jan 2012 10:05:15 -0800 Subject: EXP-1791 - Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Added code to clear and re-initialize the SLM cookie when authentication errors are encountered. * Re-organized logic for outbox import a bit to hopefully be more robust when errors are encountered. --- indra/newview/llmarketplacefunctions.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index f501f1ee8b..b2f6cb7521 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -46,6 +46,7 @@ namespace MarketplaceErrorCodes { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, + IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, }; @@ -65,6 +66,7 @@ public: typedef boost::signals2::signal status_changed_signal_t; typedef boost::signals2::signal status_report_signal_t; + boost::signals2::connection setInitializationErrorCallback(const status_report_signal_t::slot_type& cb); boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); @@ -75,9 +77,11 @@ protected: void updateImport(); private: + bool mAutoTriggerImport; bool mImportInProgress; bool mInitialized; + status_report_signal_t * mErrorInitSignal; status_changed_signal_t * mStatusChangedSignal; status_report_signal_t * mStatusReportSignal; }; -- cgit v1.2.3 From 0a1cb4f03ee1aeb0cfc9d9bdb837043d0f46f292 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 11 Jan 2012 11:26:56 -0800 Subject: EXP-1791 FIX -- Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Updated marketplace import to properly handle failed cases of authentications and invalid cookies. The import will reset to an uninitialized state and then trigger and initialization followed immediately by an import when appropriate. --- indra/newview/llmarketplacefunctions.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index b2f6cb7521..78df86ef3e 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -46,6 +46,7 @@ namespace MarketplaceErrorCodes { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, + IMPORT_REDIRECT = 302, IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, @@ -61,8 +62,6 @@ public: LLMarketplaceInventoryImporter(); - void initialize(); - typedef boost::signals2::signal status_changed_signal_t; typedef boost::signals2::signal status_report_signal_t; @@ -70,10 +69,12 @@ public: boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); + void initialize(); bool triggerImport(); bool isImportInProgress() const { return mImportInProgress; } protected: + void reinitializeAndTriggerImport(); void updateImport(); private: -- cgit v1.2.3 From 59950f6178699b96e86bfd2c0bc701271b3f1a6b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 11 Jan 2012 16:49:32 -0800 Subject: EXP-1778 FIX -- Link to Marketplace Error log in transfer failed viewer notification * Added a link to the "imports" log from the "done with errors" notification when sending folders to the marketplace. --- indra/newview/llmarketplacefunctions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 78df86ef3e..4731566366 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -37,7 +37,7 @@ #include "llstring.h" -LLStringUtil::format_map_t getMarketplaceStringSubstitutions(); +LLSD getMarketplaceStringSubstitutions(); namespace MarketplaceErrorCodes -- cgit v1.2.3 From 652ef621543497aa947970d374285d8f851ed682 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 17 Jan 2012 15:51:30 -0800 Subject: EXP-1791 FIX -- Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Timeout now triggers the re-initialization logic in the merchant outbox. --- indra/newview/llmarketplacefunctions.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llmarketplacefunctions.h') diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 4731566366..4b8f7a1ac7 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -50,6 +50,7 @@ namespace MarketplaceErrorCodes IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, + IMPORT_JOB_TIMEOUT = 499, }; } -- cgit v1.2.3