summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.h')
-rwxr-xr-xindra/newview/llagent.h37
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 9e8550e280..3a533c2cba 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -34,7 +34,10 @@
#include "llcoordframe.h" // for mFrameAgent
#include "llavatarappearancedefines.h"
#include "llpermissionsflags.h"
+#include "llevents.h"
#include "v3dmath.h"
+#include "httprequest.h"
+#include "llcorehttputil.h"
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
@@ -61,6 +64,8 @@ class LLPauseRequestHandle;
class LLUIColor;
class LLTeleportRequest;
+
+
typedef boost::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
//--------------------------------------------------------------------
@@ -112,6 +117,8 @@ public:
void init();
void cleanup();
+private:
+
//--------------------------------------------------------------------
// Login
//--------------------------------------------------------------------
@@ -227,6 +234,8 @@ public:
void setHomePosRegion(const U64& region_handle, const LLVector3& pos_region);
BOOL getHomePosGlobal(LLVector3d* pos_global);
private:
+ void setStartPositionSuccess(const LLSD &result);
+
BOOL mHaveHomePosition;
U64 mHomeRegionHandle;
LLVector3 mHomePosRegion;
@@ -254,6 +263,9 @@ public:
LLHost getRegionHost() const;
BOOL inPrelude();
+ // Capability
+ std::string getRegionCapability(const std::string &name); // short hand for if (getRegion()) { getRegion()->getCapability(name) }
+
/**
* Register a boost callback to be called when the agent changes regions
* Note that if you need to access a capability for the region, you may need to wait
@@ -634,6 +646,8 @@ public:
void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange);
private:
+
+
friend class LLTeleportRequest;
friend class LLTeleportRequestViaLandmark;
friend class LLTeleportRequestViaLure;
@@ -666,7 +680,7 @@ private:
// Teleport State
//--------------------------------------------------------------------
public:
- ETeleportState getTeleportState() const { return mTeleportState; }
+ ETeleportState getTeleportState() const;
void setTeleportState(ETeleportState state);
private:
ETeleportState mTeleportState;
@@ -762,11 +776,12 @@ private:
unsigned int mMaturityPreferenceNumRetries;
U8 mLastKnownRequestMaturity;
U8 mLastKnownResponseMaturity;
+ LLCore::HttpRequest::policy_t mHttpPolicy;
bool isMaturityPreferenceSyncedWithServer() const;
void sendMaturityPreferenceToServer(U8 pPreferredMaturity);
+ void processMaturityPreferenceFromServer(const LLSD &result, U8 perferredMaturity);
- friend class LLMaturityPreferencesResponder;
void handlePreferredMaturityResult(U8 pServerMaturity);
void handlePreferredMaturityError();
void reportPreferredMaturitySuccess();
@@ -915,6 +930,24 @@ public:
/********************************************************************************
** **
+ ** UTILITY
+ **/
+public:
+ typedef LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t httpCallback_t;
+
+ /// Utilities for allowing the the agent sub managers to post and get via
+ /// HTTP using the agent's policy settings and headers.
+ bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+
+ LLCore::HttpRequest::policy_t getAgentPolicy() const { return mHttpPolicy; }
+
+/** Utility
+ ** **
+ *******************************************************************************/
+
+/********************************************************************************
+ ** **
** DEBUGGING
**/