diff options
Diffstat (limited to 'indra/llmessage')
-rwxr-xr-x | indra/llmessage/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | indra/llmessage/llavatarnamecache.cpp | 12 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 72 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.h | 66 |
4 files changed, 76 insertions, 76 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index ba6e9d3939..49f825d8f8 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -256,8 +256,8 @@ if (LL_TESTS) ${LLMESSAGE_LIBRARIES} ${LLCOREHTTP_LIBRARIES} ${JSONCPP_LIBRARIES} - ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} + ${BOOST_COROUTINE_LIBRARY} ${GOOGLEMOCK_LIBRARIES} ) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index d262862c80..7014048021 100755 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -137,8 +137,8 @@ namespace LLAvatarNameCache bool expirationFromCacheControl(const LLSD& headers, F64 *expires); - // This is a coroutine. - void requestAvatarNameCache_(std::string url, std::vector<LLUUID> agentIds); + // This is a coroutine. The only parameter that can be specified as a reference is the self + void requestAvatarNameCache_(LLCoros::self& self, std::string url, std::vector<LLUUID> agentIds); void handleAvNameCacheSuccess(const LLSD &data, const LLSD &httpResult); } @@ -185,9 +185,9 @@ namespace LLAvatarNameCache // Coroutine for sending and processing avatar name cache requests. // Do not call directly. See documentation in lleventcoro.h and llcoro.h for // further explanation. -void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLUUID> agentIds) +void LLAvatarNameCache::requestAvatarNameCache_(LLCoros::self& self, std::string url, std::vector<LLUUID> agentIds) { - LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName() + LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName(self) << " with url '" << url << "', requesting " << agentIds.size() << " Agent Ids" << LL_ENDL; try @@ -195,7 +195,7 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU bool success = true; LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", LLAvatarNameCache::sHttpPolicy); - LLSD results = httpAdapter.getAndYield(sHttpRequest, url); + LLSD results = httpAdapter.getAndYield(self, sHttpRequest, url); LLSD httpResults; LL_DEBUGS() << results << LL_ENDL; @@ -401,7 +401,7 @@ void LLAvatarNameCache::requestNamesViaCapability() std::string coroname = LLCoros::instance().launch("LLAvatarNameCache::requestAvatarNameCache_", - boost::bind(&LLAvatarNameCache::requestAvatarNameCache_, url, agent_ids)); + boost::bind(&LLAvatarNameCache::requestAvatarNameCache_, _1, url, agent_ids)); LL_DEBUGS("AvNameCache") << coroname << " with url '" << url << "', agent_ids.size()=" << agent_ids.size() << LL_ENDL; } diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index ac1c2f8e58..4ec01aa405 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -565,17 +565,17 @@ HttpCoroutineAdapter::~HttpCoroutineAdapter() cancelYieldingOperation(); } -LLSD HttpCoroutineAdapter::postAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return postAndYield_(request, url, body, options, headers, httpHandler); + return postAndYield_(self, request, url, body, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -596,35 +596,35 @@ LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(handler->getReplyPump()); + LLSD results = waitForEventOn(self, handler->getReplyPump()); cleanState(); return results; } -LLSD HttpCoroutineAdapter::postAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return postAndYield_(request, url, rawbody, options, headers, httpHandler); + return postAndYield_(self, request, url, rawbody, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::postRawAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroRawHandler(replyPump)); - return postAndYield_(request, url, rawbody, options, headers, httpHandler); + return postAndYield_(self, request, url, rawbody, options, headers, httpHandler); } // *TODO: This functionality could be moved into the LLCore::Http library itself // by having the CURL layer read the file directly. -LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { @@ -648,12 +648,12 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, } } - return postAndYield(request, url, fileData, options, headers); + return postAndYield(self, request, url, fileData, options, headers); } // *TODO: This functionality could be moved into the LLCore::Http library itself // by having the CURL layer read the file directly. -LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { @@ -673,11 +673,11 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCore::HttpRequest::ptr_t request, delete[] fileBuffer; } - return postAndYield(request, url, fileData, options, headers); + return postAndYield(self, request, url, fileData, options, headers); } -LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -697,24 +697,24 @@ LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(handler->getReplyPump()); + LLSD results = waitForEventOn(self, handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::putAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::putAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return putAndYield_(request, url, body, options, headers, httpHandler); + return putAndYield_(self, request, url, body, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::putAndYield_(LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::putAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -735,43 +735,43 @@ LLSD HttpCoroutineAdapter::putAndYield_(LLCore::HttpRequest::ptr_t &request, } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(handler->getReplyPump()); + LLSD results = waitForEventOn(self, handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::getAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return getAndYield_(request, url, options, headers, httpHandler); + return getAndYield_(self, request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getRawAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroRawHandler(replyPump)); - return getAndYield_(request, url, options, headers, httpHandler); + return getAndYield_(self, request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getJsonAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::getJsonAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroJSONHandler(replyPump)); - return getAndYield_(request, url, options, headers, httpHandler); + return getAndYield_(self, request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::getAndYield_(LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::getAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) @@ -790,24 +790,24 @@ LLSD HttpCoroutineAdapter::getAndYield_(LLCore::HttpRequest::ptr_t &request, } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(handler->getReplyPump()); + LLSD results = waitForEventOn(self, handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; } -LLSD HttpCoroutineAdapter::deleteAndYield(LLCore::HttpRequest::ptr_t request, +LLSD HttpCoroutineAdapter::deleteAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); HttpCoroHandler::ptr_t httpHandler = HttpCoroHandler::ptr_t(new HttpCoroLLSDHandler(replyPump)); - return deleteAndYield_(request, url, options, headers, httpHandler); + return deleteAndYield_(self, request, url, options, headers, httpHandler); } -LLSD HttpCoroutineAdapter::deleteAndYield_(LLCore::HttpRequest::ptr_t &request, +LLSD HttpCoroutineAdapter::deleteAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler) { @@ -825,7 +825,7 @@ LLSD HttpCoroutineAdapter::deleteAndYield_(LLCore::HttpRequest::ptr_t &request, } saveState(hhandle, request, handler); - LLSD results = waitForEventOn(handler->getReplyPump()); + LLSD results = waitForEventOn(self, handler->getReplyPump()); cleanState(); //LL_INFOS() << "Results for transaction " << transactionId << LL_ENDL; return results; @@ -907,7 +907,7 @@ LLCore::HttpStatus HttpCoroutineAdapter::getStatusFromLLSD(const LLSD &httpResul void HttpCoroutineAdapter::callbackHttpGet(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoros::instance().launch("HttpCoroutineAdapter::genericGetCoro", - boost::bind(&HttpCoroutineAdapter::trivialGetCoro, url, policyId, success, failure)); + boost::bind(&HttpCoroutineAdapter::trivialGetCoro, _1, url, policyId, success, failure)); } /*static*/ @@ -921,7 +921,7 @@ void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::str } /*static*/ -void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) +void HttpCoroutineAdapter::trivialGetCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericGetCoro", policyId)); @@ -932,7 +932,7 @@ void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest:: LL_INFOS("HttpCoroutineAdapter", "genericGetCoro") << "Generic GET for " << url << LL_ENDL; - LLSD result = httpAdapter->getAndYield(httpRequest, url, httpOpts); + LLSD result = httpAdapter->getAndYield(self, httpRequest, url, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -957,7 +957,7 @@ void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest:: void HttpCoroutineAdapter::callbackHttpPost(const std::string &url, LLCore::HttpRequest::policy_t policyId, const LLSD &postData, completionCallback_t success, completionCallback_t failure) { LLCoros::instance().launch("HttpCoroutineAdapter::genericPostCoro", - boost::bind(&HttpCoroutineAdapter::trivialPostCoro, url, policyId, postData, success, failure)); + boost::bind(&HttpCoroutineAdapter::trivialPostCoro, _1, url, policyId, postData, success, failure)); } /*static*/ @@ -972,7 +972,7 @@ void HttpCoroutineAdapter::messageHttpPost(const std::string &url, const LLSD &p } /*static*/ -void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) +void HttpCoroutineAdapter::trivialPostCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", policyId)); @@ -983,7 +983,7 @@ void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest: LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->postAndYield(httpRequest, url, postData, httpOpts); + LLSD result = httpAdapter->postAndYield(self, httpRequest, url, postData, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index cf35177e48..7dd161d1cd 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -320,67 +320,67 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD postAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { - return postAndYield(request, url, body, + return postAndYield(self, request, url, body, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { - return postAndYield(request, url, rawbody, + return postAndYield(self, request, url, rawbody, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postRawAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postRawAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { - return postRawAndYield(request, url, rawbody, + return postRawAndYield(self, request, url, rawbody, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postFileAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, std::string fileName, LLCore::HttpHeaders::ptr_t &headers) { - return postFileAndYield(request, url, fileName, + return postFileAndYield(self, request, url, fileName, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD postFileAndYield(LLCore::HttpRequest::ptr_t request, + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpHeaders::ptr_t &headers) { - return postFileAndYield(request, url, assetId, assetType, + return postFileAndYield(self, request, url, assetId, assetType, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } @@ -390,7 +390,7 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD putAndYield(LLCore::HttpRequest::ptr_t request, + LLSD putAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); @@ -400,38 +400,38 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD getAndYield(LLCore::HttpRequest::ptr_t request, + LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getAndYield(request, url, + return getAndYield(self, request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD getRawAndYield(LLCore::HttpRequest::ptr_t request, + LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getRawAndYield(LLCore::HttpRequest::ptr_t &request, + LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getRawAndYield(request, url, + return getRawAndYield(self, request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } - LLSD getJsonAndYield(LLCore::HttpRequest::ptr_t request, + LLSD getJsonAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); - LLSD getJsonndYield(LLCore::HttpRequest::ptr_t &request, + LLSD getJsonndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { - return getJsonAndYield(request, url, + return getJsonAndYield(self, request, url, LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); } @@ -442,7 +442,7 @@ public: /// /// @Note: the request's smart pointer is passed by value so that it will /// not be deallocated during the yield. - LLSD deleteAndYield(LLCore::HttpRequest::ptr_t request, + LLSD deleteAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); @@ -486,31 +486,31 @@ private: HttpCoroHandler::ptr_t &handler); void cleanState(); - LLSD postAndYield_(LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD postAndYield_(LLCore::HttpRequest::ptr_t &request, + LLSD postAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD putAndYield_(LLCore::HttpRequest::ptr_t &request, + LLSD putAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD getAndYield_(LLCore::HttpRequest::ptr_t &request, + LLSD getAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - LLSD deleteAndYield_(LLCore::HttpRequest::ptr_t &request, + LLSD deleteAndYield_(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler); - static void trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); - static void trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure); + static void trivialGetCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); + static void trivialPostCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure); void checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers); |