summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpservice.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-22 19:13:50 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-22 19:13:50 -0400
commitbc7d5b24d16963a2715e880c518a4706a99f02fa (patch)
treedb91cb215ecf88fa57bbe599cba9df699fd46334 /indra/llcorehttp/_httpservice.h
parent5ff1758b633f1984f601aacbb7920c3c744b87f7 (diff)
This sets down the groundwork for dynamic policy classes.
Groundwork is used for the default class which currently represents texture fetching. Class options implemented from API user into HttpLibcurl. Policy layer is going to start doing some traffic shaping like work to solve problems with consumer-grade gear. Need to have dynamic aspects to policies and that starts now...
Diffstat (limited to 'indra/llcorehttp/_httpservice.h')
-rw-r--r--indra/llcorehttp/_httpservice.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/indra/llcorehttp/_httpservice.h b/indra/llcorehttp/_httpservice.h
index 3f953ec1a7..43044d97c0 100644
--- a/indra/llcorehttp/_httpservice.h
+++ b/indra/llcorehttp/_httpservice.h
@@ -28,9 +28,12 @@
#define _LLCORE_HTTP_SERVICE_H_
+#include <vector>
+
#include "httpcommon.h"
#include "httprequest.h"
#include "_httppolicyglobal.h"
+#include "_httppolicyclass.h"
namespace LLCoreInt
@@ -163,6 +166,14 @@ public:
{
return mPolicyGlobal;
}
+
+ HttpRequest::policy_t createPolicyClass();
+
+ HttpPolicyClass & getClassOptions(HttpRequest::policy_t policy_class)
+ {
+ llassert(policy_class >= 0 && policy_class < mPolicyClasses.size());
+ return mPolicyClasses[policy_class];
+ }
protected:
void threadRun(LLCoreInt::HttpThread * thread);
@@ -170,20 +181,21 @@ protected:
ELoopSpeed processRequestQueue(ELoopSpeed loop);
protected:
- static HttpService * sInstance;
+ static HttpService * sInstance;
// === shared data ===
- static volatile EState sState;
- HttpRequestQueue * mRequestQueue;
- volatile bool mExitRequested;
+ static volatile EState sState;
+ HttpRequestQueue * mRequestQueue;
+ volatile bool mExitRequested;
// === calling-thread-only data ===
- LLCoreInt::HttpThread * mThread;
- HttpPolicyGlobal mPolicyGlobal;
+ LLCoreInt::HttpThread * mThread;
+ HttpPolicyGlobal mPolicyGlobal;
+ std::vector<HttpPolicyClass> mPolicyClasses;
// === working-thread-only data ===
- HttpPolicy * mPolicy; // Simple pointer, has ownership
- HttpLibcurl * mTransport; // Simple pointer, has ownership
+ HttpPolicy * mPolicy; // Simple pointer, has ownership
+ HttpLibcurl * mTransport; // Simple pointer, has ownership
}; // end class HttpService
} // end namespace LLCore