summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httppolicy.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/_httppolicy.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/_httppolicy.h')
-rw-r--r--indra/llcorehttp/_httppolicy.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h
index 05de9303b5..c93279bc83 100644
--- a/indra/llcorehttp/_httppolicy.h
+++ b/indra/llcorehttp/_httppolicy.h
@@ -33,6 +33,7 @@
#include "_httpreadyqueue.h"
#include "_httpretryqueue.h"
#include "_httppolicyglobal.h"
+#include "_httppolicyclass.h"
#include "_httpinternal.h"
@@ -92,26 +93,25 @@ public:
// Get pointer to global policy options. Caller is expected
// to do context checks like no setting once running.
- HttpPolicyGlobal & getGlobalOptions()
+ HttpPolicyGlobal & getGlobalOptions()
{
return mGlobalOptions;
}
- void setPolicies(const HttpPolicyGlobal & global);
+ void setPolicies(const HttpPolicyGlobal & global,
+ const std::vector<HttpPolicyClass> & classes);
+
// Get ready counts for a particular class
int getReadyCount(HttpRequest::policy_t policy_class);
protected:
- struct State
- {
- HttpReadyQueue mReadyQueue;
- HttpRetryQueue mRetryQueue;
- };
-
- State mState[POLICY_CLASS_LIMIT];
- HttpService * mService; // Naked pointer, not refcounted, not owner
- HttpPolicyGlobal mGlobalOptions;
+ struct State;
+
+ int mActiveClasses;
+ State * mState;
+ HttpService * mService; // Naked pointer, not refcounted, not owner
+ HttpPolicyGlobal mGlobalOptions;
}; // end class HttpPolicy