summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-09-09 14:20:19 -0400
committerLogan Dethrow <log@lindenlab.com>2011-09-09 14:20:19 -0400
commit8a952e42e97cfb286192aba0fbfc43986912cd29 (patch)
tree6aa00aad42189239aa81972328e057afc215bf7d /indra/llinventory
parentc47b398b75fcdbb479ad9ad2765014c5fa338df7 (diff)
parent89b9800579a37fbbdfca7789716a2d012d96cfa5 (diff)
Removed some spurious newlines that I introduced into CMakeLists.txt.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/CMakeLists.txt18
-rw-r--r--indra/llinventory/llinventory.cpp3
-rw-r--r--indra/llinventory/llparcel.cpp27
-rw-r--r--indra/llinventory/llparcel.h21
-rw-r--r--indra/llinventory/llparcelflags.h2
5 files changed, 60 insertions, 11 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 35a764b111..e45c809e7e 100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -62,14 +62,14 @@ add_library (llinventory ${llinventory_SOURCE_FILES})
#add unit tests
if (LL_TESTS)
- INCLUDE(LLAddBuildTest)
- SET(llinventory_TEST_SOURCE_FILES
- # no real unit tests yet!
- )
- LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
+ INCLUDE(LLAddBuildTest)
+ SET(llinventory_TEST_SOURCE_FILES
+ # no real unit tests yet!
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
- #set(TEST_DEBUG on)
- set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
- LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
- LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
+ #set(TEST_DEBUG on)
+ set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
+ LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index a3caf79519..76760aa414 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1034,8 +1034,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
+LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
+
bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
+ LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE);
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
std::string w;
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index e8cd871157..c95f922301 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -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)
@@ -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 );
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 4893337967..ff35caab4c 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_HIDDENAVS = 0x10; // avatars not visible outside of parcel. Used for 'see avs' feature, but must be off for compatibility
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,8 @@ public:
void setUserLocation(const LLVector3& pos) { mUserLocation = pos; }
void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; }
void setLandingType(const ELandingType type) { mLandingType = type; }
+ void setSeeAVs(BOOL see_avs) { mSeeAVs = see_avs; }
+ void setHaveNewParcelLimitData(bool have_new_parcel_data) { mHaveNewParcelLimitData = have_new_parcel_data; } // Remove this once hidden AV feature is fully available grid-wide
void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
@@ -291,6 +299,8 @@ public:
void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); }
void setDenyAgeUnverified(BOOL b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); }
void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); }
+ void setAllowGroupAVSounds(BOOL b) { mAllowGroupAVSounds = b; }
+ void setAllowAnyAVSounds(BOOL b) { mAllowAnyAVSounds = b; }
void setDrawDistance(F32 dist) { mDrawDistance = dist; }
void setSalePrice(S32 price) { mSalePrice = price; }
@@ -367,6 +377,8 @@ public:
const LLVector3& getUserLocation() const { return mUserLocation; }
const LLVector3& getUserLookAt() const { return mUserLookAt; }
ELandingType getLandingType() const { return mLandingType; }
+ BOOL getSeeAVs() const { return mSeeAVs; }
+ BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
// User-specified snapshot
const LLUUID& getSnapshotID() const { return mSnapshotID; }
@@ -496,6 +508,9 @@ public:
BOOL getRegionDenyAgeUnverifiedOverride() const
{ return mRegionDenyAgeUnverifiedOverride; }
+ BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; }
+ BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; }
+
F32 getDrawDistance() const { return mDrawDistance; }
S32 getSalePrice() const { return mSalePrice; }
time_t getClaimDate() const { return mClaimDate; }
@@ -606,6 +621,8 @@ protected:
LLVector3 mUserLocation;
LLVector3 mUserLookAt;
ELandingType mLandingType;
+ BOOL mSeeAVs; // Avatars on this parcel are visible from outside it
+ BOOL mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide
LLTimer mSaleTimerExpires;
LLTimer mMediaResetTimer;
@@ -661,6 +678,8 @@ protected:
BOOL mRegionPushOverride;
BOOL mRegionDenyAnonymousOverride;
BOOL mRegionDenyAgeUnverifiedOverride;
+ BOOL mAllowGroupAVSounds;
+ BOOL mAllowAnyAVSounds;
ParcelQuota mQuota;
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index a61130132a..b1a917df73 100644
--- a/indra/llinventory/llparcelflags.h
+++ b/indra/llinventory/llparcelflags.h
@@ -126,5 +126,7 @@ const S32 PARCEL_DETAILS_DESC = 1;
const S32 PARCEL_DETAILS_OWNER = 2;
const S32 PARCEL_DETAILS_GROUP = 3;
const S32 PARCEL_DETAILS_AREA = 4;
+const S32 PARCEL_DETAILS_ID = 5;
+const S32 PARCEL_DETAILS_SEE_AVATARS = 6;
#endif