Cleanup of long dead code
This commit is contained in:
@@ -378,14 +378,7 @@
|
||||
<boolean>true</boolean>
|
||||
</map>
|
||||
|
||||
<key>ParcelMediaURLFilter</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
<string>llsd</string>
|
||||
<key>trusted-sender</key>
|
||||
<boolean>false</boolean>
|
||||
</map>
|
||||
|
||||
|
||||
<key>ParcelNavigateMedia</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
|
||||
@@ -200,8 +200,6 @@ void LLParcel::init(const LLUUID &owner_id,
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
mMediaURLFilterEnable = FALSE;
|
||||
mMediaURLFilterList = LLSD::emptyArray();
|
||||
mMediaAllowNavigate = TRUE;
|
||||
mMediaURLTimeout = 0.0f;
|
||||
mMediaPreventCameraZoom = FALSE;
|
||||
@@ -343,38 +341,6 @@ void LLParcel::setMediaURLResetTimer(F32 time)
|
||||
mMediaResetTimer.setTimerExpirySec(time);
|
||||
}
|
||||
|
||||
void LLParcel::setMediaURLFilterList(LLSD list)
|
||||
{
|
||||
// sanity check LLSD
|
||||
// must be array of strings
|
||||
if (!list.isArray())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (S32 i = 0; i < list.size(); i++)
|
||||
{
|
||||
if (!list[i].isString())
|
||||
return;
|
||||
}
|
||||
|
||||
// can't be too big
|
||||
const S32 MAX_SIZE = 50;
|
||||
if (list.size() > MAX_SIZE)
|
||||
{
|
||||
LLSD new_list = LLSD::emptyArray();
|
||||
|
||||
for (S32 i = 0; i < llmin(list.size(), MAX_SIZE); i++)
|
||||
{
|
||||
new_list.append(list[i]);
|
||||
}
|
||||
|
||||
list = new_list;
|
||||
}
|
||||
|
||||
mMediaURLFilterList = list;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLParcel::setLocalID(S32 local_id)
|
||||
{
|
||||
@@ -629,34 +595,6 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
|
||||
return input_stream.good();
|
||||
}
|
||||
|
||||
BOOL LLParcel::importMediaURLFilter(std::istream& input_stream, std::string& url)
|
||||
{
|
||||
skip_to_end_of_next_keyword("{", input_stream);
|
||||
|
||||
while(input_stream.good())
|
||||
{
|
||||
skip_comments_and_emptyspace(input_stream);
|
||||
std::string line, keyword, value;
|
||||
get_line(line, input_stream, MAX_STRING);
|
||||
get_keyword_and_value(keyword, value, line);
|
||||
|
||||
if ("}" == keyword)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ("url" == keyword)
|
||||
{
|
||||
url = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unknown keyword in parcel media url filter section: <"
|
||||
<< keyword << ">" << llendl;
|
||||
}
|
||||
}
|
||||
return input_stream.good();
|
||||
}
|
||||
|
||||
// Assumes we are in a block "ParcelData"
|
||||
void LLParcel::packMessage(LLMessageSystem* msg)
|
||||
{
|
||||
@@ -703,8 +641,6 @@ void LLParcel::packMessage(LLSD& msg)
|
||||
msg["media_allow_navigate"] = getMediaAllowNavigate();
|
||||
msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
|
||||
msg["media_url_timeout"] = getMediaURLTimeout();
|
||||
msg["media_url_filter_enable"] = getMediaURLFilterEnable();
|
||||
msg["media_url_filter_list"] = getMediaURLFilterList();
|
||||
msg["group_id"] = getGroupID();
|
||||
msg["pass_price"] = mPassPrice;
|
||||
msg["pass_hours"] = mPassHours;
|
||||
@@ -795,7 +731,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
|
||||
msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer);
|
||||
setMediaCurrentURL(buffer);
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate );
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaURLFilterEnable", mMediaURLFilterEnable );
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom );
|
||||
msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout);
|
||||
}
|
||||
@@ -1256,8 +1191,6 @@ void LLParcel::clearParcel()
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
setMediaURLFilterList(LLSD::emptyArray());
|
||||
setMediaURLFilterEnable(FALSE);
|
||||
setMediaAllowNavigate(TRUE);
|
||||
setMediaPreventCameraZoom(FALSE);
|
||||
setMediaURLTimeout(0.0f);
|
||||
|
||||
@@ -253,8 +253,6 @@ public:
|
||||
void setMediaWidth(S32 width);
|
||||
void setMediaHeight(S32 height);
|
||||
void setMediaCurrentURL(const std::string& url);
|
||||
void setMediaURLFilterEnable(U8 enable) { mMediaURLFilterEnable = enable; }
|
||||
void setMediaURLFilterList(LLSD list);
|
||||
void setMediaAllowNavigate(U8 enable) { mMediaAllowNavigate = enable; }
|
||||
void setMediaURLTimeout(F32 timeout) { mMediaURLTimeout = timeout; }
|
||||
void setMediaPreventCameraZoom(U8 enable) { mMediaPreventCameraZoom = enable; }
|
||||
@@ -317,7 +315,6 @@ public:
|
||||
// BOOL importStream(std::istream& input_stream);
|
||||
BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
|
||||
// BOOL exportStream(std::ostream& output_stream);
|
||||
BOOL importMediaURLFilter(std::istream& input_stream, std::string& url);
|
||||
|
||||
void packMessage(LLMessageSystem* msg);
|
||||
void packMessage(LLSD& msg);
|
||||
@@ -360,8 +357,6 @@ public:
|
||||
U8 getMediaAutoScale() const { return mMediaAutoScale; }
|
||||
U8 getMediaLoop() const { return mMediaLoop; }
|
||||
const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
|
||||
U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; }
|
||||
LLSD getMediaURLFilterList() const { return mMediaURLFilterList; }
|
||||
U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; }
|
||||
F32 getMediaURLTimeout() const { return mMediaURLTimeout; }
|
||||
U8 getMediaPreventCameraZoom() const { return mMediaPreventCameraZoom; }
|
||||
@@ -657,8 +652,6 @@ protected:
|
||||
U8 mMediaLoop;
|
||||
std::string mMediaCurrentURL;
|
||||
LLUUID mMediaID;
|
||||
U8 mMediaURLFilterEnable;
|
||||
LLSD mMediaURLFilterList;
|
||||
U8 mMediaAllowNavigate;
|
||||
U8 mMediaPreventCameraZoom;
|
||||
F32 mMediaURLTimeout;
|
||||
|
||||
@@ -1678,9 +1678,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
||||
// Request access list information for this land
|
||||
parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
|
||||
|
||||
// Request the media url filter list for this land
|
||||
parcel_mgr.requestParcelMediaURLFilter();
|
||||
|
||||
// Request dwell for this land, if it's not public land.
|
||||
parcel_mgr.mSelectedDwell = 0.f;
|
||||
if (0 != local_id)
|
||||
@@ -2010,67 +2007,6 @@ 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()
|
||||
{
|
||||
std::string group_name;
|
||||
|
||||
@@ -227,11 +227,6 @@ public:
|
||||
// Takes an Access List flag, like AL_ACCESS or AL_BAN
|
||||
void sendParcelAccessListRequest(U32 flags);
|
||||
|
||||
// asks for the parcel's media url filter list
|
||||
void requestParcelMediaURLFilter();
|
||||
// receive the response
|
||||
void receiveParcelMediaURLFilter(const LLSD &content);
|
||||
|
||||
// Dwell is not part of the usual parcel update information because the
|
||||
// simulator doesn't actually know the per-parcel dwell. Ack! We have
|
||||
// to get it out of the database.
|
||||
|
||||
@@ -1598,7 +1598,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
|
||||
#endif //MESH_IMPORT
|
||||
capabilityNames.append("NewFileAgentInventory");
|
||||
capabilityNames.append("ParcelPropertiesUpdate");
|
||||
capabilityNames.append("ParcelMediaURLFilterList");
|
||||
capabilityNames.append("ParcelNavigateMedia");
|
||||
capabilityNames.append("ParcelVoiceInfoRequest");
|
||||
capabilityNames.append("ProductInfoRequest");
|
||||
|
||||
Reference in New Issue
Block a user