diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 16:35:55 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 16:35:55 -0700 |
commit | 9bfae21706288802f94d642eb252ac78b4d9e85c (patch) | |
tree | fe02b30f05ba6a515212e35a018e97a81a27dfed /indra/llinventory | |
parent | f393774caf49313f24d33cb2b33b6ad92c70977f (diff) |
ER-858: Add viewer checkbox to toggle parcel privacy settings. Reviewed by Kelly
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llparcel.cpp | 10 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 12 |
2 files changed, 20 insertions, 2 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 0a4cd51ea0..7562bb8320 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -702,7 +702,7 @@ 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["privacy"] = (LLSD::Boolean) getPrivacy(); } @@ -721,6 +721,14 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); + BOOL private_parcel = FALSE; + bool have_privacy_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_Privacy) > 0); + if (have_privacy_data) + { + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_Privacy, private_parcel); + } + setPrivacy((bool) private_parcel); + // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 71b65d99ce..4d2236ec66 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -75,7 +75,7 @@ const U8 PARCEL_AUCTION = 0x05; // unused 0x06 // unused 0x07 // flag, unused 0x08 -// flag, unused 0x10 +const U8 PARCEL_PRIVATE = 0x10; const U8 PARCEL_SOUND_LOCAL = 0x20; const U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge const U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge @@ -130,6 +130,12 @@ class LLSD; class LLAccessEntry { public: + LLAccessEntry() + : mID(), + mTime(0), + mFlags(0) + {} + LLUUID mID; // Agent ID S32 mTime; // Time (unix seconds) when entry expires U32 mFlags; // Not used - currently should always be zero @@ -265,6 +271,7 @@ public: void setUserLocation(const LLVector3& pos) { mUserLocation = pos; } void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; } void setLandingType(const ELandingType type) { mLandingType = type; } + void setPrivacy(bool privacy) { mPrivacy = privacy; } void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} @@ -367,6 +374,8 @@ public: const LLVector3& getUserLocation() const { return mUserLocation; } const LLVector3& getUserLookAt() const { return mUserLookAt; } ELandingType getLandingType() const { return mLandingType; } + bool getPrivacy() const { return mPrivacy; } + // User-specified snapshot const LLUUID& getSnapshotID() const { return mSnapshotID; } @@ -602,6 +611,7 @@ protected: LLVector3 mUserLocation; LLVector3 mUserLookAt; ELandingType mLandingType; + bool mPrivacy; LLTimer mSaleTimerExpires; LLTimer mMediaResetTimer; |