diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/CMakeLists.txt | 25 | ||||
-rw-r--r-- | indra/llinventory/llinventorytype.cpp | 79 | ||||
-rw-r--r-- | indra/llinventory/llinventorytype.h | 3 | ||||
-rw-r--r-- | indra/llinventory/llparcel.cpp | 9 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 13 |
5 files changed, 86 insertions, 43 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 6b2b61f883..35a764b111 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -59,16 +59,17 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) -if(LL_TESTS) - #add unit tests - 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}") -endif(LL_TESTS) +#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}") + + #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/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index a99be1420b..d2bba21648 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -83,6 +83,7 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART)); addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); + addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); } @@ -91,32 +92,58 @@ LLInventoryDictionary::LLInventoryDictionary() static const LLInventoryType::EType DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = { - LLInventoryType::IT_TEXTURE, // AT_TEXTURE - LLInventoryType::IT_SOUND, // AT_SOUND - LLInventoryType::IT_CALLINGCARD, // AT_CALLINGCARD - LLInventoryType::IT_LANDMARK, // AT_LANDMARK - LLInventoryType::IT_LSL, // AT_SCRIPT - LLInventoryType::IT_WEARABLE, // AT_CLOTHING - LLInventoryType::IT_OBJECT, // AT_OBJECT - LLInventoryType::IT_NOTECARD, // AT_NOTECARD - LLInventoryType::IT_CATEGORY, // AT_CATEGORY - LLInventoryType::IT_NONE, // (null entry) - LLInventoryType::IT_LSL, // AT_LSL_TEXT - LLInventoryType::IT_LSL, // AT_LSL_BYTECODE - LLInventoryType::IT_TEXTURE, // AT_TEXTURE_TGA - LLInventoryType::IT_WEARABLE, // AT_BODYPART - LLInventoryType::IT_CATEGORY, // AT_TRASH - LLInventoryType::IT_CATEGORY, // AT_SNAPSHOT_CATEGORY - LLInventoryType::IT_CATEGORY, // AT_LOST_AND_FOUND - LLInventoryType::IT_SOUND, // AT_SOUND_WAV - LLInventoryType::IT_NONE, // AT_IMAGE_TGA - LLInventoryType::IT_NONE, // AT_IMAGE_JPEG - LLInventoryType::IT_ANIMATION, // AT_ANIMATION - LLInventoryType::IT_GESTURE, // AT_GESTURE - LLInventoryType::IT_NONE, // AT_SIMSTATE - - LLInventoryType::IT_NONE, // AT_LINK - LLInventoryType::IT_NONE, // AT_LINK_FOLDER + LLInventoryType::IT_TEXTURE, // 0 AT_TEXTURE + LLInventoryType::IT_SOUND, // 1 AT_SOUND + LLInventoryType::IT_CALLINGCARD, // 2 AT_CALLINGCARD + LLInventoryType::IT_LANDMARK, // 3 AT_LANDMARK + LLInventoryType::IT_LSL, // 4 AT_SCRIPT + LLInventoryType::IT_WEARABLE, // 5 AT_CLOTHING + LLInventoryType::IT_OBJECT, // 6 AT_OBJECT + LLInventoryType::IT_NOTECARD, // 7 AT_NOTECARD + LLInventoryType::IT_CATEGORY, // 8 AT_CATEGORY + LLInventoryType::IT_NONE, // 9 (null entry) + LLInventoryType::IT_LSL, // 10 AT_LSL_TEXT + LLInventoryType::IT_LSL, // 11 AT_LSL_BYTECODE + LLInventoryType::IT_TEXTURE, // 12 AT_TEXTURE_TGA + LLInventoryType::IT_WEARABLE, // 13 AT_BODYPART + LLInventoryType::IT_CATEGORY, // 14 AT_TRASH + LLInventoryType::IT_CATEGORY, // 15 AT_SNAPSHOT_CATEGORY + LLInventoryType::IT_CATEGORY, // 16 AT_LOST_AND_FOUND + LLInventoryType::IT_SOUND, // 17 AT_SOUND_WAV + LLInventoryType::IT_NONE, // 18 AT_IMAGE_TGA + LLInventoryType::IT_NONE, // 19 AT_IMAGE_JPEG + LLInventoryType::IT_ANIMATION, // 20 AT_ANIMATION + LLInventoryType::IT_GESTURE, // 21 AT_GESTURE + LLInventoryType::IT_NONE, // 22 AT_SIMSTATE + + LLInventoryType::IT_NONE, // 23 AT_LINK + LLInventoryType::IT_NONE, // 24 AT_LINK_FOLDER + + LLInventoryType::IT_NONE, // 25 AT_NONE + LLInventoryType::IT_NONE, // 26 AT_NONE + LLInventoryType::IT_NONE, // 27 AT_NONE + LLInventoryType::IT_NONE, // 28 AT_NONE + LLInventoryType::IT_NONE, // 29 AT_NONE + LLInventoryType::IT_NONE, // 30 AT_NONE + LLInventoryType::IT_NONE, // 31 AT_NONE + LLInventoryType::IT_NONE, // 32 AT_NONE + LLInventoryType::IT_NONE, // 33 AT_NONE + LLInventoryType::IT_NONE, // 34 AT_NONE + LLInventoryType::IT_NONE, // 35 AT_NONE + LLInventoryType::IT_NONE, // 36 AT_NONE + LLInventoryType::IT_NONE, // 37 AT_NONE + LLInventoryType::IT_NONE, // 38 AT_NONE + LLInventoryType::IT_NONE, // 39 AT_NONE + LLInventoryType::IT_NONE, // 40 AT_NONE + LLInventoryType::IT_NONE, // 41 AT_NONE + LLInventoryType::IT_NONE, // 42 AT_NONE + LLInventoryType::IT_NONE, // 43 AT_NONE + LLInventoryType::IT_NONE, // 44 AT_NONE + LLInventoryType::IT_NONE, // 45 AT_NONE + LLInventoryType::IT_NONE, // 46 AT_NONE + LLInventoryType::IT_NONE, // 47 AT_NONE + LLInventoryType::IT_NONE, // 48 AT_NONE + LLInventoryType::IT_MESH // 49 AT_MESH }; // static diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index d9777a73f2..1a24e351ad 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -61,7 +61,8 @@ public: IT_WEARABLE = 18, IT_ANIMATION = 19, IT_GESTURE = 20, - IT_COUNT = 21, + IT_MESH = 22, + IT_COUNT = 23, IT_NONE = -1 }; diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 0a4cd51ea0..e8cd871157 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1348,3 +1348,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; + } +} + diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 71b65d99ce..4893337967 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -34,7 +34,7 @@ #include "llpermissions.h" #include "lltimer.h" #include "v3math.h" - +#include "llaccountingquota.h" // Grid out of which parcels taken is stepped every 4 meters. const F32 PARCEL_GRID_STEP_METERS = 4.f; @@ -586,7 +586,11 @@ public: LLUUID getPreviousOwnerID() const { return mPreviousOwnerID; } BOOL getPreviouslyGroupOwned() const { return mPreviouslyGroupOwned; } BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; } - + + + void updateQuota( const LLUUID& objectId, const ParcelQuota& quota ); + const ParcelQuota& getQuota( void ) { return mQuota; } + protected: LLUUID mID; LLUUID mOwnerID; @@ -657,8 +661,9 @@ protected: BOOL mRegionPushOverride; BOOL mRegionDenyAnonymousOverride; BOOL mRegionDenyAgeUnverifiedOverride; - - + + ParcelQuota mQuota; + public: // HACK, make private S32 mLocalID; |