summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-06-15 09:44:27 -0700
committerRichard Linden <none@none>2012-06-15 09:44:27 -0700
commit9940ca5ae7698e89c0587733f7ab922027c8ddcc (patch)
treefbcff53be4b3bc7823dbe30df0446ebe8f872044 /indra/llinventory
parent8a2b6f7d2e56625c59c3e40d4a23942a91b824a1 (diff)
CHUI-101 WIP Make LLFolderView general purpose
llfolderview refactornig
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventory.cpp31
-rw-r--r--indra/llinventory/llinventory.h5
2 files changed, 20 insertions, 16 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index fbf23bc3f0..784e20ad46 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -275,6 +275,18 @@ void LLInventoryObject::correctInventoryName(std::string& name)
LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN);
}
+time_t LLInventoryObject::getCreationDate() const
+{
+ return mCreationDate;
+}
+
+void LLInventoryObject::setCreationDate(time_t creation_date_utc)
+{
+ mCreationDate = creation_date_utc;
+}
+
+
+
///----------------------------------------------------------------------------
/// Class LLInventoryItem
@@ -297,9 +309,10 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
mDescription(desc),
mSaleInfo(sale_info),
mInventoryType(inv_type),
- mFlags(flags),
- mCreationDate(creation_date_utc)
+ mFlags(flags)
{
+ mCreationDate = creation_date_utc;
+
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
LLStringUtil::replaceChar(mDescription, '|', ' ');
mPermissions.initMasks(inv_type);
@@ -312,9 +325,9 @@ LLInventoryItem::LLInventoryItem() :
mDescription(),
mSaleInfo(),
mInventoryType(LLInventoryType::IT_NONE),
- mFlags(0),
- mCreationDate(0)
+ mFlags(0)
{
+ mCreationDate = 0;
}
LLInventoryItem::LLInventoryItem(const LLInventoryItem* other) :
@@ -379,11 +392,6 @@ const std::string& LLInventoryItem::getDescription() const
return mDescription;
}
-time_t LLInventoryItem::getCreationDate() const
-{
- return mCreationDate;
-}
-
U32 LLInventoryItem::getCRC32() const
{
// *FIX: Not a real crc - more of a checksum.
@@ -440,11 +448,6 @@ void LLInventoryItem::setFlags(U32 flags)
mFlags = flags;
}
-void LLInventoryItem::setCreationDate(time_t creation_date_utc)
-{
- mCreationDate = creation_date_utc;
-}
-
// Currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target.
void LLInventoryItem::setCreator(const LLUUID& creator)
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index a5cfe59bda..dc9a09e9d6 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -75,6 +75,7 @@ public:
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
BOOL getIsLinkType() const;
+ virtual time_t getCreationDate() const;
//--------------------------------------------------------------------
// Mutators
@@ -85,6 +86,7 @@ public:
virtual void rename(const std::string& new_name);
void setParent(const LLUUID& new_parent);
void setType(LLAssetType::EType type);
+ virtual void setCreationDate(time_t creation_date_utc); // only stored for items
private:
// in place correction for inventory name string
@@ -113,6 +115,7 @@ protected:
LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
LLAssetType::EType mType;
std::string mName;
+ time_t mCreationDate; // seconds from 1/1/1970, UTC
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -178,7 +181,6 @@ public:
void setPermissions(const LLPermissions& perm);
void setInventoryType(LLInventoryType::EType inv_type);
void setFlags(U32 flags);
- void setCreationDate(time_t creation_date_utc);
void setCreator(const LLUUID& creator); // only used for calling cards
// Check for changes in permissions masks and sale info
@@ -224,7 +226,6 @@ protected:
LLSaleInfo mSaleInfo;
LLInventoryType::EType mInventoryType;
U32 mFlags;
- time_t mCreationDate; // seconds from 1/1/1970, UTC
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~