summaryrefslogtreecommitdiff
path: root/indra/newview/llappcorehttp.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-06-19 13:55:54 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-06-19 13:55:54 -0400
commit626752beab7c12a355ab707d70aba6f4fe096c10 (patch)
tree6b73d3028b60934de70628d47f3c85c4803f357c /indra/newview/llappcorehttp.h
parent7c9d0b58aca072ff932b30f927e2876dfc6858aa (diff)
SH-4252 Add second policy class for large mesh asset downloads
Added second mesh class as well as an asset upload class. Refactored initialization to use less code and more data to cleanly get http started. Modified mesh to use the new http class for large requests (>2MB for now). Added additional timeout setting to llcorehttp to distinguish connection timeout from transport timeout and are now using transport timeout values for large asset downloads that may need more time.
Diffstat (limited to 'indra/newview/llappcorehttp.h')
-rwxr-xr-xindra/newview/llappcorehttp.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llappcorehttp.h b/indra/newview/llappcorehttp.h
index d90af9e5ca..532e1f5cb0 100755
--- a/indra/newview/llappcorehttp.h
+++ b/indra/newview/llappcorehttp.h
@@ -41,6 +41,19 @@
class LLAppCoreHttp : public LLCore::HttpHandler
{
public:
+ typedef LLCore::HttpRequest::policy_t policy_t;
+
+ enum EAppPolicy
+ {
+ AP_DEFAULT,
+ AP_TEXTURE,
+ AP_MESH,
+ AP_LARGE_MESH,
+ AP_UPLOADS,
+ AP_COUNT // Must be last
+ };
+
+public:
LLAppCoreHttp();
~LLAppCoreHttp();
@@ -65,22 +78,11 @@ public:
// Notification when the stop request is complete.
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
- // Retrieve the policy class for default operations.
- int getPolicyDefault() const
- {
- return mPolicyDefault;
- }
-
- // Get the texture fetch policy class.
- int getPolicyTexture() const
- {
- return mPolicyTexture;
- }
-
- // Get the mesh fetch policy class.
- int getPolicyMesh() const
+ // Retrieve a policy class identifier for desired
+ // application function.
+ policy_t getPolicy(EAppPolicy policy) const
{
- return mPolicyMesh;
+ return mPolicies[policy];
}
private:
@@ -91,9 +93,7 @@ private:
LLCore::HttpHandle mStopHandle;
F64 mStopRequested;
bool mStopped;
- int mPolicyDefault;
- int mPolicyTexture;
- int mPolicyMesh;
+ policy_t mPolicies[AP_COUNT];
};