summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-05-08 21:08:08 +0000
committerNat Goodspeed <nat@lindenlab.com>2009-05-08 21:08:08 +0000
commit3800c0df910c83e987184d541b868168fc2b5bec (patch)
tree91bcf4e13972ae02b9d6500c1d14de7bb8d37dc4 /indra/newview/llviewerregion.h
parent5da967dc744f35d5270c7cb0b8b23b993ecda3e1 (diff)
svn merge -r114679:114681 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-7 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-8
Diffstat (limited to 'indra/newview/llviewerregion.h')
-rw-r--r--indra/newview/llviewerregion.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index f43167f93a..35f374a4c8 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -49,6 +49,8 @@
#include "lldatapacker.h"
#include "llvocache.h"
#include "llweb.h"
+#include "llcapabilityprovider.h"
+#include "llcapabilitylistener.h"
// Surface id's
#define LAND 1
@@ -66,8 +68,9 @@ class LLSurface;
class LLVOCache;
class LLVOCacheEntry;
class LLSpatialPartition;
+class LLEventPump;
-class LLViewerRegion
+class LLViewerRegion: public LLCapabilityProvider // implements this interface
{
public:
//MUST MATCH THE ORDER OF DECLARATION IN CONSTRUCTOR
@@ -226,11 +229,19 @@ public:
// Get/set named capability URLs for this region.
void setSeedCapability(const std::string& url);
void setCapability(const std::string& name, const std::string& url);
- std::string getCapability(const std::string& name) const;
+ // implements LLCapabilityProvider
+ virtual std::string getCapability(const std::string& name) const;
static bool isSpecialCapabilityName(const std::string &name);
void logActiveCapabilities() const;
- const LLHost &getHost() const { return mHost; }
+ /// Capability-request exception
+ typedef LLCapabilityListener::ArgError ArgError;
+ /// Get LLEventPump on which we listen for capability requests
+ /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+ LLEventPump& getCapAPI() { return mCapabilityListener.getCapAPI(); }
+
+ /// implements LLCapabilityProvider
+ virtual LLHost getHost() const { return mHost; }
const U64 &getHandle() const { return mHandle; }
LLSurface &getLand() const { return *mLandp; }
@@ -274,6 +285,8 @@ public:
void calculateCameraDistance();
friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region);
+ /// implements LLCapabilityProvider
+ virtual std::string getDescription() const;
LLSpatialPartition* getSpatialPartition(U32 type);
public:
@@ -391,6 +404,11 @@ private:
LLEventPoll* mEventPoll;
+ /// Post an event to this LLCapabilityListener to invoke a capability message on
+ /// this LLViewerRegion's server
+ /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+ LLCapabilityListener mCapabilityListener;
+
private:
bool mAlive; // can become false if circuit disconnects
@@ -458,5 +476,3 @@ inline BOOL LLViewerRegion::getReleaseNotesRequested() const
}
#endif
-
-