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.h96
1 files changed, 80 insertions, 16 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0f7ed9ce68..daa15b0c1a 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
@@ -292,7 +297,9 @@ public:
static void pressMicrophone(const LLSD& name);
static void releaseMicrophone(const LLSD& name);
+ static void toggleMicrophone(const LLSD& name);
static bool isMicrophoneOn(const LLSD& sdname);
+ static bool isActionAllowed(const LLSD& sdname);
private:
bool mVoiceConnected;
@@ -371,14 +378,13 @@ public:
void sitDown();
//--------------------------------------------------------------------
- // Busy
+ // Do Not Disturb
//--------------------------------------------------------------------
public:
- void setBusy();
- void clearBusy();
- BOOL getBusy() const;
+ void setDoNotDisturb(bool pIsDoNotDisturb);
+ bool isDoNotDisturb() const;
private:
- BOOL mIsBusy;
+ bool mIsDoNotDisturb;
//--------------------------------------------------------------------
// Grab
@@ -537,7 +543,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:
@@ -554,9 +561,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
@@ -570,6 +574,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);
@@ -595,7 +637,6 @@ public:
private:
bool mCanEditParcel;
- static bool isActionAllowed(const LLSD& sdname);
static void parcelChangedCallback();
/********************************************************************************
@@ -613,8 +654,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;
@@ -630,6 +669,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
//--------------------------------------------------------------------
@@ -649,13 +698,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);