diff options
Diffstat (limited to 'indra/llinventory/llparcel.cpp')
-rw-r--r-- | indra/llinventory/llparcel.cpp | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 488bd45d8f..c95f922301 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -72,6 +72,7 @@ static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] = "shopping", "stage", "other", + "rental" }; static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] = { @@ -89,6 +90,7 @@ static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] = "Shopping", "Stage", "Other", + "Rental", "Any", // valid string for parcel searches }; @@ -188,8 +190,6 @@ void LLParcel::init(const LLUUID &owner_id, mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); @@ -226,6 +226,11 @@ void LLParcel::init(const LLUUID &owner_id, setPreviousOwnerID(LLUUID::null); setPreviouslyGroupOwned(FALSE); + + setSeeAVs(TRUE); + setAllowGroupAVSounds(TRUE); + setAllowAnyAVSounds(TRUE); + setHaveNewParcelLimitData(FALSE); } void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned) @@ -685,8 +690,8 @@ void LLParcel::packMessage(LLSD& msg) msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["media_current_url"] = getMediaCurrentURL(); - msg["obscure_media"] = getObscureMedia(); - msg["obscure_music"] = getObscureMusic(); + msg["obscure_media"] = false; // OBSOLETE - no longer used + msg["obscure_music"] = false; // OBSOLETE - no longer used msg["media_id"] = getMediaID(); msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); @@ -702,7 +707,9 @@ void LLParcel::packMessage(LLSD& msg) msg["user_location"] = ll_sd_from_vector3(mUserLocation); msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt); msg["landing_type"] = (U8)mLandingType; - + msg["see_avs"] = (LLSD::Boolean) getSeeAVs(); + msg["group_av_sounds"] = (LLSD::Boolean) getAllowGroupAVSounds(); + msg["any_av_sounds"] = (LLSD::Boolean) getAllowAnyAVSounds(); } @@ -721,6 +728,24 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); + BOOL see_avs = TRUE; // All default to true for legacy server behavior + BOOL any_av_sounds = TRUE; + BOOL group_av_sounds = TRUE; + bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0); + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0); + if (have_new_parcel_limit_data) + { + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_SeeAVs, see_avs); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds, any_av_sounds); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds, group_av_sounds); + } + setSeeAVs((bool) see_avs); + setAllowAnyAVSounds((bool) any_av_sounds); + setAllowGroupAVSounds((bool) group_av_sounds); + + setHaveNewParcelLimitData(have_new_parcel_limit_data); + // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); @@ -750,16 +775,13 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); - msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia ); - msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic ); + // the ObscureMedia and ObscureMusic flags previously set here are no longer used } else { setMediaType(std::string("video/vnd.secondlife.qt.legacy")); setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; - mObscureMedia = true; - mObscureMusic = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) @@ -1225,8 +1247,6 @@ void LLParcel::clearParcel() setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); setMediaLoop(TRUE); - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); @@ -1353,3 +1373,12 @@ LLParcel::ECategory category_ui_string_to_category(const std::string& s) // is a distinct option from "None" and "Other" return LLParcel::C_ANY; } + +void LLParcel::updateQuota( const LLUUID& objectId, const ParcelQuota& quota ) +{ + if ( mID == objectId ) + { + mQuota = quota; + } +} + |