summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.h
diff options
context:
space:
mode:
authorRider Linden <none@none>2015-04-03 14:23:31 -0700
committerRider Linden <none@none>2015-04-03 14:23:31 -0700
commit17641c8427d05c4cde1fadd2ca059264d89bc818 (patch)
tree08f12a5bc407e770a99bc69a78807bf1d2bc4d5a /indra/llmessage/llcorehttputil.h
parentfbd58959c2ac2216fb451bd687558763ceb2ab30 (diff)
Added a class to automate pumping the HttpRequest on the mainloop.
Converted AccountingCostManager to use the new LLCore::Http library and coroutines.
Diffstat (limited to 'indra/llmessage/llcorehttputil.h')
-rw-r--r--indra/llmessage/llcorehttputil.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index 0bc102a0a3..4ae6e112b3 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -165,8 +165,6 @@ LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest::ptr_t & request,
/// +- ["url"] - The URL used to make the call.
/// +- ["headers"] - A map of name name value pairs with the HTTP headers.
///
-
-///
class HttpCoroHandler : public LLCore::HttpHandler
{
public:
@@ -182,6 +180,22 @@ private:
LLEventStream &mReplyPump;
};
+/// The HttpRequestPumper is a utility class. When constructed it will poll the
+/// supplied HttpRequest once per frame until it is destroyed.
+///
+class HttpRequestPumper
+{
+public:
+ HttpRequestPumper(const LLCore::HttpRequest::ptr_t &request);
+ ~HttpRequestPumper();
+
+private:
+ bool pollRequest(const LLSD&);
+
+ LLTempBoundListener mBoundListener;
+ LLCore::HttpRequest::ptr_t mHttpRequest;
+};
+
} // end namespace LLCoreHttpUtil