From 3800c0df910c83e987184d541b868168fc2b5bec Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 8 May 2009 21:08:08 +0000 Subject: 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 --- indra/newview/llviewerregion.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerregion.h') 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 ®ion); + /// 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 - - -- cgit v1.2.3