From 225612ea77b843e58e11ccb00165155cc907ae1b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 18 May 2015 11:48:50 -0700 Subject: Updater to coroutines. --- indra/viewer_components/updater/llupdatechecker.h | 121 +++++++++++----------- 1 file changed, 59 insertions(+), 62 deletions(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index 3163a6d53c..74af718a15 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -31,60 +31,27 @@ #include "llmd5.h" #include "llhttpclient.h" +#include "lleventcoro.h" +#include "llcoros.h" // // Implements asynchronous checking for updates. // class LLUpdateChecker { public: - class Client; - class Implementation: public LLHTTPClient::Responder - { - public: - Implementation(Client & client); - ~Implementation(); - void checkVersion(std::string const & urlBase, - std::string const & channel, - std::string const & version, - std::string const & platform, - std::string const & platform_version, - unsigned char uniqueid[MD5HEX_STR_SIZE], - bool willing_to_test - ); - - protected: - // Responder: - virtual void httpCompleted(); - virtual void httpFailure(); - - private: - static const char * sLegacyProtocolVersion; - static const char * sProtocolVersion; - const char* mProtocol; - - Client & mClient; - LLHTTPClient mHttpClient; - bool mInProgress; - std::string mVersion; - std::string mUrlBase; - std::string mChannel; - std::string mPlatform; - std::string mPlatformVersion; - unsigned char mUniqueId[MD5HEX_STR_SIZE]; - bool mWillingToTest; - - std::string buildUrl(std::string const & urlBase, - std::string const & channel, - std::string const & version, - std::string const & platform, - std::string const & platform_version, - unsigned char uniqueid[MD5HEX_STR_SIZE], - bool willing_to_test); - - LOG_CLASS(LLUpdateChecker::Implementation); - }; + // + // The client interface implemented by a requestor checking for an update. + // + class Client + { + public: + // An error occurred while checking for an update. + virtual void error(std::string const & message) = 0; + + // A successful response was received from the viewer version manager + virtual void response(LLSD const & content) = 0; + }; - // An exception that may be raised on check errors. class CheckError; @@ -100,25 +67,55 @@ public: bool willing_to_test); private: - LLPointer mImplementation; -}; + class Implementation + { + public: + typedef boost::shared_ptr ptr_t; + Implementation(Client & client); + ~Implementation(); + void checkVersion(std::string const & urlBase, + std::string const & channel, + std::string const & version, + std::string const & platform, + std::string const & platform_version, + unsigned char uniqueid[MD5HEX_STR_SIZE], + bool willing_to_test + ); -class LLURI; // From lluri.h + private: + static const char * sLegacyProtocolVersion; + static const char * sProtocolVersion; + const char* mProtocol; -// -// The client interface implemented by a requestor checking for an update. -// -class LLUpdateChecker::Client -{ -public: - // An error occurred while checking for an update. - virtual void error(std::string const & message) = 0; - - // A successful response was received from the viewer version manager - virtual void response(LLSD const & content) = 0; -}; + Client & mClient; + LLHTTPClient mHttpClient; + bool mInProgress; + std::string mVersion; + std::string mUrlBase; + std::string mChannel; + std::string mPlatform; + std::string mPlatformVersion; + unsigned char mUniqueId[MD5HEX_STR_SIZE]; + bool mWillingToTest; + + std::string buildUrl(std::string const & urlBase, + std::string const & channel, + std::string const & version, + std::string const & platform, + std::string const & platform_version, + unsigned char uniqueid[MD5HEX_STR_SIZE], + bool willing_to_test); + + void checkVersionCoro(LLCoros::self& self, std::string &url); + LOG_CLASS(LLUpdateChecker::Implementation); + }; + + + Implementation::ptr_t mImplementation; + //LLPointer mImplementation; +}; #endif -- cgit v1.2.3 From 46a86ddb7a59c2b82135c66e8855cfa84d25bf25 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 18 May 2015 13:39:48 -0700 Subject: Remove an unused variable from the updatechecker. --- indra/viewer_components/updater/llupdatechecker.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index 74af718a15..0f9be14524 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -90,7 +90,6 @@ private: const char* mProtocol; Client & mClient; - LLHTTPClient mHttpClient; bool mInProgress; std::string mVersion; std::string mUrlBase; -- cgit v1.2.3 From a4741cecb2112f418c1d98ca63a261e707a856c3 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 18 May 2015 16:18:07 -0700 Subject: Changed Avatar picker to use coroutine for find. Fixed a stray reference (&) on URL that had crept into some coroutine definitions. --- indra/viewer_components/updater/llupdatechecker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index 0f9be14524..09ed306ca7 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -107,7 +107,7 @@ private: unsigned char uniqueid[MD5HEX_STR_SIZE], bool willing_to_test); - void checkVersionCoro(LLCoros::self& self, std::string &url); + void checkVersionCoro(LLCoros::self& self, std::string url); LOG_CLASS(LLUpdateChecker::Implementation); }; -- cgit v1.2.3 From 0d3fb07bfa205b65f242ef2b761e827ff30e42fe Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 3 Jun 2015 16:04:40 -0700 Subject: Remove vestigial httpclient.h include from files that no longer need it. --- indra/viewer_components/updater/llupdatechecker.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index 09ed306ca7..e5050bb952 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -30,7 +30,6 @@ #include #include "llmd5.h" -#include "llhttpclient.h" #include "lleventcoro.h" #include "llcoros.h" -- cgit v1.2.3 From b262ded7e0cf21314524bf702b0e4fe28a3c3060 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 1 Jul 2015 18:33:29 -0400 Subject: MAINT-5351: Remove 'self' parameter from coroutine functions. lleventcoro_test.cpp runs clean (as modified for new API), and all the rest builds clean, but the resulting viewer is as yet untested. --- indra/viewer_components/updater/llupdatechecker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index e5050bb952..d10ea4cf42 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -106,7 +106,7 @@ private: unsigned char uniqueid[MD5HEX_STR_SIZE], bool willing_to_test); - void checkVersionCoro(LLCoros::self& self, std::string url); + void checkVersionCoro(std::string url); LOG_CLASS(LLUpdateChecker::Implementation); }; -- cgit v1.2.3 From 247eb0c9c3418c10be8f2a0e3c8116758efa702f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 7 Jul 2015 19:41:27 +0100 Subject: Backout selfles merge 738255dbbfd679d9e615baab3398e5e345bbb3c5 --- indra/viewer_components/updater/llupdatechecker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index d10ea4cf42..e5050bb952 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -106,7 +106,7 @@ private: unsigned char uniqueid[MD5HEX_STR_SIZE], bool willing_to_test); - void checkVersionCoro(std::string url); + void checkVersionCoro(LLCoros::self& self, std::string url); LOG_CLASS(LLUpdateChecker::Implementation); }; -- cgit v1.2.3 From efa9a0f99c17b2b937120bcad6e3d45944122ed9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 10 Jul 2015 19:30:10 -0400 Subject: Backed out changeset bab1000e1b2d: restore 'selfless' changes --- indra/viewer_components/updater/llupdatechecker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdatechecker.h') diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index e5050bb952..d10ea4cf42 100755 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -106,7 +106,7 @@ private: unsigned char uniqueid[MD5HEX_STR_SIZE], bool willing_to_test); - void checkVersionCoro(LLCoros::self& self, std::string url); + void checkVersionCoro(std::string url); LOG_CLASS(LLUpdateChecker::Implementation); }; -- cgit v1.2.3