aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp80
1 files changed, 64 insertions, 16 deletions
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index 257ce0d..5326049 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -35,7 +35,7 @@
35#include "llviewerparcelmgr.h" 35#include "llviewerparcelmgr.h"
36 36
37// Library includes 37// Library includes
38#include "audioengine.h" 38#include "llaudioengine.h"
39#include "indra_constants.h" 39#include "indra_constants.h"
40#include "llcachename.h" 40#include "llcachename.h"
41#include "llgl.h" 41#include "llgl.h"
@@ -1605,6 +1605,9 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
1605 // Request access list information for this land 1605 // Request access list information for this land
1606 LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN); 1606 LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
1607 1607
1608 // Request the media url filter list for this land
1609 LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
1610
1608 // Request dwell for this land, if it's not public land. 1611 // Request dwell for this land, if it's not public land.
1609 LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f; 1612 LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f;
1610 if (0 != local_id) 1613 if (0 != local_id)
@@ -1732,21 +1735,6 @@ void optionally_start_music(const std::string& music_url)
1732 } 1735 }
1733} 1736}
1734 1737
1735
1736void callback_start_music(S32 option, void* data)
1737{
1738 if (option == 0)
1739 {
1740 // Before the callback, we verified the url was good.
1741 // We fetch again to avoid lag while loading.
1742 LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
1743 gAudiop->startInternetStream(parcel->getMusicURL());
1744
1745 LLOverlayBar::musicFirstRun();
1746 }
1747 gSavedSettings.setWarning("FirstStreamingMusic", FALSE);
1748}
1749
1750// static 1738// static
1751void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user) 1739void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user)
1752{ 1740{
@@ -1943,6 +1931,66 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which)
1943 } 1931 }
1944} 1932}
1945 1933
1934class LLParcelMediaURLFilterResponder : public LLHTTPClient::Responder
1935{
1936 virtual void result(const LLSD& content)
1937 {
1938 LLViewerParcelMgr::getInstance()->receiveParcelMediaURLFilter(content);
1939 }
1940};
1941
1942void LLViewerParcelMgr::requestParcelMediaURLFilter()
1943{
1944 if (!mSelected)
1945 {
1946 return;
1947 }
1948
1949 LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
1950 if (!region)
1951 {
1952 return;
1953 }
1954
1955 LLParcel* parcel = mCurrentParcel;
1956 if (!parcel)
1957 {
1958 llwarns << "no parcel" << llendl;
1959 return;
1960 }
1961
1962 LLSD body;
1963 body["local-id"] = parcel->getLocalID();
1964 body["list"] = parcel->getMediaURLFilterList();
1965
1966 std::string url = region->getCapability("ParcelMediaURLFilterList");
1967 if (!url.empty())
1968 {
1969 LLHTTPClient::post(url, body, new LLParcelMediaURLFilterResponder);
1970 }
1971 else
1972 {
1973 llwarns << "can't get ParcelMediaURLFilterList cap" << llendl;
1974 }
1975}
1976
1977
1978void LLViewerParcelMgr::receiveParcelMediaURLFilter(const LLSD &content)
1979{
1980 if (content.has("list"))
1981 {
1982 LLParcel* parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel;
1983 if (!parcel) return;
1984
1985 if (content["local-id"].asInteger() == parcel->getLocalID())
1986 {
1987 parcel->setMediaURLFilterList(content["list"]);
1988
1989 LLViewerParcelMgr::getInstance()->notifyObservers();
1990 }
1991 }
1992}
1993
1946 1994
1947void LLViewerParcelMgr::deedLandToGroup() 1995void LLViewerParcelMgr::deedLandToGroup()
1948{ 1996{