summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rwxr-xr-x[-rw-r--r--]indra/llinventory/CMakeLists.txt23
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llcategory.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llcategory.h2
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lleconomy.cpp71
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lleconomy.h17
-rwxr-xr-xindra/llinventory/llfoldertype.cpp169
-rwxr-xr-xindra/llinventory/llfoldertype.h111
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventory.cpp194
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventory.h27
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventorydefines.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventorydefines.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventorytype.cpp81
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llinventorytype.h52
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lllandmark.cpp20
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lllandmark.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llnotecard.cpp36
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llnotecard.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llparcel.cpp242
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llparcel.h63
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llparcelflags.h2
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llpermissions.cpp30
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llpermissions.h6
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llpermissionsflags.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llsaleinfo.cpp12
-rwxr-xr-x[-rw-r--r--]indra/llinventory/llsaleinfo.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lltransactionflags.cpp8
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lltransactionflags.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lltransactiontypes.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lluserrelations.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/lluserrelations.h0
-rwxr-xr-x[-rw-r--r--]indra/llinventory/tests/inventorymisc_test.cpp12
-rwxr-xr-x[-rw-r--r--]indra/llinventory/tests/llparcel_test.cpp0
32 files changed, 719 insertions, 459 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 6b2b61f883..0a1f93bd80 100644..100755
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -19,6 +19,7 @@ include_directories(
set(llinventory_SOURCE_FILES
llcategory.cpp
lleconomy.cpp
+ llfoldertype.cpp
llinventory.cpp
llinventorydefines.cpp
llinventorytype.cpp
@@ -36,6 +37,7 @@ set(llinventory_HEADER_FILES
llcategory.h
lleconomy.h
+ llfoldertype.h
llinventory.h
llinventorydefines.h
llinventorytype.h
@@ -59,16 +61,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
+
+#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}")
+ 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)
+ #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/llcategory.cpp b/indra/llinventory/llcategory.cpp
index 97a496845b..97a496845b 100644..100755
--- a/indra/llinventory/llcategory.cpp
+++ b/indra/llinventory/llcategory.cpp
diff --git a/indra/llinventory/llcategory.h b/indra/llinventory/llcategory.h
index 19ce8fa89b..390a8a1f1e 100644..100755
--- a/indra/llinventory/llcategory.h
+++ b/indra/llinventory/llcategory.h
@@ -43,7 +43,7 @@
// S32 count = LLCategory::none.getSubCategoryCount();
// for(S32 i = 0; i < count; i++)
// {
-// llinfos << none.getSubCategory(i).lookupNmae() << llendl;
+// LL_INFOS() << none.getSubCategory(i).lookupNmae() << LL_ENDL;
// }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp
index c6eaa6d3e1..e10402196f 100644..100755
--- a/indra/llinventory/lleconomy.cpp
+++ b/indra/llinventory/lleconomy.cpp
@@ -48,6 +48,31 @@ LLGlobalEconomy::LLGlobalEconomy()
LLGlobalEconomy::~LLGlobalEconomy()
{ }
+void LLGlobalEconomy::addObserver(LLEconomyObserver* observer)
+{
+ mObservers.push_back(observer);
+}
+
+void LLGlobalEconomy::removeObserver(LLEconomyObserver* observer)
+{
+ std::list<LLEconomyObserver*>::iterator it =
+ std::find(mObservers.begin(), mObservers.end(), observer);
+ if (it != mObservers.end())
+ {
+ mObservers.erase(it);
+ }
+}
+
+void LLGlobalEconomy::notifyObservers()
+{
+ for (std::list<LLEconomyObserver*>::iterator it = mObservers.begin();
+ it != mObservers.end();
+ ++it)
+ {
+ (*it)->onEconomyDataChange();
+ }
+}
+
// static
void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data)
{
@@ -76,7 +101,7 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy*
if (fakeprice_str)
{
S32 fakeprice = (S32)atoi(fakeprice_str);
- llwarns << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << llendl;
+ LL_WARNS() << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << LL_ENDL;
econ_data->setPriceUpload(fakeprice);
}
#endif
@@ -88,6 +113,8 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy*
econ_data->setTeleportPriceExponent(f);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i);
econ_data->setPriceGroupCreate(i);
+
+ econ_data->notifyObservers();
}
S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const
@@ -116,19 +143,19 @@ S32 LLGlobalEconomy::calculateLightRent(const LLVector3& object_size) const
void LLGlobalEconomy::print()
{
- llinfos << "Global Economy Settings: " << llendl;
- llinfos << "Object Capacity: " << mObjectCapacity << llendl;
- llinfos << "Object Count: " << mObjectCount << llendl;
- llinfos << "Claim Price Per Object: " << mPriceObjectClaim << llendl;
- llinfos << "Claim Price Per Public Object: " << mPricePublicObjectDecay << llendl;
- llinfos << "Delete Price Per Public Object: " << mPricePublicObjectDelete << llendl;
- llinfos << "Release Price Per Public Object: " << getPricePublicObjectRelease() << llendl;
- llinfos << "Price Per Energy Unit: " << mPriceEnergyUnit << llendl;
- llinfos << "Price Per Upload: " << mPriceUpload << llendl;
- llinfos << "Light Base Price: " << mPriceRentLight << llendl;
- llinfos << "Teleport Min Price: " << mTeleportMinPrice << llendl;
- llinfos << "Teleport Price Exponent: " << mTeleportPriceExponent << llendl;
- llinfos << "Price for group creation: " << mPriceGroupCreate << llendl;
+ LL_INFOS() << "Global Economy Settings: " << LL_ENDL;
+ LL_INFOS() << "Object Capacity: " << mObjectCapacity << LL_ENDL;
+ LL_INFOS() << "Object Count: " << mObjectCount << LL_ENDL;
+ LL_INFOS() << "Claim Price Per Object: " << mPriceObjectClaim << LL_ENDL;
+ LL_INFOS() << "Claim Price Per Public Object: " << mPricePublicObjectDecay << LL_ENDL;
+ LL_INFOS() << "Delete Price Per Public Object: " << mPricePublicObjectDelete << LL_ENDL;
+ LL_INFOS() << "Release Price Per Public Object: " << getPricePublicObjectRelease() << LL_ENDL;
+ LL_INFOS() << "Price Per Energy Unit: " << mPriceEnergyUnit << LL_ENDL;
+ LL_INFOS() << "Price Per Upload: " << mPriceUpload << LL_ENDL;
+ LL_INFOS() << "Light Base Price: " << mPriceRentLight << LL_ENDL;
+ LL_INFOS() << "Teleport Min Price: " << mTeleportMinPrice << LL_ENDL;
+ LL_INFOS() << "Teleport Price Exponent: " << mTeleportPriceExponent << LL_ENDL;
+ LL_INFOS() << "Price for group creation: " << mPriceGroupCreate << LL_ENDL;
}
LLRegionEconomy::LLRegionEconomy()
@@ -182,8 +209,8 @@ void LLRegionEconomy::processEconomyDataRequest(LLMessageSystem *msg, void **use
LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data;
if (!this_ptr->hasData())
{
- llwarns << "Dropping EconomyDataRequest, because EconomyData message "
- << "has not been processed" << llendl;
+ LL_WARNS() << "Dropping EconomyDataRequest, because EconomyData message "
+ << "has not been processed" << LL_ENDL;
}
msg->newMessageFast(_PREHASH_EconomyData);
@@ -227,12 +254,12 @@ void LLRegionEconomy::print()
{
this->LLGlobalEconomy::print();
- llinfos << "Region Economy Settings: " << llendl;
- llinfos << "Land (square meters): " << mAreaTotal << llendl;
- llinfos << "Owned Land (square meters): " << mAreaOwned << llendl;
- llinfos << "Daily Object Rent: " << mPriceObjectRent << llendl;
- llinfos << "Daily Land Rent (per meter): " << getPriceParcelRent() << llendl;
- llinfos << "Energey Efficiency: " << mEnergyEfficiency << llendl;
+ LL_INFOS() << "Region Economy Settings: " << LL_ENDL;
+ LL_INFOS() << "Land (square meters): " << mAreaTotal << LL_ENDL;
+ LL_INFOS() << "Owned Land (square meters): " << mAreaOwned << LL_ENDL;
+ LL_INFOS() << "Daily Object Rent: " << mPriceObjectRent << LL_ENDL;
+ LL_INFOS() << "Daily Land Rent (per meter): " << getPriceParcelRent() << LL_ENDL;
+ LL_INFOS() << "Energey Efficiency: " << mEnergyEfficiency << LL_ENDL;
}
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h
index cc6643f955..47fcf688a2 100644..100755
--- a/indra/llinventory/lleconomy.h
+++ b/indra/llinventory/lleconomy.h
@@ -27,10 +27,21 @@
#define LL_LLECONOMY_H
#include "llsingleton.h"
+#include <list>
class LLMessageSystem;
class LLVector3;
+/**
+ * Register an observer to be notified of economy data updates coming from server.
+ */
+class LLEconomyObserver
+{
+public:
+ virtual ~LLEconomyObserver() {}
+ virtual void onEconomyDataChange() = 0;
+};
+
class LLGlobalEconomy
{
public:
@@ -46,6 +57,10 @@ public:
virtual void print();
+ void addObserver(LLEconomyObserver* observer);
+ void removeObserver(LLEconomyObserver* observer);
+ void notifyObservers();
+
static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data);
S32 calculateTeleportCost(F32 distance) const;
@@ -89,6 +104,8 @@ private:
S32 mTeleportMinPrice;
F32 mTeleportPriceExponent;
S32 mPriceGroupCreate;
+
+ std::list<LLEconomyObserver*> mObservers;
};
diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp
new file mode 100755
index 0000000000..23bf6da1f9
--- /dev/null
+++ b/indra/llinventory/llfoldertype.cpp
@@ -0,0 +1,169 @@
+/**
+ * @file llfoldertype.cpp
+ * @brief Implementatino of LLFolderType functionality.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llfoldertype.h"
+#include "lldictionary.h"
+#include "llmemory.h"
+#include "llsingleton.h"
+
+///----------------------------------------------------------------------------
+/// Class LLFolderType
+///----------------------------------------------------------------------------
+struct FolderEntry : public LLDictionaryEntry
+{
+ FolderEntry(const std::string &type_name, // 8 character limit!
+ bool is_protected) // can the viewer change categories of this type?
+ :
+ LLDictionaryEntry(type_name),
+ mIsProtected(is_protected)
+ {
+ llassert(type_name.length() <= 8);
+ }
+
+ const bool mIsProtected;
+};
+
+class LLFolderDictionary : public LLSingleton<LLFolderDictionary>,
+ public LLDictionary<LLFolderType::EType, FolderEntry>
+{
+public:
+ LLFolderDictionary();
+protected:
+ virtual LLFolderType::EType notFound() const
+ {
+ return LLFolderType::FT_NONE;
+ }
+};
+
+LLFolderDictionary::LLFolderDictionary()
+{
+ // TYPE NAME PROTECTED
+ // |-----------|---------|
+ addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", TRUE));
+ addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", TRUE));
+ addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", TRUE));
+ addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", TRUE));
+ addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE));
+ addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE));
+ addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE));
+ addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE));
+ addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE));
+ addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE));
+ addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE));
+ addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", TRUE));
+ addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", TRUE));
+ addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", TRUE));
+ addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", TRUE));
+ addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", TRUE));
+
+ for (S32 ensemble_num = S32(LLFolderType::FT_ENSEMBLE_START); ensemble_num <= S32(LLFolderType::FT_ENSEMBLE_END); ensemble_num++)
+ {
+ addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", FALSE));
+ }
+
+ addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", TRUE));
+ addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", FALSE));
+ addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", TRUE));
+
+ addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE));
+
+ addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE));
+ addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE));
+
+ addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE));
+
+ addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE));
+};
+
+// static
+LLFolderType::EType LLFolderType::lookup(const std::string& name)
+{
+ return LLFolderDictionary::getInstance()->lookup(name);
+}
+
+// static
+const std::string &LLFolderType::lookup(LLFolderType::EType folder_type)
+{
+ const FolderEntry *entry = LLFolderDictionary::getInstance()->lookup(folder_type);
+ if (entry)
+ {
+ return entry->mName;
+ }
+ else
+ {
+ return badLookup();
+ }
+}
+
+// static
+// Only ensembles and plain folders aren't protected. "Protected" means
+// you can't change certain properties such as their type.
+bool LLFolderType::lookupIsProtectedType(EType folder_type)
+{
+ const LLFolderDictionary *dict = LLFolderDictionary::getInstance();
+ const FolderEntry *entry = dict->lookup(folder_type);
+ if (entry)
+ {
+ return entry->mIsProtected;
+ }
+ return true;
+}
+
+// static
+bool LLFolderType::lookupIsEnsembleType(EType folder_type)
+{
+ return (folder_type >= FT_ENSEMBLE_START &&
+ folder_type <= FT_ENSEMBLE_END);
+}
+
+// static
+LLAssetType::EType LLFolderType::folderTypeToAssetType(LLFolderType::EType folder_type)
+{
+ if (LLAssetType::lookup(LLAssetType::EType(folder_type)) == LLAssetType::badLookup())
+ {
+ LL_WARNS() << "Converting to unknown asset type " << folder_type << LL_ENDL;
+ }
+ return (LLAssetType::EType)folder_type;
+}
+
+// static
+LLFolderType::EType LLFolderType::assetTypeToFolderType(LLAssetType::EType asset_type)
+{
+ if (LLFolderType::lookup(LLFolderType::EType(asset_type)) == LLFolderType::badLookup())
+ {
+ LL_WARNS() << "Converting to unknown folder type " << asset_type << LL_ENDL;
+ }
+ return (LLFolderType::EType)asset_type;
+}
+
+// static
+const std::string &LLFolderType::badLookup()
+{
+ static const std::string sBadLookup = "llfoldertype_bad_lookup";
+ return sBadLookup;
+}
diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h
new file mode 100755
index 0000000000..a0c847914f
--- /dev/null
+++ b/indra/llinventory/llfoldertype.h
@@ -0,0 +1,111 @@
+/**
+ * @file llfoldertype.h
+ * @brief Declaration of LLFolderType.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFOLDERTYPE_H
+#define LL_LLFOLDERTYPE_H
+
+#include <string>
+#include "llassettype.h"
+
+// This class handles folder types (similar to assettype, except for folders)
+// and operations on those.
+class LL_COMMON_API LLFolderType
+{
+public:
+ // ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums.
+ enum EType
+ {
+ FT_TEXTURE = 0,
+
+ FT_SOUND = 1,
+
+ FT_CALLINGCARD = 2,
+
+ FT_LANDMARK = 3,
+
+ FT_CLOTHING = 5,
+
+ FT_OBJECT = 6,
+
+ FT_NOTECARD = 7,
+
+ FT_ROOT_INVENTORY = 8,
+ // We'd really like to change this to 9 since AT_CATEGORY is 8,
+ // but "My Inventory" has been type 8 for a long time.
+
+ FT_LSL_TEXT = 10,
+
+ FT_BODYPART = 13,
+
+ FT_TRASH = 14,
+
+ FT_SNAPSHOT_CATEGORY = 15,
+
+ FT_LOST_AND_FOUND = 16,
+
+ FT_ANIMATION = 20,
+
+ FT_GESTURE = 21,
+
+ FT_FAVORITE = 23,
+
+ FT_ENSEMBLE_START = 26,
+ FT_ENSEMBLE_END = 45,
+ // This range is reserved for special clothing folder types.
+
+ FT_CURRENT_OUTFIT = 46,
+ FT_OUTFIT = 47,
+ FT_MY_OUTFITS = 48,
+
+ FT_MESH = 49,
+
+ FT_INBOX = 50,
+ FT_OUTBOX = 51,
+
+ FT_BASIC_ROOT = 52,
+
+ FT_COUNT,
+
+ FT_NONE = -1
+ };
+
+ static EType lookup(const std::string& type_name);
+ static const std::string& lookup(EType folder_type);
+
+ static bool lookupIsProtectedType(EType folder_type);
+ static bool lookupIsEnsembleType(EType folder_type);
+
+ static LLAssetType::EType folderTypeToAssetType(LLFolderType::EType folder_type);
+ static LLFolderType::EType assetTypeToFolderType(LLAssetType::EType asset_type);
+
+ static const std::string& badLookup(); // error string when a lookup fails
+
+protected:
+ LLFolderType() {}
+ ~LLFolderType() {}
+};
+
+#endif // LL_LLFOLDERTYPE_H
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index a3caf79519..11647c5518 100644..100755
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -28,6 +28,7 @@
#include "llinventory.h"
#include "lldbstrings.h"
+#include "llfasttimer.h"
#include "llinventorydefines.h"
#include "llxorcipher.h"
#include "llsd.h"
@@ -50,6 +51,7 @@ static const std::string INV_DESC_LABEL("desc");
static const std::string INV_PERMISSIONS_LABEL("permissions");
static const std::string INV_SHADOW_ID_LABEL("shadow_id");
static const std::string INV_ASSET_ID_LABEL("asset_id");
+static const std::string INV_LINKED_ID_LABEL("linked_id");
static const std::string INV_SALE_INFO_LABEL("sale_info");
static const std::string INV_FLAGS_LABEL("flags");
static const std::string INV_CREATION_DATE_LABEL("created_at");
@@ -71,17 +73,22 @@ const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType type,
- const std::string& name) :
+ const std::string& name)
+: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
mUUID(uuid),
mParentUUID(parent_uuid),
mType(type),
- mName(name)
+ mName(name),
+ mCreationDate(0)
{
+ claimMem(mName);
correctInventoryName(mName);
}
-LLInventoryObject::LLInventoryObject() :
- mType(LLAssetType::AT_NONE)
+LLInventoryObject::LLInventoryObject()
+: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
+ mType(LLAssetType::AT_NONE),
+ mCreationDate(0)
{
}
@@ -94,7 +101,9 @@ void LLInventoryObject::copyObject(const LLInventoryObject* other)
mUUID = other->mUUID;
mParentUUID = other->mParentUUID;
mType = other->mType;
+ disclaimMem(mName);
mName = other->mName;
+ claimMem(mName);
}
const LLUUID& LLInventoryObject::getUUID() const
@@ -147,7 +156,9 @@ void LLInventoryObject::rename(const std::string& n)
correctInventoryName(new_name);
if( !new_name.empty() && new_name != mName )
{
+ disclaimMem(mName);
mName = new_name;
+ claimMem(mName);
}
}
@@ -210,8 +221,8 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL;
}
}
return TRUE;
@@ -247,26 +258,19 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co
return TRUE;
}
-
-void LLInventoryObject::removeFromServer()
-{
- // don't do nothin'
- llwarns << "LLInventoryObject::removeFromServer() called. Doesn't do anything." << llendl;
-}
-
void LLInventoryObject::updateParentOnServer(BOOL) const
{
// don't do nothin'
- llwarns << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << llendl;
+ LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL;
}
void LLInventoryObject::updateServer(BOOL) const
{
// don't do nothin'
- llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl;
+ LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL;
}
-inline
+// static
void LLInventoryObject::correctInventoryName(std::string& name)
{
LLStringUtil::replaceNonstandardASCII(name, ' ');
@@ -275,6 +279,26 @@ void LLInventoryObject::correctInventoryName(std::string& name)
LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN);
}
+time_t LLInventoryObject::getCreationDate() const
+{
+ return mCreationDate;
+}
+
+void LLInventoryObject::setCreationDate(time_t creation_date_utc)
+{
+ mCreationDate = creation_date_utc;
+}
+
+
+const std::string& LLInventoryItem::getDescription() const
+{
+ return mDescription;
+}
+
+const std::string& LLInventoryItem::getActualDescription() const
+{
+ return mDescription;
+}
///----------------------------------------------------------------------------
/// Class LLInventoryItem
@@ -297,11 +321,14 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
mDescription(desc),
mSaleInfo(sale_info),
mInventoryType(inv_type),
- mFlags(flags),
- mCreationDate(creation_date_utc)
+ mFlags(flags)
{
+ mCreationDate = creation_date_utc;
+
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
LLStringUtil::replaceChar(mDescription, '|', ' ');
+ claimMem(mDescription);
+
mPermissions.initMasks(inv_type);
}
@@ -312,9 +339,9 @@ LLInventoryItem::LLInventoryItem() :
mDescription(),
mSaleInfo(),
mInventoryType(LLInventoryType::IT_NONE),
- mFlags(0),
- mCreationDate(0)
+ mFlags(0)
{
+ mCreationDate = 0;
}
LLInventoryItem::LLInventoryItem(const LLInventoryItem* other) :
@@ -333,7 +360,9 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
copyObject(other);
mPermissions = other->mPermissions;
mAssetUUID = other->mAssetUUID;
+ disclaimMem(mDescription);
mDescription = other->mDescription;
+ claimMem(mDescription);
mSaleInfo = other->mSaleInfo;
mInventoryType = other->mInventoryType;
mFlags = other->mFlags;
@@ -374,51 +403,48 @@ void LLInventoryItem::setAssetUUID(const LLUUID& asset_id)
}
-const std::string& LLInventoryItem::getDescription() const
-{
- return mDescription;
-}
-
-time_t LLInventoryItem::getCreationDate() const
-{
- return mCreationDate;
-}
-
U32 LLInventoryItem::getCRC32() const
{
// *FIX: Not a real crc - more of a checksum.
// *NOTE: We currently do not validate the name or description,
// but if they change in transit, it's no big deal.
U32 crc = mUUID.getCRC32();
- //lldebugs << "1 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "1 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mParentUUID.getCRC32();
- //lldebugs << "2 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "2 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mPermissions.getCRC32();
- //lldebugs << "3 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "3 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mAssetUUID.getCRC32();
- //lldebugs << "4 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "4 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mType;
- //lldebugs << "5 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "5 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mInventoryType;
- //lldebugs << "6 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "6 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mFlags;
- //lldebugs << "7 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "7 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += mSaleInfo.getCRC32();
- //lldebugs << "8 crc: " << std::hex << crc << std::dec << llendl;
- crc += mCreationDate;
- //lldebugs << "9 crc: " << std::hex << crc << std::dec << llendl;
+ //LL_DEBUGS() << "8 crc: " << std::hex << crc << std::dec << LL_ENDL;
+ crc += (U32)mCreationDate;
+ //LL_DEBUGS() << "9 crc: " << std::hex << crc << std::dec << LL_ENDL;
return crc;
}
+// static
+void LLInventoryItem::correctInventoryDescription(std::string& desc)
+{
+ LLStringUtil::replaceNonstandardASCII(desc, ' ');
+ LLStringUtil::replaceChar(desc, '|', ' ');
+}
void LLInventoryItem::setDescription(const std::string& d)
{
std::string new_desc(d);
- LLStringUtil::replaceNonstandardASCII(new_desc, ' ');
- LLStringUtil::replaceChar(new_desc, '|', ' ');
+ LLInventoryItem::correctInventoryDescription(new_desc);
if( new_desc != mDescription )
{
+ disclaimMem(mDescription);
mDescription = new_desc;
+ claimMem(mDescription);
}
}
@@ -440,11 +466,6 @@ void LLInventoryItem::setFlags(U32 flags)
mFlags = flags;
}
-void LLInventoryItem::setCreationDate(time_t creation_date_utc)
-{
- mCreationDate = creation_date_utc;
-}
-
// Currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target.
void LLInventoryItem::setCreator(const LLUUID& creator)
@@ -506,6 +527,12 @@ U32 LLInventoryItem::getFlags() const
return mFlags;
}
+time_t LLInventoryItem::getCreationDate() const
+{
+ return mCreationDate;
+}
+
+
// virtual
void LLInventoryItem::packMessage(LLMessageSystem* msg) const
{
@@ -521,7 +548,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const
mSaleInfo.packMessage(msg);
msg->addStringFast(_PREHASH_Name, mName);
msg->addStringFast(_PREHASH_Description, mDescription);
- msg->addS32Fast(_PREHASH_CreationDate, mCreationDate);
+ msg->addS32Fast(_PREHASH_CreationDate, (S32)mCreationDate);
U32 crc = getCRC32();
msg->addU32Fast(_PREHASH_CRC, crc);
}
@@ -562,13 +589,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
#ifdef CRC_CHECK
if(local_crc == remote_crc)
{
- lldebugs << "crc matches" << llendl;
+ LL_DEBUGS() << "crc matches" << LL_ENDL;
return TRUE;
}
else
{
- llwarns << "inventory crc mismatch: local=" << std::hex << local_crc
- << " remote=" << remote_crc << std::dec << llendl;
+ LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc
+ << " remote=" << remote_crc << std::dec << LL_ENDL;
return FALSE;
}
#else
@@ -698,13 +725,15 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
valuestr[0] = '\000';
}
+ disclaimMem(mDescription);
mDescription.assign(valuestr);
+ claimMem(mDescription);
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
/* TODO -- ask Ian about this code
const char *donkey = mDescription.c_str();
if (donkey[0] == '|')
{
- llerrs << "Donkey" << llendl;
+ LL_ERRS() << "Donkey" << LL_ENDL;
}
*/
}
@@ -716,8 +745,8 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in inventory import of item " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in inventory import of item " << mUUID << LL_ENDL;
}
}
@@ -727,7 +756,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
if((LLInventoryType::IT_NONE == mInventoryType)
|| !inventory_and_asset_types_match(mInventoryType, mType))
{
- lldebugs << "Resetting inventory type for " << mUUID << llendl;
+ LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
@@ -904,13 +933,15 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
valuestr[0] = '\000';
}
+ disclaimMem(mDescription);
mDescription.assign(valuestr);
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
+ claimMem(mDescription);
/* TODO -- ask Ian about this code
const char *donkey = mDescription.c_str();
if (donkey[0] == '|')
{
- llerrs << "Donkey" << llendl;
+ LL_ERRS() << "Donkey" << LL_ENDL;
}
*/
}
@@ -922,8 +953,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in inventory import of item " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in inventory import of item " << mUUID << LL_ENDL;
}
}
@@ -933,7 +964,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
if((LLInventoryType::IT_NONE == mInventoryType)
|| !inventory_and_asset_types_match(mInventoryType, mType))
{
- lldebugs << "Resetting inventory type for " << mUUID << llendl;
+ LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
@@ -1034,10 +1065,18 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
-bool LLInventoryItem::fromLLSD(const LLSD& sd)
+LLTrace::BlockTimerStatHandle FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
+
+bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
{
- mInventoryType = LLInventoryType::IT_NONE;
- mAssetUUID.setNull();
+ LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SD_DESERIALIZE);
+ if (is_new)
+ {
+ // If we're adding LLSD to an existing object, need avoid
+ // clobbering these fields.
+ mInventoryType = LLInventoryType::IT_NONE;
+ mAssetUUID.setNull();
+ }
std::string w;
w = INV_ITEM_ID_LABEL;
@@ -1094,6 +1133,11 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
mAssetUUID = sd[w];
}
+ w = INV_LINKED_ID_LABEL;
+ if (sd.has(w))
+ {
+ mAssetUUID = sd[w];
+ }
w = INV_ASSET_TYPE_LABEL;
if (sd.has(w))
{
@@ -1142,8 +1186,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
w = INV_DESC_LABEL;
if (sd.has(w))
{
+ disclaimMem(mDescription);
mDescription = sd[w].asString();
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
+ claimMem(mDescription);
}
w = INV_CREATION_DATE_LABEL;
if (sd.has(w))
@@ -1157,7 +1203,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
if((LLInventoryType::IT_NONE == mInventoryType)
|| !inventory_and_asset_types_match(mInventoryType, mType))
{
- lldebugs << "Resetting inventory type for " << mUUID << llendl;
+ LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
@@ -1230,7 +1276,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
if (NULL == bin_bucket)
{
- llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl;
+ LL_ERRS() << "unpackBinaryBucket failed. bin_bucket is NULL." << LL_ENDL;
return;
}
@@ -1240,7 +1286,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
item_buffer[bin_bucket_size] = '\0';
std::string str(&item_buffer[0]);
- lldebugs << "item buffer: " << str << llendl;
+ LL_DEBUGS() << "item buffer: " << str << LL_ENDL;
// Tokenize the string.
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -1277,7 +1323,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
perm.init(creator_id, owner_id, last_owner_id, group_id);
perm.initMasks(mask_base, mask_owner, mask_group, mask_every, mask_next);
setPermissions(perm);
- //lldebugs << "perm: " << perm << llendl;
+ //LL_DEBUGS() << "perm: " << perm << LL_ENDL;
LLUUID asset_id((*(iter++)).c_str());
setAssetUUID(asset_id);
@@ -1478,8 +1524,8 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in inventory import category " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in inventory import category " << mUUID << LL_ENDL;
}
}
return TRUE;
@@ -1557,8 +1603,8 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in inventory import category " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in inventory import category " << mUUID << LL_ENDL;
}
}
return TRUE;
@@ -1589,8 +1635,8 @@ LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item)
if(item.isNull()) return rv;
if (item->getType() == LLAssetType::AT_NONE)
{
- llwarns << "ll_create_sd_from_inventory_item() for item with AT_NONE"
- << llendl;
+ LL_WARNS() << "ll_create_sd_from_inventory_item() for item with AT_NONE"
+ << LL_ENDL;
return rv;
}
rv[INV_ITEM_ID_LABEL] = item->getUUID();
@@ -1615,8 +1661,8 @@ LLSD ll_create_sd_from_inventory_category(LLPointer<LLInventoryCategory> cat)
if(cat.isNull()) return rv;
if (cat->getType() == LLAssetType::AT_NONE)
{
- llwarns << "ll_create_sd_from_inventory_category() for cat with AT_NONE"
- << llendl;
+ LL_WARNS() << "ll_create_sd_from_inventory_category() for cat with AT_NONE"
+ << LL_ENDL;
return rv;
}
rv[INV_FOLDER_ID_LABEL] = cat->getUUID();
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index a5cfe59bda..70b200e139 100644..100755
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -27,15 +27,14 @@
#ifndef LL_LLINVENTORY_H
#define LL_LLINVENTORY_H
-#include "lldarray.h"
#include "llfoldertype.h"
#include "llinventorytype.h"
-#include "llmemtype.h"
#include "llpermissions.h"
#include "llrefcount.h"
#include "llsaleinfo.h"
#include "llsd.h"
#include "lluuid.h"
+#include "lltrace.h"
class LLMessageSystem;
@@ -45,16 +44,16 @@ class LLMessageSystem;
// Base class for anything in the user's inventory. Handles the common code
// between items and categories.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLInventoryObject : public LLRefCount
+class LLInventoryObject : public LLRefCount, public LLTrace::MemTrackable<LLInventoryObject>
{
public:
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
+ typedef std::list<LLConstPointer<LLInventoryObject> > const_object_list_t;
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
- MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryObject();
LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
@@ -75,6 +74,7 @@ public:
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
BOOL getIsLinkType() const;
+ virtual time_t getCreationDate() const;
//--------------------------------------------------------------------
// Mutators
@@ -85,23 +85,21 @@ public:
virtual void rename(const std::string& new_name);
void setParent(const LLUUID& new_parent);
void setType(LLAssetType::EType type);
+ virtual void setCreationDate(time_t creation_date_utc); // only stored for items
-private:
// in place correction for inventory name string
- void correctInventoryName(std::string& name);
+ static void correctInventoryName(std::string& name);
//--------------------------------------------------------------------
// File Support
// Implemented here so that a minimal information set can be transmitted
// between simulator and viewer.
//--------------------------------------------------------------------
-public:
// virtual BOOL importFile(LLFILE* fp);
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
virtual BOOL importLegacyStream(std::istream& input_stream);
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
- virtual void removeFromServer();
virtual void updateParentOnServer(BOOL) const;
virtual void updateServer(BOOL) const;
@@ -113,6 +111,7 @@ protected:
LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
LLAssetType::EType mType;
std::string mName;
+ time_t mCreationDate; // seconds from 1/1/1970, UTC
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -123,13 +122,12 @@ protected:
class LLInventoryItem : public LLInventoryObject
{
public:
- typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLInventoryItem> > item_array_t;
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
- MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryItem(const LLUUID& uuid,
const LLUUID& parent_uuid,
const LLPermissions& permissions,
@@ -160,6 +158,7 @@ public:
virtual const LLUUID& getCreatorUUID() const;
virtual const LLUUID& getAssetUUID() const;
virtual const std::string& getDescription() const;
+ virtual const std::string& getActualDescription() const; // Does not follow links
virtual const LLSaleInfo& getSaleInfo() const;
virtual LLInventoryType::EType getInventoryType() const;
virtual U32 getFlags() const;
@@ -173,12 +172,12 @@ public:
//--------------------------------------------------------------------
public:
void setAssetUUID(const LLUUID& asset_id);
+ static void correctInventoryDescription(std::string& name);
void setDescription(const std::string& new_desc);
void setSaleInfo(const LLSaleInfo& sale_info);
void setPermissions(const LLPermissions& perm);
void setInventoryType(LLInventoryType::EType inv_type);
void setFlags(U32 flags);
- void setCreationDate(time_t creation_date_utc);
void setCreator(const LLUUID& creator); // only used for calling cards
// Check for changes in permissions masks and sale info
@@ -212,7 +211,7 @@ public:
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
LLSD asLLSD() const;
void asLLSD( LLSD& sd ) const;
- bool fromLLSD(const LLSD& sd);
+ bool fromLLSD(const LLSD& sd, bool is_new = true);
//--------------------------------------------------------------------
// Member Variables
@@ -224,7 +223,6 @@ protected:
LLSaleInfo mSaleInfo;
LLInventoryType::EType mInventoryType;
U32 mFlags;
- time_t mCreationDate; // seconds from 1/1/1970, UTC
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -236,13 +234,12 @@ protected:
class LLInventoryCategory : public LLInventoryObject
{
public:
- typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
+ typedef std::vector<LLPointer<LLInventoryCategory> > cat_array_t;
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
- MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
LLFolderType::EType preferred_type,
const std::string& name);
diff --git a/indra/llinventory/llinventorydefines.cpp b/indra/llinventory/llinventorydefines.cpp
index 575331a263..575331a263 100644..100755
--- a/indra/llinventory/llinventorydefines.cpp
+++ b/indra/llinventory/llinventorydefines.cpp
diff --git a/indra/llinventory/llinventorydefines.h b/indra/llinventory/llinventorydefines.h
index 3881fb1fd7..3881fb1fd7 100644..100755
--- a/indra/llinventory/llinventorydefines.h
+++ b/indra/llinventory/llinventorydefines.h
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index a99be1420b..8807b36117 100644..100755
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -83,6 +83,9 @@ 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));
+ addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET));
+ addEntry(LLInventoryType::IT_PERSON, new InventoryEntry("person", "person", 1, LLAssetType::AT_PERSON));
}
@@ -91,32 +94,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_WIDGET, // 40 AT_WIDGET
+ 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_PERSON, // 45 AT_PERSON
+ 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..fc3c78cf50 100644..100755
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -61,11 +61,61 @@ public:
IT_WEARABLE = 18,
IT_ANIMATION = 19,
IT_GESTURE = 20,
- IT_COUNT = 21,
+ IT_MESH = 22,
+ IT_WIDGET = 23,
+ IT_PERSON = 24,
+ IT_COUNT = 25,
IT_NONE = -1
};
+ enum EIconName
+ {
+ ICONNAME_TEXTURE,
+ ICONNAME_SOUND,
+ ICONNAME_CALLINGCARD_ONLINE,
+ ICONNAME_CALLINGCARD_OFFLINE,
+ ICONNAME_LANDMARK,
+ ICONNAME_LANDMARK_VISITED,
+ ICONNAME_SCRIPT,
+ ICONNAME_CLOTHING,
+ ICONNAME_OBJECT,
+ ICONNAME_OBJECT_MULTI,
+ ICONNAME_NOTECARD,
+ ICONNAME_BODYPART,
+ ICONNAME_SNAPSHOT,
+
+ ICONNAME_BODYPART_SHAPE,
+ ICONNAME_BODYPART_SKIN,
+ ICONNAME_BODYPART_HAIR,
+ ICONNAME_BODYPART_EYES,
+ ICONNAME_CLOTHING_SHIRT,
+ ICONNAME_CLOTHING_PANTS,
+ ICONNAME_CLOTHING_SHOES,
+ ICONNAME_CLOTHING_SOCKS,
+ ICONNAME_CLOTHING_JACKET,
+ ICONNAME_CLOTHING_GLOVES,
+ ICONNAME_CLOTHING_UNDERSHIRT,
+ ICONNAME_CLOTHING_UNDERPANTS,
+ ICONNAME_CLOTHING_SKIRT,
+ ICONNAME_CLOTHING_ALPHA,
+ ICONNAME_CLOTHING_TATTOO,
+
+ ICONNAME_ANIMATION,
+ ICONNAME_GESTURE,
+
+ ICONNAME_CLOTHING_PHYSICS,
+
+ ICONNAME_LINKITEM,
+ ICONNAME_LINKFOLDER,
+ ICONNAME_MESH,
+
+ ICONNAME_INVALID,
+ ICONNAME_COUNT,
+ ICONNAME_NONE = -1
+ };
+
+
// machine transation between type and strings
static EType lookup(const std::string& name);
static const std::string &lookup(EType type);
diff --git a/indra/llinventory/lllandmark.cpp b/indra/llinventory/lllandmark.cpp
index 493909cf9c..4c6075d6b5 100644..100755
--- a/indra/llinventory/lllandmark.cpp
+++ b/indra/llinventory/lllandmark.cpp
@@ -128,7 +128,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer)
goto error;
}
cur += chars_read;
- // llinfos << "Landmark read: " << pos << llendl;
+ // LL_INFOS() << "Landmark read: " << pos << LL_ENDL;
return new LLLandmark(pos);
}
@@ -155,7 +155,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer)
}
error:
- llinfos << "Bad Landmark Asset: bad _DATA_ block." << llendl;
+ LL_INFOS() << "Bad Landmark Asset: bad _DATA_ block." << LL_ENDL;
return NULL;
}
@@ -176,7 +176,7 @@ void LLLandmark::requestRegionHandle(
if(region_id.isNull())
{
// don't bother with checking - it's 0.
- lldebugs << "requestRegionHandle: null" << llendl;
+ LL_DEBUGS() << "requestRegionHandle: null" << LL_ENDL;
if(callback)
{
const U64 U64_ZERO = 0;
@@ -187,7 +187,7 @@ void LLLandmark::requestRegionHandle(
{
if(region_id == mLocalRegion.first)
{
- lldebugs << "requestRegionHandle: local" << llendl;
+ LL_DEBUGS() << "requestRegionHandle: local" << LL_ENDL;
if(callback)
{
callback(region_id, mLocalRegion.second);
@@ -198,14 +198,14 @@ void LLLandmark::requestRegionHandle(
region_map_t::iterator it = mRegions.find(region_id);
if(it == mRegions.end())
{
- lldebugs << "requestRegionHandle: upstream" << llendl;
+ LL_DEBUGS() << "requestRegionHandle: upstream" << LL_ENDL;
if(callback)
{
region_callback_map_t::value_type vt(region_id, callback);
sRegionCallbackMap.insert(vt);
}
- lldebugs << "Landmark requesting information about: "
- << region_id << llendl;
+ LL_DEBUGS() << "Landmark requesting information about: "
+ << region_id << LL_ENDL;
msg->newMessage("RegionHandleRequest");
msg->nextBlock("RequestBlock");
msg->addUUID("RegionID", region_id);
@@ -214,7 +214,7 @@ void LLLandmark::requestRegionHandle(
else if(callback)
{
// we have the answer locally - just call the callack.
- lldebugs << "requestRegionHandle: ready" << llendl;
+ LL_DEBUGS() << "requestRegionHandle: ready" << LL_ENDL;
callback(region_id, (*it).second.mRegionHandle);
}
}
@@ -248,8 +248,8 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**)
#if LL_DEBUG
U32 grid_x, grid_y;
grid_from_region_handle(info.mRegionHandle, &grid_x, &grid_y);
- lldebugs << "Landmark got reply for region: " << region_id << " "
- << grid_x << "," << grid_y << llendl;
+ LL_DEBUGS() << "Landmark got reply for region: " << region_id << " "
+ << grid_x << "," << grid_y << LL_ENDL;
#endif
// make all the callbacks here.
diff --git a/indra/llinventory/lllandmark.h b/indra/llinventory/lllandmark.h
index 92923ea6fb..92923ea6fb 100644..100755
--- a/indra/llinventory/lllandmark.h
+++ b/indra/llinventory/lllandmark.h
diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp
index 69152cefe0..908c647498 100644..100755
--- a/indra/llinventory/llnotecard.cpp
+++ b/indra/llinventory/llnotecard.cpp
@@ -57,33 +57,33 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
str >> std::ws >> "LLEmbeddedItems version" >> mEmbeddedVersion >> "\n";
if (str.fail())
{
- llwarns << "Invalid Linden text file header" << llendl;
+ LL_WARNS() << "Invalid Linden text file header" << LL_ENDL;
goto import_file_failed;
}
if( 1 != mEmbeddedVersion )
{
- llwarns << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << LL_ENDL;
goto import_file_failed;
}
str >> std::ws >> "{\n";
if(str.fail())
{
- llwarns << "Invalid Linden text file format: missing {" << llendl;
+ LL_WARNS() << "Invalid Linden text file format: missing {" << LL_ENDL;
goto import_file_failed;
}
str >> std::ws >> "count " >> count >> "\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems count" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems count" << LL_ENDL;
goto import_file_failed;
}
if((count < 0))
{
- llwarns << "Invalid LLEmbeddedItems count value: " << count << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems count value: " << count << LL_ENDL;
goto import_file_failed;
}
@@ -92,7 +92,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
str >> std::ws >> "{\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems file format: missing {" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems file format: missing {" << LL_ENDL;
goto import_file_failed;
}
@@ -100,21 +100,21 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
str >> std::ws >> "ext char index " >> index >> "\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems file format: missing ext char index" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems file format: missing ext char index" << LL_ENDL;
goto import_file_failed;
}
str >> std::ws >> "inv_item\t0\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems file format: missing inv_item" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems file format: missing inv_item" << LL_ENDL;
goto import_file_failed;
}
LLPointer<LLInventoryItem> item = new LLInventoryItem;
if (!item->importLegacyStream(str))
{
- llinfos << "notecard import failed" << llendl;
+ LL_INFOS() << "notecard import failed" << LL_ENDL;
goto import_file_failed;
}
mItems.push_back(item);
@@ -122,7 +122,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
str >> std::ws >> "}\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL;
goto import_file_failed;
}
}
@@ -130,7 +130,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
str >> std::ws >> "}\n";
if(str.fail())
{
- llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl;
+ LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL;
goto import_file_failed;
}
@@ -161,20 +161,20 @@ bool LLNotecard::importStream(std::istream& str)
str >> std::ws >> "Linden text version " >> mVersion >> "\n";
if(str.fail())
{
- llwarns << "Invalid Linden text file header " << llendl;
+ LL_WARNS() << "Invalid Linden text file header " << LL_ENDL;
return FALSE;
}
if( 1 != mVersion && 2 != mVersion)
{
- llwarns << "Invalid Linden text file version: " << mVersion << llendl;
+ LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL;
return FALSE;
}
str >> std::ws >> "{\n";
if(str.fail())
{
- llwarns << "Invalid Linden text file format" << llendl;
+ LL_WARNS() << "Invalid Linden text file format" << LL_ENDL;
return FALSE;
}
@@ -187,7 +187,7 @@ bool LLNotecard::importStream(std::istream& str)
str.getline(line_buf, STD_STRING_BUF_SIZE);
if(str.fail())
{
- llwarns << "Invalid Linden text length field" << llendl;
+ LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
return FALSE;
}
line_buf[STD_STRING_STR_LEN] = '\0';
@@ -195,13 +195,13 @@ bool LLNotecard::importStream(std::istream& str)
S32 text_len = 0;
if( 1 != sscanf(line_buf, "Text length %d", &text_len) )
{
- llwarns << "Invalid Linden text length field" << llendl;
+ LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
return FALSE;
}
if(text_len > mMaxText || text_len < 0)
{
- llwarns << "Invalid Linden text length: " << text_len << llendl;
+ LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL;
return FALSE;
}
@@ -211,7 +211,7 @@ bool LLNotecard::importStream(std::istream& str)
fullread(str, text, text_len);
if(str.fail())
{
- llwarns << "Invalid Linden text: text shorter than text length: " << text_len << llendl;
+ LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL;
success = FALSE;
}
text[text_len] = '\0';
diff --git a/indra/llinventory/llnotecard.h b/indra/llinventory/llnotecard.h
index d64a821b78..d64a821b78 100644..100755
--- a/indra/llinventory/llnotecard.h
+++ b/indra/llinventory/llnotecard.h
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 488bd45d8f..b24e14c72b 100644..100755
--- 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
};
@@ -134,7 +136,7 @@ LLParcel::LLParcel(const LLUUID &owner_id,
// virtual
LLParcel::~LLParcel()
{
- // user list cleaned up by LLDynamicArray destructor.
+ // user list cleaned up by std::vector destructor.
}
void LLParcel::init(const LLUUID &owner_id,
@@ -188,13 +190,9 @@ void LLParcel::init(const LLUUID &owner_id,
mMediaID.setNull();
mMediaAutoScale = 0;
mMediaLoop = TRUE;
- mObscureMedia = 1;
- mObscureMusic = 1;
mMediaWidth = 0;
mMediaHeight = 0;
setMediaCurrentURL(LLStringUtil::null);
- mMediaURLFilterEnable = FALSE;
- mMediaURLFilterList = LLSD::emptyArray();
mMediaAllowNavigate = TRUE;
mMediaURLTimeout = 0.0f;
mMediaPreventCameraZoom = FALSE;
@@ -207,7 +205,7 @@ void LLParcel::init(const LLUUID &owner_id,
mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER);
mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER);
- mLocalID = 0;
+ mLocalID = INVALID_PARCEL_ID;
//mSimWidePrimCorrection = 0;
setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS)));
@@ -226,6 +224,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)
@@ -331,38 +334,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)
{
@@ -443,117 +414,6 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
}
-bool LLParcel::isAgentBlockedFromParcel(LLParcel* parcelp,
- const LLUUID& agent_id,
- const uuid_vec_t& group_ids,
- const BOOL is_agent_identified,
- const BOOL is_agent_transacted,
- const BOOL is_agent_ageverified)
-{
- S32 current_group_access = parcelp->blockAccess(agent_id, LLUUID::null, is_agent_identified, is_agent_transacted, is_agent_ageverified);
- S32 count;
- bool is_allowed = (current_group_access == BA_ALLOWED) ? true: false;
- LLUUID group_id;
-
- count = group_ids.size();
- for (int i = 0; i < count && !is_allowed; i++)
- {
- group_id = group_ids[i];
- current_group_access = parcelp->blockAccess(agent_id, group_id, is_agent_identified, is_agent_transacted, is_agent_ageverified);
-
- if (current_group_access == BA_ALLOWED) is_allowed = true;
- }
-
- return !is_allowed;
-}
-
-BOOL LLParcel::isAgentBanned(const LLUUID& agent_id) const
-{
- // Test ban list
- if (mBanList.find(agent_id) != mBanList.end())
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-S32 LLParcel::blockAccess(const LLUUID& agent_id, const LLUUID& group_id,
- const BOOL is_agent_identified,
- const BOOL is_agent_transacted,
- const BOOL is_agent_ageverified) const
-{
- // Test ban list
- if (isAgentBanned(agent_id))
- {
- return BA_BANNED;
- }
-
- // Always allow owner on (unless he banned himself, useful for
- // testing). We will also allow estate owners/managers in if they
- // are not explicitly banned.
- if (agent_id == mOwnerID)
- {
- return BA_ALLOWED;
- }
-
- // Special case when using pass list where group access is being restricted but not
- // using access list. In this case group members are allowed only if they buy a pass.
- // We return BA_NOT_IN_LIST if not in list
- BOOL passWithGroup = getParcelFlag(PF_USE_PASS_LIST) && !getParcelFlag(PF_USE_ACCESS_LIST)
- && getParcelFlag(PF_USE_ACCESS_GROUP) && !mGroupID.isNull() && group_id == mGroupID;
-
-
- // Test group list
- if (getParcelFlag(PF_USE_ACCESS_GROUP)
- && !mGroupID.isNull()
- && group_id == mGroupID
- && !passWithGroup)
- {
- return BA_ALLOWED;
- }
-
- // Test access list
- if (getParcelFlag(PF_USE_ACCESS_LIST) || passWithGroup )
- {
- if (mAccessList.find(agent_id) != mAccessList.end())
- {
- return BA_ALLOWED;
- }
-
- return BA_NOT_ON_LIST;
- }
-
- // If we're not doing any other limitations, all users
- // can enter, unless
- if ( !getParcelFlag(PF_USE_ACCESS_GROUP)
- && !getParcelFlag(PF_USE_ACCESS_LIST))
- {
- //If the land is group owned, and you are in the group, bypass these checks
- if(getIsGroupOwned() && group_id == mGroupID)
- {
- return BA_ALLOWED;
- }
-
- // Test for "payment" access levels
- // Anonymous - No Payment Info on File
- if(getParcelFlag(PF_DENY_ANONYMOUS) && !is_agent_identified && !is_agent_transacted)
- {
- return BA_NO_ACCESS_LEVEL;
- }
- // AgeUnverified - Not Age Verified
- if(getParcelFlag(PF_DENY_AGEUNVERIFIED) && !is_agent_ageverified)
- {
- return BA_NOT_AGE_VERIFIED;
- }
-
- return BA_ALLOWED;
- }
-
- return BA_NOT_IN_GROUP;
-
-}
-
void LLParcel::setArea(S32 area, S32 sim_object_limit)
{
@@ -610,41 +470,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
}
else
{
- llwarns << "Unknown keyword in parcel access entry section: <"
- << keyword << ">" << llendl;
+ LL_WARNS() << "Unknown keyword in parcel access entry section: <"
+ << keyword << ">" << LL_ENDL;
}
}
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)
{
@@ -685,14 +517,12 @@ 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();
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;
@@ -702,7 +532,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 +553,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 +600,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)
@@ -767,7 +614,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);
}
@@ -947,8 +793,6 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
}
}
- removeFromBanList(agent_id);
-
LLAccessEntry new_entry;
new_entry.mID = agent_id;
new_entry.mTime = time;
@@ -992,8 +836,6 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
}
}
- removeFromAccessList(agent_id);
-
LLAccessEntry new_entry;
new_entry.mID = agent_id;
new_entry.mTime = time;
@@ -1125,7 +967,7 @@ void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group)
mGroupID.setNull();
}
mSaleTimerExpires.start();
- mSaleTimerExpires.setTimerExpirySec(DEFAULT_USEC_SALE_TIMEOUT / SEC_TO_MICROSEC);
+ mSaleTimerExpires.setTimerExpirySec(U64Microseconds(DEFAULT_USEC_SALE_TIMEOUT));
mStatus = OS_LEASE_PENDING;
mClaimDate = time(NULL);
setAuctionID(0);
@@ -1225,13 +1067,9 @@ void LLParcel::clearParcel()
setMediaDesc(LLStringUtil::null);
setMediaAutoScale(0);
setMediaLoop(TRUE);
- mObscureMedia = 1;
- mObscureMusic = 1;
mMediaWidth = 0;
mMediaHeight = 0;
setMediaCurrentURL(LLStringUtil::null);
- setMediaURLFilterList(LLSD::emptyArray());
- setMediaURLFilterEnable(FALSE);
setMediaAllowNavigate(TRUE);
setMediaPreventCameraZoom(FALSE);
setMediaURLTimeout(0.0f);
@@ -1254,9 +1092,9 @@ void LLParcel::clearParcel()
void LLParcel::dump()
{
- llinfos << "parcel " << mLocalID << " area " << mArea << llendl;
- llinfos << " name <" << mName << ">" << llendl;
- llinfos << " desc <" << mDesc << ">" << llendl;
+ LL_INFOS() << "parcel " << mLocalID << " area " << mArea << LL_ENDL;
+ LL_INFOS() << " name <" << mName << ">" << LL_ENDL;
+ LL_INFOS() << " desc <" << mDesc << ">" << LL_ENDL;
}
const std::string& ownership_status_to_string(LLParcel::EOwnershipStatus status)
@@ -1336,7 +1174,7 @@ LLParcel::ECategory category_string_to_category(const std::string& s)
return (LLParcel::ECategory)i;
}
}
- llwarns << "Parcel category outside of possibilities " << s << llendl;
+ LL_WARNS() << "Parcel category outside of possibilities " << s << LL_ENDL;
return LLParcel::C_NONE;
}
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index ae301af9f5..c4363a48df 100644..100755
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -35,7 +35,6 @@
#include "lltimer.h"
#include "v3math.h"
-
// Grid out of which parcels taken is stepped every 4 meters.
const F32 PARCEL_GRID_STEP_METERS = 4.f;
@@ -46,7 +45,7 @@ const S32 PARCEL_UNIT_AREA = 16;
const F32 PARCEL_HEIGHT = 50.f;
//Height above ground which parcel boundries exist for explicitly banned avatars
-const F32 BAN_HEIGHT = 768.f;
+const F32 BAN_HEIGHT = 5000.f;
// Maximum number of entries in an access list
const S32 PARCEL_MAX_ACCESS_LIST = 300;
@@ -75,7 +74,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
@@ -98,6 +97,7 @@ const U32 RT_OTHER = 0x1 << 3;
const U32 RT_LIST = 0x1 << 4;
const U32 RT_SELL = 0x1 << 5;
+const S32 INVALID_PARCEL_ID = -1;
// Timeouts for parcels
// default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000
@@ -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
@@ -165,6 +171,7 @@ public:
C_SHOPPING,
C_STAGE,
C_OTHER,
+ C_RENTAL,
C_COUNT,
C_ANY = -1 // only useful in queries
};
@@ -238,13 +245,9 @@ public:
void setMediaID(const LLUUID& id) { mMediaID = id; }
void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
void setMediaLoop (U8 loop) { mMediaLoop = loop; }
- void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; }
- void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; }
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; }
@@ -266,6 +269,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;}
@@ -292,6 +297,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; }
@@ -302,7 +309,6 @@ public:
// BOOL importStream(std::istream& input_stream);
BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
- BOOL importMediaURLFilter(std::istream& input_stream, std::string& url);
// BOOL exportStream(std::ostream& output_stream);
void packMessage(LLMessageSystem* msg);
@@ -346,10 +352,6 @@ public:
U8 getMediaAutoScale() const { return mMediaAutoScale; }
U8 getMediaLoop() const { return mMediaLoop; }
const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
- U8 getObscureMedia() const { return mObscureMedia; }
- U8 getObscureMusic() const { return mObscureMusic; }
- 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; }
@@ -370,6 +372,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; }
@@ -499,6 +503,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; }
@@ -520,23 +527,6 @@ public:
// Can this agent change the shape of the land?
BOOL allowTerraformBy(const LLUUID &agent_id) const;
- // Returns 0 if access is OK, otherwise a BA_ return code above.
- S32 blockAccess(const LLUUID& agent_id,
- const LLUUID& group_id,
- const BOOL is_agent_identified,
- const BOOL is_agent_transacted,
- const BOOL is_agent_ageverified) const;
-
- // Only checks if the agent is explicitly banned from this parcel
- BOOL isAgentBanned(const LLUUID& agent_id) const;
-
- static bool isAgentBlockedFromParcel(LLParcel* parcelp,
- const LLUUID& agent_id,
- const uuid_vec_t& group_ids,
- const BOOL is_agent_identified,
- const BOOL is_agent_transacted,
- const BOOL is_agent_ageverified);
-
bool operator==(const LLParcel &rhs) const;
// Calculate rent - area * rent * discount rate
@@ -589,7 +579,8 @@ public:
LLUUID getPreviousOwnerID() const { return mPreviousOwnerID; }
BOOL getPreviouslyGroupOwned() const { return mPreviouslyGroupOwned; }
BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; }
-
+
+
protected:
LLUUID mID;
LLUUID mOwnerID;
@@ -605,6 +596,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;
@@ -636,11 +629,7 @@ protected:
U8 mMediaAutoScale;
U8 mMediaLoop;
std::string mMediaCurrentURL;
- U8 mObscureMedia;
- U8 mObscureMusic;
LLUUID mMediaID;
- U8 mMediaURLFilterEnable;
- LLSD mMediaURLFilterList;
U8 mMediaAllowNavigate;
U8 mMediaPreventCameraZoom;
F32 mMediaURLTimeout;
@@ -662,8 +651,10 @@ protected:
BOOL mRegionPushOverride;
BOOL mRegionDenyAnonymousOverride;
BOOL mRegionDenyAgeUnverifiedOverride;
-
-
+ BOOL mAllowGroupAVSounds;
+ BOOL mAllowAnyAVSounds;
+
+
public:
// HACK, make private
S32 mLocalID;
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index a61130132a..b1a917df73 100644..100755
--- 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
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index 7e013de11a..e79b753514 100644..100755
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -31,7 +31,6 @@
// library includes
#include "message.h"
-#include "metapropertyt.h"
#include "llsd.h"
///----------------------------------------------------------------------------
@@ -117,7 +116,7 @@ LLUUID LLPermissions::getSafeOwner() const
}
else
{
- llwarns << "LLPermissions::getSafeOwner() called with no valid owner!" << llendl;
+ LL_WARNS() << "LLPermissions::getSafeOwner() called with no valid owner!" << LL_ENDL;
LLUUID unused_uuid;
unused_uuid.generate();
@@ -666,7 +665,7 @@ BOOL LLPermissions::importFile(LLFILE* fp)
}
else
{
- llinfos << "unknown keyword " << keyword << " in permissions import" << llendl;
+ LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL;
}
}
fix();
@@ -800,7 +799,7 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
}
else
{
- llinfos << "unknown keyword " << keyword << " in permissions import" << llendl;
+ LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL;
}
}
fix();
@@ -895,21 +894,6 @@ std::ostream& operator<<(std::ostream &s, const LLPermissions &perm)
return s;
}
-template <>
-void LLMetaClassT<LLPermissions>::reflectProperties(LLMetaClass& meta_class)
-{
- reflectProperty(meta_class, "mCreator", &LLPermissions::mCreator);
- reflectProperty(meta_class, "mOwner", &LLPermissions::mOwner);
- reflectProperty(meta_class, "mGroup", &LLPermissions::mGroup);
- reflectProperty(meta_class, "mIsGroupOwned", &LLPermissions::mIsGroupOwned);
-}
-
-// virtual
-const LLMetaClass& LLPermissions::getMetaClass() const
-{
- return LLMetaClassT<LLPermissions>::instance();
-}
-
///----------------------------------------------------------------------------
/// Class LLAggregatePermissions
///----------------------------------------------------------------------------
@@ -997,8 +981,8 @@ void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed)
mBits[idx] = allowed ? AP_ALL : AP_SOME;
break;
default:
- llwarns << "Bad aggregateBit " << (S32)idx << " "
- << (allowed ? "true" : "false") << llendl;
+ LL_WARNS() << "Bad aggregateBit " << (S32)idx << " "
+ << (allowed ? "true" : "false") << LL_ENDL;
break;
}
}
@@ -1042,8 +1026,8 @@ void LLAggregatePermissions::aggregateIndex(EPermIndex idx, U8 bits)
}
break;
default:
- llwarns << "Bad aggregate index " << (S32)idx << " "
- << (S32)bits << llendl;
+ LL_WARNS() << "Bad aggregate index " << (S32)idx << " "
+ << (S32)bits << LL_ENDL;
break;
}
}
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 3ecc922370..89c66f6ebd 100644..100755
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -31,7 +31,6 @@
#include "llsd.h"
#include "lluuid.h"
#include "llxmlnode.h"
-#include "reflective.h"
#include "llinventorytype.h"
// prototypes
@@ -83,7 +82,7 @@ template<class T> class LLMetaClassT;
// logical consistency.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLPermissions : public LLReflective
+class LLPermissions
{
private:
LLUUID mCreator; // null if object created by system
@@ -324,9 +323,6 @@ public:
friend std::ostream& operator<<(std::ostream &s, const LLPermissions &perm);
- // Reflection.
- friend class LLMetaClassT<LLPermissions>;
- virtual const LLMetaClass& getMetaClass() const;
};
// Inlines
diff --git a/indra/llinventory/llpermissionsflags.h b/indra/llinventory/llpermissionsflags.h
index 9ecf465c8c..9ecf465c8c 100644..100755
--- a/indra/llinventory/llpermissionsflags.h
+++ b/indra/llinventory/llpermissionsflags.h
diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp
index dd408a8efe..63e34d188e 100644..100755
--- a/indra/llinventory/llsaleinfo.cpp
+++ b/indra/llinventory/llsaleinfo.cpp
@@ -179,14 +179,14 @@ BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask)
}
else if (!strcmp("perm_mask", keyword))
{
- //llinfos << "found deprecated keyword perm_mask" << llendl;
+ //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL;
has_perm_mask = TRUE;
sscanf(valuestr, "%x", &perm_mask);
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in sale info import" << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in sale info import" << LL_ENDL;
}
}
return success;
@@ -235,14 +235,14 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m
}
else if (!strcmp("perm_mask", keyword))
{
- //llinfos << "found deprecated keyword perm_mask" << llendl;
+ //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL;
has_perm_mask = TRUE;
sscanf(valuestr, "%x", &perm_mask);
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in sale info import" << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in sale info import" << LL_ENDL;
}
}
return success;
diff --git a/indra/llinventory/llsaleinfo.h b/indra/llinventory/llsaleinfo.h
index 4e98ccf6ff..4e98ccf6ff 100644..100755
--- a/indra/llinventory/llsaleinfo.h
+++ b/indra/llinventory/llsaleinfo.h
diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp
index ee0e6ae26c..e21f29df41 100644..100755
--- a/indra/llinventory/lltransactionflags.cpp
+++ b/indra/llinventory/lltransactionflags.cpp
@@ -92,11 +92,11 @@ std::string build_transfer_message_to_source(
S32 transaction_type,
const std::string& description)
{
- lldebugs << "build_transfer_message_to_source: " << amount << " "
+ LL_DEBUGS() << "build_transfer_message_to_source: " << amount << " "
<< source_id << " " << dest_id << " " << dest_name << " "
<< transaction_type << " "
<< (description.empty() ? "(no desc)" : description)
- << llendl;
+ << LL_ENDL;
if(source_id.isNull())
{
return description;
@@ -144,10 +144,10 @@ std::string build_transfer_message_to_destination(
S32 transaction_type,
const std::string& description)
{
- lldebugs << "build_transfer_message_to_dest: " << amount << " "
+ LL_DEBUGS() << "build_transfer_message_to_dest: " << amount << " "
<< dest_id << " " << source_id << " " << source_name << " "
<< transaction_type << " " << (description.empty() ? "(no desc)" : description)
- << llendl;
+ << LL_ENDL;
if(0 == amount)
{
return std::string();
diff --git a/indra/llinventory/lltransactionflags.h b/indra/llinventory/lltransactionflags.h
index 8227f3bcc2..8227f3bcc2 100644..100755
--- a/indra/llinventory/lltransactionflags.h
+++ b/indra/llinventory/lltransactionflags.h
diff --git a/indra/llinventory/lltransactiontypes.h b/indra/llinventory/lltransactiontypes.h
index 6f8d005f1b..6f8d005f1b 100644..100755
--- a/indra/llinventory/lltransactiontypes.h
+++ b/indra/llinventory/lltransactiontypes.h
diff --git a/indra/llinventory/lluserrelations.cpp b/indra/llinventory/lluserrelations.cpp
index b938dfeb7b..b938dfeb7b 100644..100755
--- a/indra/llinventory/lluserrelations.cpp
+++ b/indra/llinventory/lluserrelations.cpp
diff --git a/indra/llinventory/lluserrelations.h b/indra/llinventory/lluserrelations.h
index 9fbf36f0e2..9fbf36f0e2 100644..100755
--- a/indra/llinventory/lluserrelations.h
+++ b/indra/llinventory/lluserrelations.h
diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp
index c9af7c4eac..7b15552f24 100644..100755
--- a/indra/llinventory/tests/inventorymisc_test.cpp
+++ b/indra/llinventory/tests/inventorymisc_test.cpp
@@ -153,7 +153,7 @@ namespace tut
{
LLPointer<LLInventoryItem> src = create_random_inventory_item();
LLSD sd = ll_create_sd_from_inventory_item(src);
- //llinfos << "sd: " << *sd << llendl;
+ //LL_INFOS() << "sd: " << *sd << LL_ENDL;
LLPointer<LLInventoryItem> dst = new LLInventoryItem;
bool successful_parse = dst->fromLLSD(sd);
ensure_equals("0.LLInventoryItem::fromLLSD()", successful_parse, true);
@@ -219,7 +219,7 @@ namespace tut
src->setCreationDate(new_creation);
sd = ll_create_sd_from_inventory_item(src);
- //llinfos << "sd: " << *sd << llendl;
+ //LL_INFOS() << "sd: " << *sd << LL_ENDL;
successful_parse = dst->fromLLSD(sd);
ensure_equals("13.item id::getUUID() failed", dst->getUUID(), src->getUUID());
ensure_equals("14.parent::getParentUUID() failed", dst->getParentUUID(), src->getParentUUID());
@@ -323,7 +323,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w+");
if(!fp)
{
- llerrs << "file could not be opened\n" << llendl;
+ LL_ERRS() << "file could not be opened\n" << LL_ENDL;
return;
}
@@ -335,7 +335,7 @@ namespace tut
fp = LLFile::fopen("linden_file.dat","r+");
if(!fp)
{
- llerrs << "file could not be opened\n" << llendl;
+ LL_ERRS() << "file could not be opened\n" << LL_ENDL;
return;
}
@@ -460,7 +460,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w");
if(!fp)
{
- llerrs << "file coudnt be opened\n" << llendl;
+ LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}
@@ -472,7 +472,7 @@ namespace tut
fp = LLFile::fopen("linden_file.dat","r");
if(!fp)
{
- llerrs << "file coudnt be opened\n" << llendl;
+ LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}
diff --git a/indra/llinventory/tests/llparcel_test.cpp b/indra/llinventory/tests/llparcel_test.cpp
index f2e4b03ff7..f2e4b03ff7 100644..100755
--- a/indra/llinventory/tests/llparcel_test.cpp
+++ b/indra/llinventory/tests/llparcel_test.cpp