summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.h')
-rw-r--r--indra/newview/llagent.h84
1 files changed, 74 insertions, 10 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 740770bbdf..99904e118c 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -35,6 +35,8 @@
#include "llcoordframe.h" // for mFrameAgent
#include "llvoavatardefines.h"
+#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
extern const BOOL ANIMATE;
@@ -56,6 +58,9 @@ class LLAgentAccess;
class LLSLURL;
class LLPauseRequestHandle;
class LLUIColor;
+class LLTeleportRequest;
+
+typedef boost::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
//--------------------------------------------------------------------
// Types
@@ -539,7 +544,8 @@ public:
TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator
TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator
TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches"
- TELEPORT_LOCAL = 6 // Teleporting in-sim without showing the progress screen
+ TELEPORT_LOCAL = 6, // Teleporting in-sim without showing the progress screen
+ TELEPORT_PENDING = 7
};
public:
@@ -556,9 +562,6 @@ private:
// Teleport Actions
//--------------------------------------------------------------------
public:
- void teleportRequest(const U64& region_handle,
- const LLVector3& pos_local, // Go to a named location home
- bool look_at_from_camera = false);
void teleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home
void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
@@ -572,6 +575,44 @@ protected:
//--------------------------------------------------------------------
// Teleport State
//--------------------------------------------------------------------
+
+public:
+ bool hasRestartableFailedTeleportRequest();
+ void restartFailedTeleportRequest();
+ void clearTeleportRequest();
+ void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange);
+
+private:
+ friend class LLTeleportRequest;
+ friend class LLTeleportRequestViaLandmark;
+ friend class LLTeleportRequestViaLure;
+ friend class LLTeleportRequestViaLocation;
+ friend class LLTeleportRequestViaLocationLookAt;
+
+ LLTeleportRequestPtr mTeleportRequest;
+ boost::signals2::connection mTeleportFinishedSlot;
+ boost::signals2::connection mTeleportFailedSlot;
+
+ bool mIsMaturityRatingChangingDuringTeleport;
+ U8 mMaturityRatingChange;
+
+ bool hasPendingTeleportRequest();
+ void startTeleportRequest();
+
+ void teleportRequest(const U64& region_handle,
+ const LLVector3& pos_local, // Go to a named location home
+ bool look_at_from_camera = false);
+ void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
+ void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
+ void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
+ void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
+
+ void handleTeleportFinished();
+ void handleTeleportFailed();
+
+ //--------------------------------------------------------------------
+ // Teleport State
+ //--------------------------------------------------------------------
public:
ETeleportState getTeleportState() const { return mTeleportState; }
void setTeleportState(ETeleportState state);
@@ -614,8 +655,6 @@ public:
const LLAgentAccess& getAgentAccess();
BOOL canManageEstate() const;
BOOL getAdminOverride() const;
- // ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp).
- void setAOTransition();
private:
LLAgentAccess * mAgentAccess;
@@ -631,6 +670,16 @@ public:
void requestEnterGodMode();
void requestLeaveGodMode();
+ typedef boost::function<void (U8)> god_level_change_callback_t;
+ typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
+ typedef boost::signals2::connection god_level_change_slot_t;
+
+ god_level_change_slot_t registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback);
+
+private:
+ god_level_change_signal_t mGodLevelChangeSignal;
+
+
//--------------------------------------------------------------------
// Maturity
//--------------------------------------------------------------------
@@ -650,13 +699,28 @@ public:
bool isTeen() const;
bool isMature() const;
bool isAdult() const;
- void setTeen(bool teen);
void setMaturity(char text);
- static int convertTextToMaturity(char text);
- bool sendMaturityPreferenceToServer(int preferredMaturity); // ! "U8" instead of "int"?
+ static int convertTextToMaturity(char text);
+
+private:
+ bool mIsDoSendMaturityPreferenceToServer;
+ unsigned int mMaturityPreferenceRequestId;
+ unsigned int mMaturityPreferenceResponseId;
+ unsigned int mMaturityPreferenceNumRetries;
+ U8 mLastKnownRequestMaturity;
+ U8 mLastKnownResponseMaturity;
+
+ bool isMaturityPreferenceSyncedWithServer() const;
+ void sendMaturityPreferenceToServer(U8 pPreferredMaturity);
+
+ friend class LLMaturityPreferencesResponder;
+ void handlePreferredMaturityResult(U8 pServerMaturity);
+ void handlePreferredMaturityError();
+ void reportPreferredMaturitySuccess();
+ void reportPreferredMaturityError();
// Maturity callbacks for PreferredMaturity control variable
- void handleMaturity(const LLSD& newvalue);
+ void handleMaturity(const LLSD &pNewValue);
bool validateMaturity(const LLSD& newvalue);