summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/lleconomy.h2
-rw-r--r--indra/llinventory/llinventory.cpp105
-rw-r--r--indra/llinventory/llinventory.h4
-rw-r--r--indra/llinventory/llinventorytype.cpp4
-rw-r--r--indra/llinventory/llinventorytype.h3
-rw-r--r--indra/llinventory/llnotecard.h2
-rw-r--r--indra/llinventory/llparcel.cpp4
-rw-r--r--indra/llinventory/llparcel.h1
-rw-r--r--indra/llinventory/llpermissions.cpp63
-rw-r--r--indra/llinventory/llpermissions.h3
-rw-r--r--indra/llinventory/llsaleinfo.cpp34
-rw-r--r--indra/llinventory/llsaleinfo.h3
12 files changed, 18 insertions, 210 deletions
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h
index 2e2adc4d45..e480085453 100644
--- a/indra/llinventory/lleconomy.h
+++ b/indra/llinventory/lleconomy.h
@@ -32,7 +32,7 @@
#ifndef LL_LLECONOMY_H
#define LL_LLECONOMY_H
-#include "llmemory.h"
+#include "llsingleton.h"
class LLMessageSystem;
class LLVector3;
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 2823cf7be9..ce2e4e9cfa 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1097,109 +1097,8 @@ fail:
}
-LLXMLNode *LLInventoryItem::exportFileXML(BOOL include_asset_key) const
-{
- LLMemType m1(LLMemType::MTYPE_INVENTORY);
- LLXMLNode *ret = new LLXMLNode("item", FALSE);
-
- ret->createChild("uuid", TRUE)->setUUIDValue(1, &mUUID);
- ret->createChild("parent_uuid", TRUE)->setUUIDValue(1, &mParentUUID);
-
- mPermissions.exportFileXML()->setParent(ret);
-
- // Check for permissions to see the asset id, and if so write it
- // out as an asset id. Otherwise, apply our cheesy encryption.
- if(include_asset_key)
- {
- U32 mask = mPermissions.getMaskBase();
- if(((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
- || (mAssetUUID.isNull()))
- {
- ret->createChild("asset_id", FALSE)->setUUIDValue(1, &mAssetUUID);
- }
- else
- {
- LLUUID shadow_id(mAssetUUID);
- LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
- cipher.encrypt(shadow_id.mData, UUID_BYTES);
-
- ret->createChild("shadow_id", FALSE)->setUUIDValue(1, &shadow_id);
- }
- }
-
- std::string type_str = LLAssetType::lookup(mType);
- std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
-
- ret->createChild("asset_type", FALSE)->setStringValue(type_str);
- ret->createChild("inventory_type", FALSE)->setStringValue(inv_type_str);
- S32 tmp_flags = (S32) mFlags;
- ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX);
-
- mSaleInfo.exportFileXML()->setParent(ret);
-
- std::string temp;
- temp.assign(mName);
- ret->createChild("name", FALSE)->setStringValue(temp);
- temp.assign(mDescription);
- ret->createChild("description", FALSE)->setStringValue(temp);
- S32 date = mCreationDate;
- ret->createChild("creation_date", FALSE)->setIntValue(1, &date);
-
- return ret;
-}
-
-BOOL LLInventoryItem::importXML(LLXMLNode* node)
-{
- BOOL success = FALSE;
- if (node)
- {
- success = TRUE;
- LLXMLNodePtr sub_node;
- if (node->getChild("uuid", sub_node))
- success = (1 == sub_node->getUUIDValue(1, &mUUID));
- if (node->getChild("parent_uuid", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mParentUUID));
- if (node->getChild("permissions", sub_node))
- success = success && mPermissions.importXML(sub_node);
- if (node->getChild("asset_id", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
- if (node->getChild("shadow_id", sub_node))
- {
- success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
- LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
- cipher.decrypt(mAssetUUID.mData, UUID_BYTES);
- }
- if (node->getChild("asset_type", sub_node))
- mType = LLAssetType::lookup(sub_node->getValue());
- if (node->getChild("inventory_type", sub_node))
- mInventoryType = LLInventoryType::lookup(sub_node->getValue());
- if (node->getChild("flags", sub_node))
- {
- S32 tmp_flags = 0;
- success = success && (1 == sub_node->getIntValue(1, &tmp_flags));
- mFlags = (U32) tmp_flags;
- }
- if (node->getChild("sale_info", sub_node))
- success = success && mSaleInfo.importXML(sub_node);
- if (node->getChild("name", sub_node))
- mName = sub_node->getValue();
- if (node->getChild("description", sub_node))
- mDescription = sub_node->getValue();
- if (node->getChild("creation_date", sub_node))
- {
- S32 date = 0;
- success = success && (1 == sub_node->getIntValue(1, &date));
- mCreationDate = date;
- }
-
- if (!success)
- {
- lldebugs << "LLInventory::importXML() failed for node named '"
- << node->getName() << "'" << llendl;
- }
- }
- return success;
-}
+// Deleted LLInventoryItem::exportFileXML() and LLInventoryItem::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
S32 LLInventoryItem::packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override) const
{
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index d34046c310..bdf444d34f 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -40,6 +40,7 @@
#include "llinventorytype.h"
#include "llmemtype.h"
#include "llpermissions.h"
+#include "llrefcount.h"
#include "llsaleinfo.h"
#include "llsd.h"
#include "lluuid.h"
@@ -273,9 +274,6 @@ public:
virtual BOOL importLegacyStream(std::istream& input_stream);
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
- virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
- BOOL importXML(LLXMLNode* node);
-
// helper functions
// pack all information needed to reconstruct this item into the given binary bucket.
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index a161a0ee00..d905fe3ea7 100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -63,6 +63,7 @@ static const char* INVENTORY_TYPE_NAMES[LLInventoryType::IT_COUNT] =
"wearable",
"animation",
"gesture", // 20
+ "favorite" //21
};
// This table is meant for decoding to human readable form. Put any
@@ -91,6 +92,7 @@ static const char* INVENTORY_TYPE_HUMAN_NAMES[LLInventoryType::IT_COUNT] =
"wearable",
"animation",
"gesture", // 20
+ "favorite" // 21
};
// Maps asset types to the default inventory type for that kind of asset.
@@ -120,6 +122,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
LLInventoryType::IT_NONE, // AT_IMAGE_JPEG
LLInventoryType::IT_ANIMATION, // AT_ANIMATION
LLInventoryType::IT_GESTURE, // AT_GESTURE
+ LLInventoryType::IT_FAVORITE, // AT_FAVORITE
};
static const int MAX_POSSIBLE_ASSET_TYPES = 2;
@@ -147,6 +150,7 @@ INVENTORY_TO_ASSET_TYPE[LLInventoryType::IT_COUNT][MAX_POSSIBLE_ASSET_TYPES] =
{ LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART }, // IT_WEARABLE
{ LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE }, // IT_ANIMATION
{ LLAssetType::AT_GESTURE, LLAssetType::AT_NONE }, // IT_GESTURE
+ { LLAssetType::AT_FAVORITE, LLAssetType::AT_NONE }, // IT_FAVORITE
};
// static
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index d3effc0e6d..c9ba97d7b6 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -67,7 +67,8 @@ public:
IT_WEARABLE = 18,
IT_ANIMATION = 19,
IT_GESTURE = 20,
- IT_COUNT = 21,
+ IT_FAVORITE = 21,
+ IT_COUNT = 22,
IT_NONE = -1
};
diff --git a/indra/llinventory/llnotecard.h b/indra/llinventory/llnotecard.h
index b903f1fdb0..092ab2ce35 100644
--- a/indra/llinventory/llnotecard.h
+++ b/indra/llinventory/llnotecard.h
@@ -33,7 +33,7 @@
#ifndef LL_NOTECARD_H
#define LL_NOTECARD_H
-#include "llmemory.h"
+#include "llpointer.h"
#include "llinventory.h"
class LLNotecard
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 9c27476b0a..60ebc44a3e 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -85,13 +85,13 @@ static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
"None",
"Linden Location",
"Adult",
- "Arts & Culture",
+ "Arts and Culture",
"Business",
"Educational",
"Gaming",
"Hangout",
"Newcomer Friendly",
- "Parks & Nature",
+ "Parks and Nature",
"Residential",
"Shopping",
"Stage",
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 6f5ae87ebd..021ad89e52 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -38,6 +38,7 @@
#include "lluuid.h"
#include "llparcelflags.h"
#include "llpermissions.h"
+#include "lltimer.h"
#include "v3math.h"
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index 328ed4588b..559a5631dc 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -831,67 +831,8 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
return TRUE;
}
-
-LLXMLNode *LLPermissions::exportFileXML() const
-{
- LLXMLNode *ret = new LLXMLNode("permissions", FALSE);
-
- ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);
-
- ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
- ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
- ret->createChild("group_mask", FALSE)->setByteValue(4, (U8*)&mMaskGroup, LLXMLNode::ENCODING_HEX);
- ret->createChild("everyone_mask", FALSE)->setByteValue(4, (U8*)&mMaskEveryone, LLXMLNode::ENCODING_HEX);
- ret->createChild("next_owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskNextOwner, LLXMLNode::ENCODING_HEX);
-
- ret->createChild("creator_id", FALSE)->setUUIDValue(1, &mCreator);
- ret->createChild("owner_id", FALSE)->setUUIDValue(1, &mOwner);
- ret->createChild("last_owner_id", FALSE)->setUUIDValue(1, &mLastOwner);
- ret->createChild("group_id", FALSE)->setUUIDValue(1, &mGroup);
-
- return ret;
-}
-
-bool LLPermissions::importXML(LLXMLNode* node)
-{
- bool success = false;
- if (node)
- {
- success = true;
- LLXMLNodePtr sub_node;
- if (node->getChild("base_mask", sub_node))
- success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskBase));
- if (node->getChild("owner_mask", sub_node))
- success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskOwner));
- if (node->getChild("group_mask", sub_node))
- success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskGroup));
- if (node->getChild("everyone_mask", sub_node))
- success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskEveryone));
- if (node->getChild("next_owner_mask", sub_node))
- success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskNextOwner));
-
- if (node->getChild("creator_id", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mCreator));
- if (node->getChild("owner_id", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mOwner));
- if (node->getChild("last_owner_id", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mLastOwner));
- if (node->getChild("group_id", sub_node))
- success = success && (1 == sub_node->getUUIDValue(1, &mGroup));
- if (node->getChild("group_owned", sub_node))
- {
- BOOL tmpbool = FALSE;
- success = success && (1 == sub_node->getBoolValue(1, &tmpbool));
- mIsGroupOwned = (bool)tmpbool;
- }
- if (!success)
- {
- lldebugs << "LLPermissions::importXML() failed for node named '"
- << node->getName() << "'" << llendl;
- }
- }
- return success;
-}
+// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
bool LLPermissions::operator==(const LLPermissions &rhs) const
{
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 5587f8c3c8..2035b57f5c 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -314,9 +314,6 @@ public:
BOOL importLegacyStream(std::istream& input_stream);
BOOL exportLegacyStream(std::ostream& output_stream) const;
- LLXMLNode *exportFileXML() const;
- bool importXML(LLXMLNode* node);
-
bool operator==(const LLPermissions &rhs) const;
bool operator!=(const LLPermissions &rhs) const;
diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp
index b7afb28adf..930901f309 100644
--- a/indra/llinventory/llsaleinfo.cpp
+++ b/indra/llinventory/llsaleinfo.cpp
@@ -135,38 +135,8 @@ bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
return true;
}
-LLXMLNode *LLSaleInfo::exportFileXML() const
-{
- LLXMLNode *ret = new LLXMLNode("sale_info", FALSE);
- std::string type_str = ll_safe_string( lookup(mSaleType));
- ret->createChild("type", TRUE)->setStringValue(1, &type_str);
- ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice);
- return ret;
-}
-
-BOOL LLSaleInfo::importXML(LLXMLNode* node)
-{
- BOOL success = FALSE;
- if (node)
- {
- success = TRUE;
- LLXMLNodePtr sub_node;
- if (node->getChild("type", sub_node))
- {
- mSaleType = lookup(sub_node->getValue().c_str());
- }
- if (node->getChild("price", sub_node))
- {
- success &= (1 == sub_node->getIntValue(1, &mSalePrice));
- }
- if (!success)
- {
- lldebugs << "LLSaleInfo::importXML() failed for node named '"
- << node->getName() << "'" << llendl;
- }
- }
- return success;
-}
+// Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask)
{
diff --git a/indra/llinventory/llsaleinfo.h b/indra/llinventory/llsaleinfo.h
index d546c49fd7..3461a128be 100644
--- a/indra/llinventory/llsaleinfo.h
+++ b/indra/llinventory/llsaleinfo.h
@@ -101,9 +101,6 @@ public:
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
- LLXMLNode *exportFileXML() const;
- BOOL importXML(LLXMLNode* node);
-
LLSD packMessage() const;
void unpackMessage(LLSD sales);