summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpopsetget.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-07-12 15:00:24 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-07-12 15:00:24 -0400
commiteff651cffca60f2b69f6c596a8e9aa9e1ab44d3c (patch)
tree43b7a995f0e3df6942643735e6e1ea615e7a1b0c /indra/llcorehttp/_httpopsetget.h
parentfb734d621e6fa2004d191849783e81da75992d06 (diff)
SH-4312 Configuration data between viewer and llcorehttp is clumsy.
Much improved. Unified the global and class options into a single option list. Implemented static and dynamic setting paths as much as possible. Dynamic path does require packet/RPC but otherwise there's near unification. Dynamic modes can't get values back yet due to the response/notifier scheme but this doesn't bother me. Flatten global and class options into simpler struct-like entities. Setter/getter available on these when needed (external APIs) but code can otherwise fiddle directly when it knows what to do. Much duplicated options/state removed from HttpPolicy. Comments cleaned up. Threads better described and consistently mentioned in API docs. Integration test extended for 503 responses with Reply-After headers.
Diffstat (limited to 'indra/llcorehttp/_httpopsetget.h')
-rwxr-xr-xindra/llcorehttp/_httpopsetget.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h
index 6966b9d94e..a1e76dd429 100755
--- a/indra/llcorehttp/_httpopsetget.h
+++ b/indra/llcorehttp/_httpopsetget.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2012, Linden Research, Inc.
+ * Copyright (C) 2012-2013, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -46,7 +46,10 @@ namespace LLCore
/// configuration settings.
///
/// *NOTE: Expect this to change. Don't really like it yet.
-
+///
+/// *TODO: Can't return values to caller yet. Need to do
+/// something better with HttpResponse and visitNotifier().
+///
class HttpOpSetGet : public HttpOperation
{
public:
@@ -61,19 +64,23 @@ private:
public:
/// Threading: called by application thread
- void setupGet(HttpRequest::EGlobalPolicy setting);
- void setupSet(HttpRequest::EGlobalPolicy setting, const std::string & value);
+ HttpStatus setupGet(HttpRequest::EPolicyOption opt, HttpRequest::policy_t pclass);
+ HttpStatus setupSet(HttpRequest::EPolicyOption opt, HttpRequest::policy_t pclass, long value);
+ HttpStatus setupSet(HttpRequest::EPolicyOption opt, HttpRequest::policy_t pclass, const std::string & value);
virtual void stageFromRequest(HttpService *);
public:
// Request data
- bool mIsGlobal;
- bool mDoSet;
- int mSetting;
- long mLongValue;
- std::string mStrValue;
-
+ HttpRequest::EPolicyOption mReqOption;
+ HttpRequest::policy_t mReqClass;
+ bool mReqDoSet;
+ long mReqLongValue;
+ std::string mReqStrValue;
+
+ // Reply Data
+ long mReplyLongValue;
+ std::string mReplyStrValue;
}; // end class HttpOpSetGet