summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-06 16:10:16 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-06 16:10:16 +0100
commit1dade05ee77d01f88544984735d638542b42c1d1 (patch)
tree51e87c809698563876cc6ee508462654c1868a56 /indra
parent54c39177e58b9c189b96774d6ae3143d31559da0 (diff)
parentec5bd9c857b4d817685b09f9a10da7434ebbb816 (diff)
YET another hairy merge from viewer-trunk. Conflicts resolved... so far.
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/CMakeLists.txt2
-rw-r--r--indra/llinventory/llinventory.cpp81
-rw-r--r--indra/llinventory/llinventory.h297
-rw-r--r--indra/llinventory/llinventorydefines.cpp37
-rw-r--r--indra/llinventory/llinventorydefines.h106
-rw-r--r--indra/llmessage/message_prehash.cpp2
-rw-r--r--indra/newview/llagentwearables.cpp4
-rw-r--r--indra/newview/llagentwearablesfetch.cpp20
-rw-r--r--indra/newview/llappearancemgr.h8
-rw-r--r--indra/newview/llassetuploadresponders.cpp3
-rw-r--r--indra/newview/llcompilequeue.cpp26
-rw-r--r--indra/newview/llcompilequeue.h12
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp9
-rw-r--r--indra/newview/llfloaterbulkpermission.h4
-rw-r--r--indra/newview/llfloaterbuy.cpp11
-rw-r--r--indra/newview/llfloaterbuy.h2
-rw-r--r--indra/newview/llfloaterbuycontents.cpp9
-rw-r--r--indra/newview/llfloaterbuycontents.h2
-rw-r--r--indra/newview/llfloatergesture.cpp4
-rw-r--r--indra/newview/llfloateropenobject.cpp4
-rw-r--r--indra/newview/llfloaterproperties.cpp16
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp32
-rw-r--r--indra/newview/llinventoryfunctions.cpp46
-rw-r--r--indra/newview/llinventorymodel.cpp2
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp2
-rw-r--r--indra/newview/llinventoryobserver.cpp26
-rw-r--r--indra/newview/llinventoryobserver.h43
-rw-r--r--indra/newview/llpanelcontents.cpp3
-rw-r--r--indra/newview/llpanelgroupnotices.cpp3
-rw-r--r--indra/newview/llpanelobjectinventory.cpp19
-rw-r--r--indra/newview/llpanelobjectinventory.h6
-rw-r--r--indra/newview/llpaneloutfitedit.cpp2
-rw-r--r--indra/newview/llpreview.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp3
-rw-r--r--indra/newview/llpreviewnotecard.cpp1
-rw-r--r--indra/newview/llpreviewscript.cpp3
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp15
-rw-r--r--indra/newview/llstartup.cpp2
-rw-r--r--indra/newview/lltooldraganddrop.cpp9
-rw-r--r--indra/newview/lltracker.cpp7
-rw-r--r--indra/newview/llviewerinventory.cpp5
-rw-r--r--indra/newview/llviewerinventory.h2
-rw-r--r--indra/newview/llviewermenu.cpp11
-rw-r--r--indra/newview/llviewermessage.cpp21
-rw-r--r--indra/newview/llviewermessage.h2
-rw-r--r--indra/newview/llviewerobject.cpp27
-rw-r--r--indra/newview/llviewerobject.h6
-rw-r--r--indra/newview/llviewertexteditor.cpp4
-rw-r--r--indra/newview/llvoinventorylistener.h2
52 files changed, 527 insertions, 444 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index b358f0a013..a563db901a 100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -20,6 +20,7 @@ set(llinventory_SOURCE_FILES
llcategory.cpp
lleconomy.cpp
llinventory.cpp
+ llinventorydefines.cpp
llinventorytype.cpp
lllandmark.cpp
llnotecard.cpp
@@ -36,6 +37,7 @@ set(llinventory_HEADER_FILES
llcategory.h
lleconomy.h
llinventory.h
+ llinventorydefines.h
llinventorytype.h
lllandmark.h
llnotecard.h
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index d665deb605..2c767a4857 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -31,10 +31,10 @@
*/
#include "linden_common.h"
-
#include "llinventory.h"
#include "lldbstrings.h"
+#include "llinventorydefines.h"
#include "llxorcipher.h"
#include "llsd.h"
#include "message.h"
@@ -43,9 +43,8 @@
#include "llsdutil.h"
///----------------------------------------------------------------------------
-/// exported functions
+/// Exported functions
///----------------------------------------------------------------------------
-
static const std::string INV_ITEM_ID_LABEL("item_id");
static const std::string INV_FOLDER_ID_LABEL("folder_id");
static const std::string INV_PARENT_ID_LABEL("parent_id");
@@ -64,25 +63,23 @@ static const std::string INV_CREATION_DATE_LABEL("created_at");
// key used by agent-inventory-service
static const std::string INV_ASSET_TYPE_LABEL_WS("type_default");
static const std::string INV_FOLDER_ID_LABEL_WS("category_id");
+
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
-
const U8 TASK_INVENTORY_ITEM_KEY = 0;
const U8 TASK_INVENTORY_ASSET_KEY = 1;
const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
-
///----------------------------------------------------------------------------
/// Class LLInventoryObject
///----------------------------------------------------------------------------
-LLInventoryObject::LLInventoryObject(
- const LLUUID& uuid,
- const LLUUID& parent_uuid,
- LLAssetType::EType type,
- const std::string& name) :
+LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
+ const LLUUID& parent_uuid,
+ LLAssetType::EType type,
+ const std::string& name) :
mUUID(uuid),
mParentUUID(parent_uuid),
mType(type),
@@ -99,7 +96,7 @@ LLInventoryObject::LLInventoryObject() :
{
}
-LLInventoryObject::~LLInventoryObject( void )
+LLInventoryObject::~LLInventoryObject()
{
}
@@ -292,18 +289,17 @@ void LLInventoryObject::updateServer(BOOL) const
/// Class LLInventoryItem
///----------------------------------------------------------------------------
-LLInventoryItem::LLInventoryItem(
- const LLUUID& uuid,
- const LLUUID& parent_uuid,
- const LLPermissions& permissions,
- const LLUUID& asset_uuid,
- LLAssetType::EType type,
- LLInventoryType::EType inv_type,
- const std::string& name,
- const std::string& desc,
- const LLSaleInfo& sale_info,
- U32 flags,
- S32 creation_date_utc) :
+LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
+ const LLUUID& parent_uuid,
+ const LLPermissions& permissions,
+ const LLUUID& asset_uuid,
+ LLAssetType::EType type,
+ LLInventoryType::EType inv_type,
+ const std::string& name,
+ const std::string& desc,
+ const LLSaleInfo& sale_info,
+ U32 flags,
+ S32 creation_date_utc) :
LLInventoryObject(uuid, parent_uuid, type, name),
mPermissions(permissions),
mAssetUUID(asset_uuid),
@@ -458,11 +454,18 @@ 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)
+{
+ mPermissions.setCreator(creator);
+}
+
void LLInventoryItem::accumulatePermissionSlamBits(const LLInventoryItem& old_item)
{
// Remove any pre-existing II_FLAGS_PERM_OVERWRITE_MASK flags
// because we now detect when they should be set.
- setFlags( old_item.getFlags() | (getFlags() & ~(LLInventoryItem::II_FLAGS_PERM_OVERWRITE_MASK)) );
+ setFlags( old_item.getFlags() | (getFlags() & ~(LLInventoryItemFlags::II_FLAGS_PERM_OVERWRITE_MASK)) );
// Enforce the PERM_OVERWRITE flags for any masks that are different
// but only for AT_OBJECT's since that is the only asset type that can
@@ -473,20 +476,20 @@ void LLInventoryItem::accumulatePermissionSlamBits(const LLInventoryItem& old_it
U32 flags_to_be_set = 0;
if(old_permissions.getMaskNextOwner() != getPermissions().getMaskNextOwner())
{
- flags_to_be_set |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
+ flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
if(old_permissions.getMaskEveryone() != getPermissions().getMaskEveryone())
{
- flags_to_be_set |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
+ flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
if(old_permissions.getMaskGroup() != getPermissions().getMaskGroup())
{
- flags_to_be_set |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
+ flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
LLSaleInfo old_sale_info = old_item.getSaleInfo();
if(old_sale_info != getSaleInfo())
{
- flags_to_be_set |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE;
+ flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
}
setFlags(getFlags() | flags_to_be_set);
}
@@ -1304,28 +1307,14 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
setCreationDate(now);
}
-// returns TRUE if a should appear before b
-BOOL item_dictionary_sort( LLInventoryItem* a, LLInventoryItem* b )
-{
- return (LLStringUtil::compareDict( a->getName().c_str(), b->getName().c_str() ) < 0);
-}
-
-// returns TRUE if a should appear before b
-BOOL item_date_sort( LLInventoryItem* a, LLInventoryItem* b )
-{
- return a->getCreationDate() < b->getCreationDate();
-}
-
-
///----------------------------------------------------------------------------
/// Class LLInventoryCategory
///----------------------------------------------------------------------------
-LLInventoryCategory::LLInventoryCategory(
- const LLUUID& uuid,
- const LLUUID& parent_uuid,
- LLFolderType::EType preferred_type,
- const std::string& name) :
+LLInventoryCategory::LLInventoryCategory(const LLUUID& uuid,
+ const LLUUID& parent_uuid,
+ LLFolderType::EType preferred_type,
+ const std::string& name) :
LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name),
mPreferredType(preferred_type)
{
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 9faecbea85..b083e305b1 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -33,8 +33,6 @@
#ifndef LL_LLINVENTORY_H
#define LL_LLINVENTORY_H
-#include <functional>
-
#include "lldarray.h"
#include "llfoldertype.h"
#include "llinventorytype.h"
@@ -45,180 +43,94 @@
#include "llsd.h"
#include "lluuid.h"
-// consts for Key field in the task inventory update message
-extern const U8 TASK_INVENTORY_ITEM_KEY;
-extern const U8 TASK_INVENTORY_ASSET_KEY;
-
-// anonymous enumeration to specify a max inventory buffer size for
-// use in packBinaryBucket()
-enum
-{
- MAX_INVENTORY_BUFFER_SIZE = 1024
-};
-
-
+class LLMessageSystem;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryObject
//
-// This is the base class for inventory objects that handles the
-// common code between items and categories. The 'mParentUUID' member
-// means the parent category since all inventory objects except each
-// user's root category are in some category. Each user's root
-// category will have mParentUUID==LLUUID::null.
+// Base class for anything in the user's inventory. Handles the common code
+// between items and categories.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLMessageSystem;
-
class LLInventoryObject : public LLRefCount
{
-protected:
- LLUUID mUUID;
- LLUUID mParentUUID;
- LLAssetType::EType mType;
- std::string mName;
+public:
+ typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
-protected:
- virtual ~LLInventoryObject( void );
-
+ //--------------------------------------------------------------------
+ // Initialization
+ //--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
- LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
- LLAssetType::EType type, const std::string& name);
LLInventoryObject();
+ LLInventoryObject(const LLUUID& uuid,
+ const LLUUID& parent_uuid,
+ LLAssetType::EType type,
+ const std::string& name);
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
+protected:
+ virtual ~LLInventoryObject();
- // accessors
- virtual const LLUUID& getUUID() const;
+ //--------------------------------------------------------------------
+ // Accessors
+ //--------------------------------------------------------------------
+public:
+ virtual const LLUUID& getUUID() const; // inventoryID that this item points to
+ virtual const LLUUID& getLinkedUUID() const; // inventoryID that this item points to, else this item's inventoryID
const LLUUID& getParentUUID() const;
- virtual const LLUUID& getLinkedUUID() const; // get the inventoryID that this item points to, else this item's inventoryID
virtual const std::string& getName() const;
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
BOOL getIsLinkType() const;
- // mutators - will not call updateServer();
+
+ //--------------------------------------------------------------------
+ // Mutators
+ // Will not call updateServer
+ //--------------------------------------------------------------------
+public:
void setUUID(const LLUUID& new_uuid);
virtual void rename(const std::string& new_name);
void setParent(const LLUUID& new_parent);
void setType(LLAssetType::EType type);
- // file support - implemented here so that a minimal information
- // set can be transmitted between simulator and viewer.
-// virtual BOOL importFile(LLFILE* fp);
+ //--------------------------------------------------------------------
+ // 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 methods
virtual void removeFromServer();
virtual void updateParentOnServer(BOOL) const;
virtual void updateServer(BOOL) const;
+
+ //--------------------------------------------------------------------
+ // Member Variables
+ //--------------------------------------------------------------------
+protected:
+ LLUUID mUUID;
+ LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
+ LLAssetType::EType mType;
+ std::string mName;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryItem
//
-// An inventory item represents something that the current user has in
-// their inventory.
+// An item in the current user's inventory.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryItem : public LLInventoryObject
{
public:
typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
-
-protected:
- LLPermissions mPermissions;
- LLUUID mAssetUUID;
- std::string mDescription;
- LLSaleInfo mSaleInfo;
- LLInventoryType::EType mInventoryType;
- U32 mFlags;
- time_t mCreationDate; // seconds from 1/1/1970, UTC
+ //--------------------------------------------------------------------
+ // Initialization
+ //--------------------------------------------------------------------
public:
-
- /**
- * Anonymous enumeration for specifying the inventory item flags.
- */
- enum
- {
- // The shared flags at the top are shared among all inventory
- // types. After that section, all values of flags are type
- // dependent. The shared flags will start at 2^30 and work
- // down while item type specific flags will start at 2^0 and
- // work up.
- II_FLAGS_NONE = 0,
-
-
- //
- // Shared flags
- //
- //
-
- // This value means that the asset has only one reference in
- // the system. If the inventory item is deleted, or the asset
- // id updated, then we can remove the old reference.
- II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
-
-
- //
- // Landmark flags
- //
- II_FLAGS_LANDMARK_VISITED = 1,
-
- //
- // Object flags
- //
-
- // flag to indicate that object permissions should have next
- // owner perm be more restrictive on rez. We bump this into
- // the second byte of the flags since the low byte is used to
- // track attachment points.
- II_FLAGS_OBJECT_SLAM_PERM = 0x100,
-
- // flag to indicate that the object sale information has been changed.
- II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
-
- // These flags specify which permissions masks to overwrite
- // upon rez. Normally, if no permissions slam (above) or
- // overwrite flags are set, the asset's permissions are
- // used and the inventory's permissions are ignored. If
- // any of these flags are set, the inventory's permissions
- // take precedence.
- II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
- II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
- II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
- II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
- II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
-
- // flag to indicate whether an object that is returned is composed
- // of muiltiple items or not.
- II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
-
- //
- // wearables use the low order byte of flags to store the
- // EWearableType enumeration found in newview/llwearable.h
- //
- II_FLAGS_WEARABLES_MASK = 0xff,
-
- // these bits need to be cleared whenever the asset_id is updated
- // on a pre-existing inventory item (DEV-28098 and DEV-30997)
- II_FLAGS_PERM_OVERWRITE_MASK = II_FLAGS_OBJECT_SLAM_PERM
- | II_FLAGS_OBJECT_SLAM_SALE
- | II_FLAGS_OBJECT_PERM_OVERWRITE_BASE
- | II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER
- | II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP
- | II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE
- | II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER,
- };
-
-protected:
- ~LLInventoryItem(); // ref counted
-
-public:
-
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryItem(const LLUUID& uuid,
const LLUUID& parent_uuid,
@@ -237,10 +149,14 @@ public:
// is prohibited
LLInventoryItem(const LLInventoryItem* other);
virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
-
void generateUUID() { mUUID.generate(); }
+protected:
+ ~LLInventoryItem(); // ref counted
- // accessors
+ //--------------------------------------------------------------------
+ // Accessors
+ //--------------------------------------------------------------------
+public:
virtual const LLUUID& getLinkedUUID() const;
virtual const LLPermissions& getPermissions() const;
virtual const LLUUID& getCreatorUUID() const;
@@ -252,8 +168,12 @@ public:
virtual time_t getCreationDate() const;
virtual U32 getCRC32() const; // really more of a checksum.
- // mutators - will not call updateServer(), and will never fail
- // (though it may correct to sane values)
+ //--------------------------------------------------------------------
+ // Mutators
+ // Will not call updateServer and will never fail
+ // (though it may correct to sane values)
+ //--------------------------------------------------------------------
+public:
void setAssetUUID(const LLUUID& asset_id);
void setDescription(const std::string& new_desc);
void setSaleInfo(const LLSaleInfo& sale_info);
@@ -261,62 +181,68 @@ public:
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
- // and set the corresponding bits in mFlags
+ // and set the corresponding bits in mFlags.
void accumulatePermissionSlamBits(const LLInventoryItem& old_item);
-
- // This is currently only used in the Viewer to handle calling cards
- // where the creator is actually used to store the target.
- void setCreator(const LLUUID& creator) { mPermissions.setCreator(creator); }
- // Put this inventory item onto the current outgoing mesage. It
- // assumes you have already called nextBlock().
+ // Put this inventory item onto the current outgoing mesage.
+ // Assumes you have already called nextBlock().
virtual void packMessage(LLMessageSystem* msg) const;
- // unpack returns TRUE if the inventory item came through the
- // network ok. It uses a simple crc check which is defeatable, but
- // we want to detect network mangling somehow.
+ // Returns TRUE if the inventory item came through the network correctly.
+ // Uses a simple crc check which is defeatable, but we want to detect
+ // network mangling somehow.
virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
- // file support
+
+ //--------------------------------------------------------------------
+ // File Support
+ //--------------------------------------------------------------------
+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;
- // helper functions
-
- // pack all information needed to reconstruct this item into the given binary bucket.
- // perm_override is optional
+ //--------------------------------------------------------------------
+ // Helper Functions
+ //--------------------------------------------------------------------
+public:
+ // Pack all information needed to reconstruct this item into the given binary bucket.
S32 packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override = NULL) const;
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
LLSD asLLSD() const;
void asLLSD( LLSD& sd ) const;
bool fromLLSD(const LLSD& sd);
+ //--------------------------------------------------------------------
+ // Member Variables
+ //--------------------------------------------------------------------
+protected:
+ LLPermissions mPermissions;
+ LLUUID mAssetUUID;
+ std::string mDescription;
+ LLSaleInfo mSaleInfo;
+ LLInventoryType::EType mInventoryType;
+ U32 mFlags;
+ time_t mCreationDate; // seconds from 1/1/1970, UTC
};
-BOOL item_dictionary_sort(LLInventoryItem* a,LLInventoryItem* b);
-BOOL item_date_sort(LLInventoryItem* a, LLInventoryItem* b);
-
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryCategory
//
-// An instance of this class represents a category of inventory
-// items. Users come with a set of default categories, and can create
-// new ones as needed.
+// A category/folder of inventory items. Users come with a set of default
+// categories, and can create new ones as needed.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryCategory : public LLInventoryObject
{
public:
typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
-protected:
- ~LLInventoryCategory();
-
+ //--------------------------------------------------------------------
+ // Initialization
+ //--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
@@ -325,40 +251,49 @@ public:
LLInventoryCategory();
LLInventoryCategory(const LLInventoryCategory* other);
void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
+protected:
+ ~LLInventoryCategory();
- // accessors and mutators
+ //--------------------------------------------------------------------
+ // Accessors And Mutators
+ //--------------------------------------------------------------------
+public:
LLFolderType::EType getPreferredType() const;
void setPreferredType(LLFolderType::EType type);
- // For messaging system support
- virtual void packMessage(LLMessageSystem* msg) const;
- virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
-
LLSD asLLSD() const;
bool fromLLSD(const LLSD& sd);
- // file support
+ //--------------------------------------------------------------------
+ // Messaging
+ //--------------------------------------------------------------------
+public:
+ virtual void packMessage(LLMessageSystem* msg) const;
+ virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
+
+ //--------------------------------------------------------------------
+ // File Support
+ //--------------------------------------------------------------------
+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;
+ //--------------------------------------------------------------------
+ // Member Variables
+ //--------------------------------------------------------------------
protected:
- // May be the type that this category was "meant" to hold (although it may hold any type).
- LLFolderType::EType mPreferredType;
+ LLFolderType::EType mPreferredType; // Type that this category was "meant" to hold (although it may hold any type).
};
//-----------------------------------------------------------------------------
-// Useful bits
+// Convertors
+//
+// These functions convert between structured data and an inventory
+// item, appropriate for serialization.
//-----------------------------------------------------------------------------
-
-typedef std::list<LLPointer<LLInventoryObject> > InventoryObjectList;
-
-// These functions convert between structured data and an inventory
-// item, appropriate for serialization.
LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item);
-//LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item);
LLSD ll_create_sd_from_inventory_category(LLPointer<LLInventoryCategory> cat);
LLPointer<LLInventoryCategory> ll_create_category_from_sd(const LLSD& sd_cat);
diff --git a/indra/llinventory/llinventorydefines.cpp b/indra/llinventory/llinventorydefines.cpp
new file mode 100644
index 0000000000..a9610d4d4b
--- /dev/null
+++ b/indra/llinventory/llinventorydefines.cpp
@@ -0,0 +1,37 @@
+/**
+ * @file llinventorydefines.cpp
+ * @brief Implementation of the inventory defines.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llinventorydefines.h"
+
+const U8 TASK_INVENTORY_ITEM_KEY = 0;
+const U8 TASK_INVENTORY_ASSET_KEY = 1;
diff --git a/indra/llinventory/llinventorydefines.h b/indra/llinventory/llinventorydefines.h
new file mode 100644
index 0000000000..ccf1a356de
--- /dev/null
+++ b/indra/llinventory/llinventorydefines.h
@@ -0,0 +1,106 @@
+/**
+ * @file llinventorydefines.h
+ * @brief LLInventoryDefines
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLINVENTORYDEFINES_H
+#define LL_LLINVENTORYDEFINES_H
+
+// Consts for "key" field in the task inventory update message
+extern const U8 TASK_INVENTORY_ITEM_KEY;
+extern const U8 TASK_INVENTORY_ASSET_KEY;
+
+// Max inventory buffer size (for use in packBinaryBucket)
+enum
+{
+ MAX_INVENTORY_BUFFER_SIZE = 1024
+};
+
+//--------------------------------------------------------------------
+// Inventory item flags enums
+// The shared flags at the top are shared among all inventory
+// types. After that section, all values of flags are type
+// dependent. The shared flags will start at 2^30 and work
+// down while item type specific flags will start at 2^0 and work up.
+//--------------------------------------------------------------------
+class LLInventoryItemFlags
+{
+public:
+ enum EType
+ {
+ II_FLAGS_NONE = 0,
+
+ II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
+ // The asset has only one reference in the system. If the
+ // inventory item is deleted, or the assetid updated, then we
+ // can remove the old reference.
+
+ II_FLAGS_LANDMARK_VISITED = 1,
+
+ II_FLAGS_OBJECT_SLAM_PERM = 0x100,
+ // Object permissions should have next owner perm be more
+ // restrictive on rez. We bump this into the second byte of the
+ // flags since the low byte is used to track attachment points.
+
+ II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
+ // The object sale information has been changed.
+
+ II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
+ II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
+ II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
+ II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
+ II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
+ // Specify which permissions masks to overwrite
+ // upon rez. Normally, if no permissions slam (above) or
+ // overwrite flags are set, the asset's permissions are
+ // used and the inventory's permissions are ignored. If
+ // any of these flags are set, the inventory's permissions
+ // take precedence.
+
+ II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
+ // Whether a returned object is composed of multiple items.
+
+ II_FLAGS_WEARABLES_MASK = 0xff,
+ // Wearables use the low order byte of flags to store the
+ // EWearableType enumeration found in newview/llwearable.h
+
+ II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
+ II_FLAGS_OBJECT_SLAM_SALE |
+ II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
+ II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
+ II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
+ II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
+ II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
+ // These bits need to be cleared whenever the asset_id is updated
+ // on a pre-existing inventory item (DEV-28098 and DEV-30997)
+ };
+};
+
+#endif // LL_LLINVENTORYDEFINES_H
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index 9e3986f257..a118e21ffb 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -1147,7 +1147,7 @@ char* _PREHASH_ForceObjectSelect = LLMessageStringTable::getInstance()->getStrin
char* _PREHASH_Price = LLMessageStringTable::getInstance()->getString("Price");
char* _PREHASH_SunDirection = LLMessageStringTable::getInstance()->getString("SunDirection");
char* _PREHASH_FromName = LLMessageStringTable::getInstance()->getString("FromName");
-char* _PREHASH_ChangeInventoryItemFlags = LLMessageStringTable::getInstance()->getString("ChangeInventoryItemFlags");
+char* _PREHASH_ChangeInventoryItemFlags = LLMessageStringTable::getInstance()->getString("ChangLLInventoryItemFlags");
char* _PREHASH_Force = LLMessageStringTable::getInstance()->getString("Force");
char* _PREHASH_TransactionBlock = LLMessageStringTable::getInstance()->getString("TransactionBlock");
char* _PREHASH_PowersMask = LLMessageStringTable::getInstance()->getString("PowersMask");
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 0542e73bfd..9d3b5763e8 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -954,7 +954,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
// that will trigger when the complete information is fetched.
uuid_vec_t folders;
folders.push_back(current_outfit_id);
- outfit->fetchDescendents(folders);
+ outfit->fetch(folders);
if(outfit->isEverythingComplete())
{
// everything is already here - call done.
@@ -2070,7 +2070,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
folders.push_back(outfits->mMyOutfitsID);
gInventory.addObserver(outfits);
- outfits->fetchDescendents(folders);
+ outfits->fetch(folders);
if (outfits->isEverythingComplete())
{
outfits->done();
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 1f22ba040d..3d6740f5a1 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -69,7 +69,7 @@ void LLInitialWearablesFetch::processContents()
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
LLFindWearables is_wearable;
- gInventory.collectDescendentsIf(mCompleteFolders.front(), cat_array, wearable_array,
+ gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH, is_wearable);
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
@@ -173,7 +173,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
// Need to fetch the inventory items for ids, then create links to them after they arrive.
LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids);
- fetcher->fetchItems(ids);
+ fetcher->fetch(ids);
// If no items to be fetched, done will never be triggered.
// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
if (fetcher->isEverythingComplete())
@@ -282,13 +282,13 @@ void LLLibraryOutfitsFetch::folderDone()
mLibraryClothingID = cat->getUUID();
}
- mCompleteFolders.clear();
+ mComplete.clear();
// Get the complete information on the items in the inventory.
uuid_vec_t folders;
folders.push_back(mClothingID);
folders.push_back(mLibraryClothingID);
- fetchDescendents(folders);
+ fetch(folders);
if (isEverythingComplete())
{
done();
@@ -336,9 +336,9 @@ void LLLibraryOutfitsFetch::outfitsDone()
mImportedClothingID = cat->getUUID();
}
- mCompleteFolders.clear();
+ mComplete.clear();
- fetchDescendents(folders);
+ fetch(folders);
if (isEverythingComplete())
{
done();
@@ -433,9 +433,9 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
uuid_vec_t folders;
folders.push_back(mImportedClothingID);
- mCompleteFolders.clear();
+ mComplete.clear();
- fetchDescendents(folders);
+ fetch(folders);
if (isEverythingComplete())
{
done();
@@ -463,8 +463,8 @@ void LLLibraryOutfitsFetch::importedFolderDone()
mImportedClothingFolders.push_back(cat->getUUID());
}
- mCompleteFolders.clear();
- fetchDescendents(folders);
+ mComplete.clear();
+ fetch(folders);
if (isEverythingComplete())
{
done();
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 423d9bde69..40b8844731 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -282,14 +282,14 @@ public:
// happen.
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
- gInventory.collectDescendents(mCompleteFolders.front(),
+ gInventory.collectDescendents(mComplete.front(),
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
S32 count = item_array.count();
if(!count)
{
- llwarns << "Nothing fetched in category " << mCompleteFolders.front()
+ llwarns << "Nothing fetched in category " << mComplete.front()
<< llendl;
//dec_busy_count();
gInventory.removeObserver(this);
@@ -307,7 +307,7 @@ public:
gInventory.removeObserver(this);
// do the fetch
- stage2->fetchItems(ids);
+ stage2->fetch(ids);
if(stage2->isEverythingComplete())
{
// everything is already here - call done.
@@ -331,7 +331,7 @@ void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable);
uuid_vec_t folders;
folders.push_back(cat_id);
- stage1->fetchDescendents(folders);
+ stage1->fetch(folders);
if (stage1->isEverythingComplete())
{
stage1->done();
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index c14d234890..f91921f879 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -39,6 +39,7 @@
#include "llcompilequeue.h"
#include "llfloaterbuycurrency.h"
#include "llfilepicker.h"
+#include "llinventorydefines.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llfloaterimportcollada.h"
@@ -144,7 +145,7 @@ void on_new_single_inventory_upload_complete(
item_name,
item_description,
LLSaleInfo::DEFAULT,
- LLInventoryItem::II_FLAGS_NONE,
+ LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
gInventory.updateItem(item);
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index a96981a108..feb8c540ef 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -114,7 +114,7 @@ BOOL LLFloaterScriptQueue::postBuild()
// worked on.
// NOT static, virtual!
void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -305,7 +305,7 @@ LLFloaterCompileQueue::~LLFloaterCompileQueue()
}
void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
- InventoryObjectList* inv)
+ LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
@@ -313,8 +313,8 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
typedef std::multimap<LLUUID, LLPointer<LLInventoryItem> > uuid_item_map;
uuid_item_map asset_item_map;
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -625,14 +625,14 @@ LLFloaterResetQueue::~LLFloaterResetQueue()
}
void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv)
+ LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -677,14 +677,14 @@ LLFloaterRunQueue::~LLFloaterRunQueue()
}
void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv)
+ LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -732,14 +732,14 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
}
void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv)
+ LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 2d061f5d8a..4fde2572af 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -76,13 +76,13 @@ protected:
// This is the callback method for the viewer object currently
// being worked on.
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv) = 0;
+ LLInventoryObject::object_list_t* inv) = 0;
static void onCloseBtn(void* user_data);
@@ -145,7 +145,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv);
+ LLInventoryObject::object_list_t* inv);
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
@@ -192,7 +192,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv);
+ LLInventoryObject::object_list_t* inv);
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -210,7 +210,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv);
+ LLInventoryObject::object_list_t* inv);
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -228,7 +228,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv);
+ LLInventoryObject::object_list_t* inv);
};
#endif // LL_LLCOMPILEQUEUE_H
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index b2f700069f..766fc0723c 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -37,6 +37,7 @@
#include "llfloaterperms.h" // for utilities
#include "llagent.h"
#include "llchat.h"
+#include "llinventorydefines.h"
#include "llviewerwindow.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
@@ -116,7 +117,7 @@ void LLFloaterBulkPermission::doApply()
// worked on.
// NOT static, virtual!
void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -250,12 +251,12 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
}
-void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, InventoryObjectList* inv)
+void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
LLAssetType::EType asstype = (*it)->getType();
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index bffcff7059..80dc88fbb1 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -63,13 +63,13 @@ private:
// This is the callback method for the viewer object currently
// being worked on.
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);
// This is called by inventoryChanged
void handleInventory(LLViewerObject* viewer_obj,
- InventoryObjectList* inv);
+ LLInventoryObject::object_list_t* inv);
void updateInventory(LLViewerObject* object,
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 589f570d96..44c82f1941 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -44,6 +44,7 @@
#include "llinventorymodel.h" // for gInventory
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for get_item_icon
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llnotificationsutil.h"
#include "llselectmgr.h"
@@ -195,7 +196,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
}
void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data)
{
@@ -220,8 +221,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
return;
}
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it )
{
LLInventoryObject* obj = (LLInventoryObject*)(*it);
@@ -246,8 +247,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
// Compute icon for this item
BOOL item_is_multi = FALSE;
- if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED
- || inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
+ || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h
index ab38e082dc..411c8fb00e 100644
--- a/indra/newview/llfloaterbuy.h
+++ b/indra/newview/llfloaterbuy.h
@@ -65,7 +65,7 @@ protected:
void requestObjectInventories();
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data);
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 0daef27af2..1d989ad0fd 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -44,6 +44,7 @@
#include "llagent.h" // for agent id
#include "llcheckboxctrl.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h" // for gInventory
#include "llfloaterreg.h"
@@ -142,7 +143,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data)
{
@@ -176,8 +177,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
LLInventoryType::EType inv_type;
S32 wearable_count = 0;
- InventoryObjectList::const_iterator it = inv->begin();
- InventoryObjectList::const_iterator end = inv->end();
+ LLInventoryObject::object_list_t::const_iterator it = inv->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it )
{
@@ -215,7 +216,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
LLSD row;
BOOL item_is_multi = FALSE;
- if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED )
+ if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED )
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h
index 8045a46c9f..ab161adfea 100644
--- a/indra/newview/llfloaterbuycontents.h
+++ b/indra/newview/llfloaterbuycontents.h
@@ -59,7 +59,7 @@ public:
protected:
void requestObjectInventories();
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
- InventoryObjectList* inv,
+ LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data);
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 0aca12bc5e..8ee8d13a9c 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -148,7 +148,7 @@ void LLFloaterGesture::done()
if (!unloaded_folders.empty())
{
LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL;
- fetchDescendents(unloaded_folders);
+ fetch(unloaded_folders);
}
else
{
@@ -202,7 +202,7 @@ BOOL LLFloaterGesture::postBuild()
folders.push_back(mGestureFolderID);
//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details.
gInventory.addObserver(this);
- fetchDescendents(folders);
+ fetch(folders);
if (mGestureList)
{
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index ec50ed596c..71bfae316a 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -121,12 +121,12 @@ void LLFloaterOpenObject::refresh()
{
// this folder is coming from an object, as there is only one folder in an object, the root,
// we need to collect the entire contents and handle them as a group
- InventoryObjectList inventory_objects;
+ LLInventoryObject::object_list_t inventory_objects;
object->getInventoryContents(inventory_objects);
if (!inventory_objects.empty())
{
- for (InventoryObjectList::iterator it = inventory_objects.begin();
+ for (LLInventoryObject::object_list_t::iterator it = inventory_objects.begin();
it != inventory_objects.end();
++it)
{
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 5c0593ad29..bb9d151cd2 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -38,12 +38,12 @@
#include "llcachename.h"
#include "lldbstrings.h"
#include "llfloaterreg.h"
-#include "llinventory.h"
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llavataractions.h"
+#include "llinventorydefines.h"
#include "llinventoryobserver.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
@@ -380,9 +380,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = item->getFlags();
- slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
- overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
- overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
+ slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
+ overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
+ overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
std::string perm_string;
@@ -693,7 +693,7 @@ void LLFloaterProperties::onCommitPermissions()
if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
// If everyone permissions have changed (and this is an object)
// then set the overwrite everyone permissions flag so they
@@ -701,7 +701,7 @@ void LLFloaterProperties::onCommitPermissions()
if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
// If group permissions have changed (and this is an object)
// then set the overwrite group permissions flag so they
@@ -709,7 +709,7 @@ void LLFloaterProperties::onCommitPermissions()
if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
new_item->setFlags(flags);
if(mObjectID.isNull())
@@ -821,7 +821,7 @@ void LLFloaterProperties::updateSaleInfo()
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = new_item->getFlags();
- flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
new_item->setFlags(flags);
}
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index a848128d67..6f069cca17 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -413,7 +413,7 @@ void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_i
uuid_vec_t folders;
folders.push_back(folder_id);
- fetch->fetchDescendents(folders);
+ fetch->fetch(folders);
if(fetch->isEverythingComplete())
{
// everything is already here - call done.
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index c13ebba923..a4342a4bc9 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -1033,7 +1033,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
// Watch this item and set gesture name when item exists in inventory
uuid_vec_t ids;
ids.push_back(item_id);
- self.fetchItems(ids);
+ self.fetch(ids);
}
self.mActive[item_id] = gesture;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 614d73205c..ddd42492a0 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -50,6 +50,7 @@
#include "llimfloater.h"
#include "llimview.h"
#include "llinventoryclipboard.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
@@ -141,11 +142,10 @@ std::string ICON_NAME[ICON_NAME_COUNT] =
"Inv_Animation",
"Inv_Gesture",
+ "Inv_Mesh",
"Inv_LinkItem",
- "Inv_LinkFolder",
-
- "Inv_Mesh"
+ "Inv_LinkFolder"
};
// +=================================================+
@@ -1868,7 +1868,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
// this folder is coming from an object, as there is only one folder in an object, the root,
// we need to collect the entire contents and handle them as a group
- InventoryObjectList inventory_objects;
+ LLInventoryObject::object_list_t inventory_objects;
object->getInventoryContents(inventory_objects);
if (inventory_objects.empty())
@@ -1882,8 +1882,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
// coming from a task. Need to figure out if the person can
// move/copy this item.
- InventoryObjectList::iterator it = inventory_objects.begin();
- InventoryObjectList::iterator end = inventory_objects.end();
+ LLInventoryObject::object_list_t::iterator it = inventory_objects.begin();
+ LLInventoryObject::object_list_t::iterator end = inventory_objects.end();
for ( ; it != end; ++it)
{
// coming from a task. Need to figure out if the person can
@@ -1913,7 +1913,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
if(drop && accept)
{
it = inventory_objects.begin();
- InventoryObjectList::iterator first_it = inventory_objects.begin();
+ LLInventoryObject::object_list_t::iterator first_it = inventory_objects.begin();
LLMoveInv* move_inv = new LLMoveInv;
move_inv->mObjectID = object_id;
move_inv->mCategoryID = category_id;
@@ -1983,7 +1983,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
{
// Avoid passing a NULL-ref as mCompleteFolders.front() down to
// gInventory.collectDescendents()
- if( mCompleteFolders.empty() )
+ if( mComplete.empty() )
{
llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
dec_busy_count();
@@ -1997,7 +1997,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
// happen.
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
- gInventory.collectDescendents(mCompleteFolders.front(),
+ gInventory.collectDescendents(mComplete.front(),
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
@@ -2016,7 +2016,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
#endif
LLRightClickInventoryFetchObserver* outfit;
- outfit = new LLRightClickInventoryFetchObserver(mCompleteFolders.front(), mCopyItems);
+ outfit = new LLRightClickInventoryFetchObserver(mComplete.front(), mCopyItems);
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
@@ -2035,7 +2035,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
inc_busy_count();
// do the fetch
- outfit->fetchItems(ids);
+ outfit->fetch(ids);
outfit->done(); //Not interested in waiting and this will be right 99% of the time.
//Uncomment the following code for laggy Inventory UI.
/* if(outfit->isEverythingComplete())
@@ -2735,7 +2735,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
folders.push_back(category->getUUID());
}
- fetch->fetchDescendents(folders);
+ fetch->fetch(folders);
inc_busy_count();
if(fetch->isEverythingComplete())
{
@@ -2960,7 +2960,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
{
if (cat_and_wear && cat_and_wear->mWear)
{
- InventoryObjectList inventory_objects;
+ LLInventoryObject::object_list_t inventory_objects;
object->getInventoryContents(inventory_objects);
int contents_count = inventory_objects.size()-1; //subtract one for containing folder
@@ -3387,7 +3387,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory,
LLItemBridge(inventory, root, uuid)
{
mVisited = FALSE;
- if (flags & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
+ if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
mVisited = TRUE;
}
@@ -4028,7 +4028,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory,
{
mAttachPt = (flags & 0xff); // low bye of inventory flags
- mIsMultiObject = ( flags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
+ mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
}
LLUIImagePtr LLObjectBridge::getIcon() const
@@ -4978,7 +4978,7 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const
if (LLViewerInventoryItem *item = getItem())
{
U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags
- bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags();
+ bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags();
return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi);
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 56de7cc771..449b1b5b4d 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -41,6 +41,7 @@
#include "llagentwearables.h"
#include "llcallingcard.h"
#include "llfloaterreg.h"
+#include "llinventorydefines.h"
#include "llsdserialize.h"
#include "llfiltereditor.h"
#include "llspinctrl.h"
@@ -101,30 +102,29 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- // not allowed
- break;
-
- case LLAssetType::AT_OBJECT:
- if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
- {
- allowed = true;
- }
- break;
-
- case LLAssetType::AT_BODYPART:
- case LLAssetType::AT_CLOTHING:
- if(!gAgentWearables.isWearingItem(item->getUUID()))
- {
+ case LLAssetType::AT_CALLINGCARD:
+ // not allowed
+ break;
+
+ case LLAssetType::AT_OBJECT:
+ if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
+ {
+ allowed = true;
+ }
+ break;
+
+ case LLAssetType::AT_BODYPART:
+ case LLAssetType::AT_CLOTHING:
+ if(!gAgentWearables.isWearingItem(item->getUUID()))
+ {
+ allowed = true;
+ }
+ break;
+ default:
allowed = true;
- }
- break;
-
- default:
- allowed = true;
- break;
+ break;
}
-
+
return allowed;
}
@@ -409,7 +409,7 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder)
static void assign_clothing_bodypart_icon(EInventoryIcon &idx, U32 attachment_point)
{
- const EWearableType wearable_type = EWearableType(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point);
+ const EWearableType wearable_type = EWearableType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point);
switch(wearable_type)
{
case WT_SHAPE:
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index b6202c6a8c..e63da1ebb9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1326,7 +1326,7 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
//{
// known_descendents += items->count();
//}
- return cat->fetchDescendents();
+ return cat->fetch();
}
void LLInventoryModel::cache(
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 72e5c0dd75..cfbc2c3e05 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -257,7 +257,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
{
// category exists but has no children yet, fetch the descendants
// for now, just request every time and rely on retry timer to throttle
- if (cat->fetchDescendents())
+ if (cat->fetch())
{
mFetchTimer.reset();
mTimelyFetchPending = TRUE;
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 128f16ecf5..83e1bbd5a0 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -223,8 +223,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
}
}
-void LLInventoryFetchObserver::fetchItems(
- const uuid_vec_t& ids)
+void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids)
{
LLUUID owner_id;
LLSD items_llsd;
@@ -266,30 +265,29 @@ void LLInventoryFetchObserver::fetchItems(
// virtual
void LLInventoryFetchDescendentsObserver::changed(U32 mask)
{
- for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
+ for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
{
LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
if(!cat)
{
- it = mIncompleteFolders.erase(it);
+ it = mIncomplete.erase(it);
continue;
}
if(isComplete(cat))
{
- mCompleteFolders.push_back(*it);
- it = mIncompleteFolders.erase(it);
+ mComplete.push_back(*it);
+ it = mIncomplete.erase(it);
continue;
}
++it;
}
- if(mIncompleteFolders.empty())
+ if(mIncomplete.empty())
{
done();
}
}
-void LLInventoryFetchDescendentsObserver::fetchDescendents(
- const uuid_vec_t& ids)
+void LLInventoryFetchDescendentsObserver::fetch(const uuid_vec_t& ids)
{
for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
@@ -297,19 +295,19 @@ void LLInventoryFetchDescendentsObserver::fetchDescendents(
if(!cat) continue;
if(!isComplete(cat))
{
- cat->fetchDescendents(); //blindly fetch it without seeing if anything else is fetching it.
- mIncompleteFolders.push_back(*it); //Add to list of things being downloaded for this observer.
+ cat->fetch(); //blindly fetch it without seeing if anything else is fetching it.
+ mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer.
}
else
{
- mCompleteFolders.push_back(*it);
+ mComplete.push_back(*it);
}
}
}
bool LLInventoryFetchDescendentsObserver::isEverythingComplete() const
{
- return mIncompleteFolders.empty();
+ return mIncomplete.empty();
}
bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* cat)
@@ -413,7 +411,7 @@ void LLInventoryFetchComboObserver::fetch(
if(!cat) continue;
if(!gInventory.isCategoryComplete(*fit))
{
- cat->fetchDescendents();
+ cat->fetch();
lldebugs << "fetching folder " << *fit <<llendl;
mIncompleteFolders.push_back(*fit);
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 14948f4e49..ba70552ebc 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -42,8 +42,8 @@ class LLViewerInventoryCategory;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryObserver
//
-// This class is designed to be a simple abstract base class which can
-// relay messages when the inventory changes.
+// A simple abstract base class that can relay messages when the inventory
+// changes.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryObserver
@@ -54,17 +54,17 @@ public:
// chaged() to see if the observer is interested in the change.
enum
{
- NONE = 0,
- LABEL = 1, // name changed
- INTERNAL = 2, // internal change (e.g. asset uuid different)
- ADD = 4, // something added
- REMOVE = 8, // something deleted
- STRUCTURE = 16, // structural change (eg item or folder moved)
- CALLING_CARD = 32, // (eg online, grant status, cancel)
- GESTURE = 64,
- REBUILD = 128, // item UI changed (eg item type different)
- SORT = 256, // folder needs to be resorted.
- ALL = 0xffffffff
+ NONE = 0,
+ LABEL = 1, // Name changed
+ INTERNAL = 2, // Internal change (e.g. asset uuid different)
+ ADD = 4, // Something added
+ REMOVE = 8, // Something deleted
+ STRUCTURE = 16, // Structural change (e.g. item or folder moved)
+ CALLING_CARD = 32, // Calling card change (e.g. online, grant status, cancel)
+ GESTURE = 64,
+ REBUILD = 128, // Item UI changed (e.g. item type different)
+ SORT = 256, // Folder needs to be resorted.
+ ALL = 0xffffffff
};
LLInventoryObserver();
virtual ~LLInventoryObserver();
@@ -75,11 +75,10 @@ public:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryCompletionObserver
//
-// Class which can be used as a base class for doing something when
-// when all observed items are locally complete. This class implements
-// the changed() method of LLInventoryObserver and declares a new
-// method named done() which is called when all watched items have
-// complete information in the inventory model.
+// Base class for doing something when when all observed items are locally
+// complete. Implements the changed() method of LLInventoryObserver
+// and declares a new method named done() which is called when all watched items
+// have complete information in the inventory model.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryCompletionObserver : public LLInventoryObserver
@@ -113,7 +112,7 @@ public:
virtual void changed(U32 mask);
bool isEverythingComplete() const;
- void fetchItems(const uuid_vec_t& ids);
+ void fetch(const uuid_vec_t& ids);
virtual void done() {};
protected:
@@ -135,14 +134,14 @@ public:
LLInventoryFetchDescendentsObserver() {}
virtual void changed(U32 mask);
- void fetchDescendents(const uuid_vec_t& ids);
+ void fetch(const uuid_vec_t& ids);
bool isEverythingComplete() const;
virtual void done() = 0;
protected:
bool isComplete(LLViewerInventoryCategory* cat);
- uuid_vec_t mIncompleteFolders;
- uuid_vec_t mCompleteFolders;
+ uuid_vec_t mIncomplete;
+ uuid_vec_t mComplete;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 2a7d097f94..f4c0a842e7 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -40,6 +40,7 @@
#include "llerror.h"
#include "llfloaterreg.h"
#include "llfontgl.h"
+#include "llinventorydefines.h"
#include "llmaterialtable.h"
#include "llpermissionsflags.h"
#include "llrect.h"
@@ -180,7 +181,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
LLTrans::getString("PanelContentsNewScript"),
desc,
LLSaleInfo::DEFAULT,
- LLViewerInventoryItem::II_FLAGS_NONE,
+ LLInventoryItemFlags::II_FLAGS_NONE,
time_corrected());
object->saveScript(new_item, TRUE, true);
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index c2a6828837..e9cde59985 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -38,6 +38,7 @@
#include "llinventory.h"
#include "llviewerinventory.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llfloaterinventory.h"
@@ -330,7 +331,7 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
mInventoryItem = inv_item;
BOOL item_is_multi = FALSE;
- if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
+ if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
};
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 76dee78f3d..47a27c8a85 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -50,6 +50,7 @@
#include "llfloaterbuycurrency.h"
#include "llfloaterreg.h"
#include "llinventorybridge.h"
+#include "llinventorydefines.h"
#include "llinventoryfilter.h"
#include "llinventoryfunctions.h"
#include "llpreviewanim.h"
@@ -344,7 +345,7 @@ time_t LLTaskInvFVBridge::getCreationDate() const
LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
- if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
+ if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -1209,7 +1210,7 @@ LLTaskObjectBridge::LLTaskObjectBridge(
LLUIImagePtr LLTaskObjectBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
- if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
+ if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -1732,7 +1733,7 @@ void LLPanelObjectInventory::reset()
}
void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* data)
{
@@ -1749,7 +1750,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
// refresh any properties floaters that are hanging around.
if(inventory)
{
- for (InventoryObjectList::const_iterator iter = inventory->begin();
+ for (LLInventoryObject::object_list_t::const_iterator iter = inventory->begin();
iter != inventory->end(); )
{
LLInventoryObject* item = *iter++;
@@ -1782,7 +1783,7 @@ void LLPanelObjectInventory::updateInventory()
if (objectp)
{
LLInventoryObject* inventory_root = objectp->getInventoryRoot();
- InventoryObjectList contents;
+ LLInventoryObject::object_list_t contents;
objectp->getInventoryContents(contents);
if (inventory_root)
{
@@ -1836,7 +1837,7 @@ void LLPanelObjectInventory::updateInventory()
// leads to an N^2 based on the category count. This could be greatly
// speeded with an efficient multimap implementation, but we don't
// have that in our current arsenal.
-void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents)
+void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents)
{
if (!inventory_root)
{
@@ -1865,7 +1866,7 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
typedef std::pair<LLInventoryObject*, LLFolderViewFolder*> obj_folder_pair;
-void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* inventory,
+void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory,
LLInventoryObject* parent,
LLFolderViewFolder* folder)
{
@@ -1874,8 +1875,8 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento
LLTaskInvFVBridge* bridge;
LLFolderViewItem* view;
- InventoryObjectList::iterator it = inventory->begin();
- InventoryObjectList::iterator end = inventory->end();
+ LLInventoryObject::object_list_t::iterator it = inventory->begin();
+ LLInventoryObject::object_list_t::iterator end = inventory->end();
for( ; it != end; ++it)
{
LLInventoryObject* obj = *it;
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index bc339ece35..d015929841 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -82,12 +82,12 @@ public:
protected:
void reset();
/*virtual*/ void inventoryChanged(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* user_data);
void updateInventory();
- void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents);
- void createViewsForCategory(InventoryObjectList* inventory,
+ void createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents);
+ void createViewsForCategory(LLInventoryObject::object_list_t* inventory,
LLInventoryObject* parent,
LLFolderViewFolder* folder);
void clearContents();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 2b25c544e3..ccd1bfe224 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -484,7 +484,7 @@ void LLPanelOutfitEdit::updateLookInfo()
uuid_vec_t folders;
folders.push_back(mLookID);
- mFetchLook->fetchDescendents(folders);
+ mFetchLook->fetch(folders);
if (mFetchLook->isEverythingComplete())
{
mFetchLook->done();
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index d5ec3a36c3..d0db77dcbe 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -36,7 +36,7 @@
#include "llpreview.h"
#include "lllineeditor.h"
-#include "llinventory.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "llresmgr.h"
#include "lltextbox.h"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 11cde47744..fce90e4c44 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -42,7 +42,9 @@
#include "llstring.h"
#include "lldir.h"
#include "llfloaterreg.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llmultigesture.h"
#include "llnotificationsutil.h"
@@ -58,7 +60,6 @@
#include "lldelayedgestureerror.h"
#include "llfloatergesture.h" // for some label constants
#include "llgesturemgr.h"
-#include "llinventorymodel.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llradiogroup.h"
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index bfd9a840f2..75702dc8e5 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -42,6 +42,7 @@
#include "llviewerwindow.h"
#include "llbutton.h"
#include "llfloaterreg.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 4167408fc3..6b0e524f8c 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -41,6 +41,7 @@
#include "llcombobox.h"
#include "lldir.h"
#include "llfloaterreg.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
@@ -1578,7 +1579,7 @@ void LLLiveLSLEditor::loadAsset()
DEFAULT_SCRIPT_NAME,
DEFAULT_SCRIPT_DESC,
LLSaleInfo::DEFAULT,
- LLInventoryItem::II_FLAGS_NONE,
+ LLInventoryItemFlags::II_FLAGS_NONE,
time_corrected());
mAssetStatus = PREVIEW_ASSET_LOADED;
}
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index f1483bd404..511196809a 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -391,7 +391,7 @@ void LLSidepanelAppearance::fetchInventory()
}
LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this);
- fetch_worn->fetchItems(ids);
+ fetch_worn->fetch(ids);
// If no items to be fetched, done will never be triggered.
// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
if (fetch_worn->isEverythingComplete())
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 0275736f6d..9b073943b4 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -40,6 +40,7 @@
#include "llbutton.h"
#include "llfloaterreg.h"
#include "llgroupactions.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "lllineeditor.h"
@@ -439,9 +440,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = item->getFlags();
- slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
- overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
- overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
+ slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
+ overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
+ overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
std::string perm_string;
@@ -752,7 +753,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
// If everyone permissions have changed (and this is an object)
// then set the overwrite everyone permissions flag so they
@@ -760,7 +761,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
// If group permissions have changed (and this is an object)
// then set the overwrite group permissions flag so they
@@ -768,7 +769,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
- flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
new_item->setFlags(flags);
if(mObjectID.isNull())
@@ -880,7 +881,7 @@ void LLSidepanelItemInfo::updateSaleInfo()
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = new_item->getFlags();
- flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE;
+ flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
new_item->setFlags(flags);
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 4f1bcde302..d7c8b5fcd4 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1771,7 +1771,7 @@ bool idle_startup()
}
}
// no need to add gesture to inventory observer, it's already made in constructor
- LLGestureMgr::instance().fetchItems(item_ids);
+ LLGestureMgr::instance().fetch(item_ids);
}
}
gDisplaySwapBuffers = TRUE;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index b63728b5e2..798de3ab8c 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -50,6 +50,7 @@
#include "llhudeffecttrail.h"
#include "llimview.h"
#include "llinventorybridge.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llmutelist.h"
#include "llpreviewnotecard.h"
@@ -305,8 +306,8 @@ void LLCategoryDropDescendentsObserver::done()
{
gInventory.removeObserver(this);
- uuid_vec_t::iterator it = mCompleteFolders.begin();
- uuid_vec_t::iterator end = mCompleteFolders.end();
+ uuid_vec_t::iterator it = mComplete.begin();
+ uuid_vec_t::iterator end = mComplete.end();
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
for(; it != end; ++it)
@@ -331,7 +332,7 @@ void LLCategoryDropDescendentsObserver::done()
std::copy(unique_ids.begin(), unique_ids.end(), copier);
LLCategoryDropObserver* dropper;
dropper = new LLCategoryDropObserver(mObjectID, mSource);
- dropper->fetchItems(ids);
+ dropper->fetch(ids);
if (dropper->isEverythingComplete())
{
dropper->done();
@@ -2648,7 +2649,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
ids.push_back(item->getUUID());
}
LLCategoryDropObserver* dropper = new LLCategoryDropObserver(obj->getID(), mSource);
- dropper->fetchItems(ids);
+ dropper->fetch(ids);
if(dropper->isEverythingComplete())
{
dropper->done();
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 9a69adae31..cc074287c4 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -39,6 +39,7 @@
#include "llgl.h"
#include "llrender.h"
#include "llinventory.h"
+#include "llinventorydefines.h"
#include "llpointer.h"
#include "llstring.h"
#include "lluuid.h"
@@ -742,10 +743,10 @@ void LLTracker::setLandmarkVisited()
LLInventoryItem* i = gInventory.getItem( mTrackedLandmarkItemID );
LLViewerInventoryItem* item = (LLViewerInventoryItem*)i;
if ( item
- && !(item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED))
+ && !(item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED))
{
U32 flags = item->getFlags();
- flags |= LLInventoryItem::II_FLAGS_LANDMARK_VISITED;
+ flags |= LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED;
item->setFlags(flags);
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ChangeInventoryItemFlags");
@@ -798,7 +799,7 @@ void LLTracker::cacheLandmarkPosition()
mLandmarkHasBeenVisited = FALSE;
LLInventoryItem* item = gInventory.getItem(mTrackedLandmarkItemID);
if ( item
- && item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
+ && item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
mLandmarkHasBeenVisited = TRUE;
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index db0d57c10c..444d397146 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -43,6 +43,7 @@
#include "llfolderview.h"
#include "llviewercontrol.h"
#include "llconsole.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
@@ -518,7 +519,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
gAgent.sendReliableMessage();
}
-bool LLViewerInventoryCategory::fetchDescendents()
+bool LLViewerInventoryCategory::fetch()
{
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
@@ -1481,7 +1482,7 @@ EWearableType LLViewerInventoryItem::getWearableType() const
llwarns << "item is not a wearable" << llendl;
return WT_INVALID;
}
- return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
+ return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 3577bd8791..2db88c2ff8 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -212,7 +212,7 @@ public:
void setVersion(S32 version) { mVersion = version; }
// Returns true if a fetch was issued.
- bool fetchDescendents();
+ bool fetch();
// used to help make cacheing more robust - for example, if
// someone is getting 4 packets but logs out after 3. the viewer
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index ec401f16d7..47b563643b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -73,6 +73,7 @@
#include "llhudmanager.h"
#include "llimview.h"
#include "llinventorybridge.h"
+#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llpanellogin.h"
#include "llpanelblockedlist.h"
@@ -3862,15 +3863,15 @@ BOOL enable_deed_object_to_group(void*)
* No longer able to support viewer side manipulations in this way
*
void god_force_inv_owner_permissive(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void*)
{
typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
item_array_t items;
- InventoryObjectList::const_iterator inv_it = inventory->begin();
- InventoryObjectList::const_iterator inv_end = inventory->end();
+ LLInventoryObject::object_list_t::const_iterator inv_it = inventory->begin();
+ LLInventoryObject::object_list_t::const_iterator inv_end = inventory->end();
for ( ; inv_it != inv_end; ++inv_it)
{
if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY))
@@ -6156,7 +6157,7 @@ class LLAttachmentEnableDrop : public view_listener_t
items.push_back((*attachment_iter)->getItemID());
- wornItemFetched->fetchItems(items);
+ wornItemFetched->fetch(items);
gInventory.addObserver(wornItemFetched);
}
}
@@ -6970,7 +6971,7 @@ void handle_grab_texture(void* data)
name,
LLStringUtil::null,
LLSaleInfo::DEFAULT,
- LLInventoryItem::II_FLAGS_NONE,
+ LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
item->updateServer(TRUE);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 07a8574d46..f7c085e3a6 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -41,6 +41,7 @@
#include "lleventtimer.h"
#include "llfloaterreg.h"
#include "llfollowcamparams.h"
+#include "llinventorydefines.h"
#include "llregionhandle.h"
#include "llsdserialize.h"
#include "llteleportflags.h"
@@ -1206,7 +1207,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
uuid_vec_t items;
items.push_back(mObjectID);
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string);
- open_agent_offer->fetchItems(items);
+ open_agent_offer->fetch(items);
if(catp || (itemp && itemp->isComplete()))
{
open_agent_offer->done();
@@ -1604,7 +1605,7 @@ void inventory_offer_handler(LLOfferInfo* info)
uuid_vec_t items;
items.push_back(info->mObjectID);
LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
- fetch_item->fetchItems(items);
+ fetch_item->fetch(items);
if(fetch_item->isEverythingComplete())
{
fetch_item->done();
@@ -2123,7 +2124,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
uuid_vec_t items;
items.push_back(info->mObjectID);
LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
- fetch_item->fetchItems(items);
+ fetch_item->fetch(items);
delete fetch_item;
// Same as closing window
@@ -2854,8 +2855,8 @@ public:
LLInventoryModel::cat_array_t land_cats;
LLInventoryModel::item_array_t land_items;
- uuid_vec_t::iterator it = mCompleteFolders.begin();
- uuid_vec_t::iterator end = mCompleteFolders.end();
+ uuid_vec_t::iterator it = mComplete.begin();
+ uuid_vec_t::iterator end = mComplete.end();
for(; it != end; ++it)
{
gInventory.collectDescendentsIf(
@@ -2926,7 +2927,7 @@ BOOL LLPostTeleportNotifiers::tick()
if(!folders.empty())
{
LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
- fetcher->fetchDescendents(folders);
+ fetcher->fetch(folders);
if(fetcher->isEverythingComplete())
{
fetcher->done();
@@ -5229,7 +5230,7 @@ void process_derez_container(LLMessageSystem *msg, void**)
}
void container_inventory_arrived(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* data)
{
@@ -5249,8 +5250,8 @@ void container_inventory_arrived(LLViewerObject* object,
LLFolderType::FT_NONE,
LLTrans::getString("AcquiredItems"));
- InventoryObjectList::const_iterator it = inventory->begin();
- InventoryObjectList::const_iterator end = inventory->end();
+ LLInventoryObject::object_list_t::const_iterator it = inventory->begin();
+ LLInventoryObject::object_list_t::const_iterator end = inventory->end();
for ( ; it != end; ++it)
{
if ((*it)->getType() != LLAssetType::AT_CATEGORY)
@@ -5286,7 +5287,7 @@ void container_inventory_arrived(LLViewerObject* object,
{
// we're going to get one fake root category as well as the
// one actual object
- InventoryObjectList::iterator it = inventory->begin();
+ LLInventoryObject::object_list_t::iterator it = inventory->begin();
if ((*it)->getType() == LLAssetType::AT_CATEGORY)
{
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 0ba4ac0c8d..4015cca77b 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -129,7 +129,7 @@ void process_frozen_message(LLMessageSystem* msg, void**);
void process_derez_container(LLMessageSystem *msg, void**);
void container_inventory_arrived(LLViewerObject* object,
- std::list<LLPointer<LLInventoryObject> >* inventory, //InventoryObjectList
+ std::list<LLPointer<LLInventoryObject> >* inventory, //LLInventoryObject::object_list_t
S32 serial_num,
void* data);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 318adfb302..0d8bfa8261 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -46,6 +46,7 @@
#include "llfontgl.h"
#include "llframetimer.h"
#include "llinventory.h"
+#include "llinventorydefines.h"
#include "llmaterialtable.h"
#include "llmutelist.h"
#include "llnamevalue.h"
@@ -2179,8 +2180,8 @@ void LLViewerObject::deleteInventoryItem(const LLUUID& item_id)
{
if(mInventory)
{
- InventoryObjectList::iterator it = mInventory->begin();
- InventoryObjectList::iterator end = mInventory->end();
+ LLInventoryObject::object_list_t::iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it )
{
if((*it)->getUUID() == item_id)
@@ -2490,7 +2491,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
}
else
{
- object->mInventory = new InventoryObjectList();
+ object->mInventory = new LLInventoryObject::object_list_t();
}
LLPointer<LLInventoryObject> obj;
obj = new LLInventoryObject(object->mID, LLUUID::null,
@@ -2546,7 +2547,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
}
else
{
- mInventory = new InventoryObjectList;
+ mInventory = new LLInventoryObject::object_list_t;
}
while(ifs.good())
{
@@ -2679,8 +2680,8 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id)
LLInventoryObject* rv = NULL;
if(mInventory)
{
- InventoryObjectList::iterator it = mInventory->begin();
- InventoryObjectList::iterator end = mInventory->end();
+ LLInventoryObject::object_list_t::iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::iterator end = mInventory->end();
for ( ; it != end; ++it)
{
if((*it)->getUUID() == item_id)
@@ -2693,12 +2694,12 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id)
return rv;
}
-void LLViewerObject::getInventoryContents(InventoryObjectList& objects)
+void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& objects)
{
if(mInventory)
{
- InventoryObjectList::iterator it = mInventory->begin();
- InventoryObjectList::iterator end = mInventory->end();
+ LLInventoryObject::object_list_t::iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it)
{
if ((*it)->getType() != LLAssetType::AT_CATEGORY)
@@ -2728,8 +2729,8 @@ LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& ass
{
LLViewerInventoryItem* item = NULL;
- InventoryObjectList::iterator it = mInventory->begin();
- InventoryObjectList::iterator end = mInventory->end();
+ LLInventoryObject::object_list_t::iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it)
{
LLInventoryObject* obj = *it;
@@ -4091,8 +4092,8 @@ S32 LLViewerObject::countInventoryContents(LLAssetType::EType type)
S32 count = 0;
if( mInventory )
{
- InventoryObjectList::const_iterator it = mInventory->begin();
- InventoryObjectList::const_iterator end = mInventory->end();
+ LLInventoryObject::object_list_t::const_iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::const_iterator end = mInventory->end();
for( ; it != end ; ++it )
{
if( (*it)->getType() == type )
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 8b542af773..594d7a0827 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -88,7 +88,7 @@ typedef enum e_object_update_type
// callback typedef for inventory
typedef void (*inventory_callback)(LLViewerObject*,
- InventoryObjectList*,
+ LLInventoryObject::object_list_t*,
S32 serial_num,
void*);
@@ -410,7 +410,7 @@ public:
void updateInventory(LLViewerInventoryItem* item, U8 key, bool is_new);
void updateInventoryLocal(LLInventoryItem* item, U8 key); // Update without messaging.
LLInventoryObject* getInventoryObject(const LLUUID& item_id);
- void getInventoryContents(InventoryObjectList& objects);
+ void getInventoryContents(LLInventoryObject::object_list_t& objects);
LLInventoryObject* getInventoryRoot();
LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id);
S16 getInventorySerial() const { return mInventorySerialNum; }
@@ -636,7 +636,7 @@ protected:
F32 mPixelArea; // Apparent area in pixels
// This is the object's inventory from the viewer's perspective.
- InventoryObjectList* mInventory;
+ LLInventoryObject::object_list_t* mInventory;
class LLInventoryCallbackInfo
{
public:
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index e3bc664473..d35be8e1bf 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -40,8 +40,8 @@
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
-#include "llinventory.h"
#include "llinventorybridge.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "lllandmark.h"
#include "lllandmarkactions.h"
@@ -525,7 +525,7 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const
case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break;
case LLAssetType::AT_CLOTHING: img_name = "Inv_Clothing"; break;
case LLAssetType::AT_OBJECT:
- img_name = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ?
+ img_name = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ?
"Inv_Object_Multi" : "Inv_Object";
break;
case LLAssetType::AT_CALLINGCARD: img_name = "Inv_CallingCard"; break;
diff --git a/indra/newview/llvoinventorylistener.h b/indra/newview/llvoinventorylistener.h
index 335e867fca..1531e6e339 100644
--- a/indra/newview/llvoinventorylistener.h
+++ b/indra/newview/llvoinventorylistener.h
@@ -42,7 +42,7 @@ class LLVOInventoryListener
{
public:
virtual void inventoryChanged(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* user_data) = 0;