summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
authorMonroe Williams <monroe@lindenlab.com>2009-08-27 19:00:18 +0000
committerMonroe Williams <monroe@lindenlab.com>2009-08-27 19:00:18 +0000
commit745845f79987e4b4ab7f5728746a0eda8898930f (patch)
treef10efd4a638a6a7eda92a960cdb97e5256ff736a /indra/newview/llviewerparcelmgr.cpp
parent71344b233d5ae3d5262a492b636af04544952611 (diff)
svn merge -r 129841:129910 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/pluginapi_05-merge@129910
svn merge -r 129913:131718 svn+ssh://svn.lindenlab.com/svn/linden/branches/pluginapi/pluginapi_05 Some branch shenannigans in the pluginapi_05 branch caused this to become a two-part merge.
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp65
1 files changed, 64 insertions, 1 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 9dafc4b9f5..ca3061e083 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -35,7 +35,7 @@
#include "llviewerparcelmgr.h"
// Library includes
-#include "audioengine.h"
+#include "llaudioengine.h"
#include "indra_constants.h"
#include "llcachename.h"
#include "llgl.h"
@@ -1603,6 +1603,9 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// Request access list information for this land
LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
+ // Request the media url filter list for this land
+ LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
+
// Request dwell for this land, if it's not public land.
LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f;
if (0 != local_id)
@@ -1926,6 +1929,66 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which)
}
}
+class LLParcelMediaURLFilterResponder : public LLHTTPClient::Responder
+{
+ virtual void result(const LLSD& content)
+ {
+ LLViewerParcelMgr::getInstance()->receiveParcelMediaURLFilter(content);
+ }
+};
+
+void LLViewerParcelMgr::requestParcelMediaURLFilter()
+{
+ if (!mSelected)
+ {
+ return;
+ }
+
+ LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
+ if (!region)
+ {
+ return;
+ }
+
+ LLParcel* parcel = mCurrentParcel;
+ if (!parcel)
+ {
+ llwarns << "no parcel" << llendl;
+ return;
+ }
+
+ LLSD body;
+ body["local-id"] = parcel->getLocalID();
+ body["list"] = parcel->getMediaURLFilterList();
+
+ std::string url = region->getCapability("ParcelMediaURLFilterList");
+ if (!url.empty())
+ {
+ LLHTTPClient::post(url, body, new LLParcelMediaURLFilterResponder);
+ }
+ else
+ {
+ llwarns << "can't get ParcelMediaURLFilterList cap" << llendl;
+ }
+}
+
+
+void LLViewerParcelMgr::receiveParcelMediaURLFilter(const LLSD &content)
+{
+ if (content.has("list"))
+ {
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel;
+ if (!parcel) return;
+
+ if (content["local-id"].asInteger() == parcel->getLocalID())
+ {
+ parcel->setMediaURLFilterList(content["list"]);
+
+ LLViewerParcelMgr::getInstance()->notifyObservers();
+ }
+ }
+}
+
void LLViewerParcelMgr::deedLandToGroup()
{