summaryrefslogtreecommitdiff
path: root/indra/newview/llflickrconnect.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-07 19:41:27 +0100
committerRider Linden <rider@lindenlab.com>2015-07-07 19:41:27 +0100
commit247eb0c9c3418c10be8f2a0e3c8116758efa702f (patch)
treed3a448c69f1ad241dc72662970d702c2aa618382 /indra/newview/llflickrconnect.cpp
parentd785ec312bb7f4e77517eb44f46f276ba0129677 (diff)
Backout selfles merge 738255dbbfd679d9e615baab3398e5e345bbb3c5
Diffstat (limited to 'indra/newview/llflickrconnect.cpp')
-rw-r--r--indra/newview/llflickrconnect.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp
index 83e4f19191..873b1a7138 100644
--- a/indra/newview/llflickrconnect.cpp
+++ b/indra/newview/llflickrconnect.cpp
@@ -67,7 +67,7 @@ void toast_user_for_flickr_success()
///////////////////////////////////////////////////////////////////////////////
//
-void LLFlickrConnect::flickrConnectCoro(std::string requestToken, std::string oauthVerifier)
+void LLFlickrConnect::flickrConnectCoro(LLCoros::self& self, std::string requestToken, std::string oauthVerifier)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -86,7 +86,7 @@ void LLFlickrConnect::flickrConnectCoro(std::string requestToken, std::string oa
setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS);
- LLSD result = httpAdapter->putAndYield(httpRequest, getFlickrConnectURL("/connection"), body, httpOpts);
+ LLSD result = httpAdapter->putAndYield(self, httpRequest, getFlickrConnectURL("/connection"), body, httpOpts);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -157,7 +157,7 @@ bool LLFlickrConnect::testShareStatus(LLSD &result)
return false;
}
-void LLFlickrConnect::flickrShareCoro(LLSD share)
+void LLFlickrConnect::flickrShareCoro(LLCoros::self& self, LLSD share)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -170,7 +170,7 @@ void LLFlickrConnect::flickrShareCoro(LLSD share)
setConnectionState(LLFlickrConnect::FLICKR_POSTING);
- LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts);
+ LLSD result = httpAdapter->postAndYield(self, httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts);
if (testShareStatus(result))
{
@@ -181,7 +181,7 @@ void LLFlickrConnect::flickrShareCoro(LLSD share)
}
-void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel)
+void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -248,7 +248,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, st
body << "\r\n--" << boundary << "--\r\n";
- LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders);
+ LLSD result = httpAdapter->postAndYield(self, httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders);
if (testShareStatus(result))
{
@@ -260,7 +260,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, st
///////////////////////////////////////////////////////////////////////////////
//
-void LLFlickrConnect::flickrDisconnectCoro()
+void LLFlickrConnect::flickrDisconnectCoro(LLCoros::self& self)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -271,7 +271,7 @@ void LLFlickrConnect::flickrDisconnectCoro()
setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING);
httpOpts->setFollowRedirects(false);
- LLSD result = httpAdapter->deleteAndYield(httpRequest, getFlickrConnectURL("/connection"), httpOpts);
+ LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getFlickrConnectURL("/connection"), httpOpts);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -294,7 +294,7 @@ void LLFlickrConnect::flickrDisconnectCoro()
///////////////////////////////////////////////////////////////////////////////
//
-void LLFlickrConnect::flickrConnectedCoro(bool autoConnect)
+void LLFlickrConnect::flickrConnectedCoro(LLCoros::self& self, bool autoConnect)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -306,7 +306,7 @@ void LLFlickrConnect::flickrConnectedCoro(bool autoConnect)
httpOpts->setFollowRedirects(false);
- LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/connection", true), httpOpts);
+ LLSD result = httpAdapter->getAndYield(self, httpRequest, getFlickrConnectURL("/connection", true), httpOpts);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -344,7 +344,7 @@ void LLFlickrConnect::flickrConnectedCoro(bool autoConnect)
///////////////////////////////////////////////////////////////////////////////
//
-void LLFlickrConnect::flickrInfoCoro()
+void LLFlickrConnect::flickrInfoCoro(LLCoros::self& self)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -355,7 +355,7 @@ void LLFlickrConnect::flickrInfoCoro()
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
- LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/info", true), httpOpts);
+ LLSD result = httpAdapter->getAndYield(self, httpRequest, getFlickrConnectURL("/info", true), httpOpts);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -438,19 +438,19 @@ std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool
void LLFlickrConnect::connectToFlickr(const std::string& request_token, const std::string& oauth_verifier)
{
LLCoros::instance().launch("LLFlickrConnect::flickrConnectCoro",
- boost::bind(&LLFlickrConnect::flickrConnectCoro, this, request_token, oauth_verifier));
+ boost::bind(&LLFlickrConnect::flickrConnectCoro, this, _1, request_token, oauth_verifier));
}
void LLFlickrConnect::disconnectFromFlickr()
{
LLCoros::instance().launch("LLFlickrConnect::flickrDisconnectCoro",
- boost::bind(&LLFlickrConnect::flickrDisconnectCoro, this));
+ boost::bind(&LLFlickrConnect::flickrDisconnectCoro, this, _1));
}
void LLFlickrConnect::checkConnectionToFlickr(bool auto_connect)
{
LLCoros::instance().launch("LLFlickrConnect::flickrConnectedCoro",
- boost::bind(&LLFlickrConnect::flickrConnectedCoro, this, auto_connect));
+ boost::bind(&LLFlickrConnect::flickrConnectedCoro, this, _1, auto_connect));
}
void LLFlickrConnect::loadFlickrInfo()
@@ -458,7 +458,7 @@ void LLFlickrConnect::loadFlickrInfo()
if(mRefreshInfo)
{
LLCoros::instance().launch("LLFlickrConnect::flickrInfoCoro",
- boost::bind(&LLFlickrConnect::flickrInfoCoro, this));
+ boost::bind(&LLFlickrConnect::flickrInfoCoro, this, _1));
}
}
@@ -472,14 +472,14 @@ void LLFlickrConnect::uploadPhoto(const std::string& image_url, const std::strin
body["safety_level"] = safety_level;
LLCoros::instance().launch("LLFlickrConnect::flickrShareCoro",
- boost::bind(&LLFlickrConnect::flickrShareCoro, this, body));
+ boost::bind(&LLFlickrConnect::flickrShareCoro, this, _1, body));
}
void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level)
{
LLCoros::instance().launch("LLFlickrConnect::flickrShareImageCoro",
- boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, image,
+ boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, _1, image,
title, description, tags, safety_level));
}