From d843a0d8bef5d36d3a4ef838b1b0335b4532147b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 25 Apr 2013 17:09:05 -0400 Subject: SH-4137 WIP - added callback-based support for purge descendents, remove category --- indra/llinventory/llinventory.cpp | 7 ------- indra/llinventory/llinventory.h | 1 - 2 files changed, 8 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 41d58c6deb..a4cd8333cf 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -249,13 +249,6 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co return TRUE; } - -void LLInventoryObject::removeFromServer() -{ - // don't do nothin' - llwarns << "LLInventoryObject::removeFromServer() called. Doesn't do anything." << llendl; -} - void LLInventoryObject::updateParentOnServer(BOOL) const { // don't do nothin' diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 99716ed7be..8b865f044d 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -101,7 +101,6 @@ public: virtual BOOL importLegacyStream(std::istream& input_stream); virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const; - virtual void removeFromServer(); virtual void updateParentOnServer(BOOL) const; virtual void updateServer(BOOL) const; -- cgit v1.2.3 From 6c56c77ec575141963c5de8dfa228253fe175bc3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 May 2013 08:53:21 -0400 Subject: SH-4027 WIP - initial implementation of item update via AIS. --- indra/llinventory/llinventory.cpp | 2 +- indra/llinventory/llinventory.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index a4cd8333cf..641532ec29 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -261,7 +261,7 @@ void LLInventoryObject::updateServer(BOOL) const llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl; } -inline +// static void LLInventoryObject::correctInventoryName(std::string& name) { LLStringUtil::replaceNonstandardASCII(name, ' '); diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 8b865f044d..17421b3f5e 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -86,16 +86,14 @@ public: void setType(LLAssetType::EType type); virtual void setCreationDate(time_t creation_date_utc); // only stored for items -private: // in place correction for inventory name string - void correctInventoryName(std::string& name); + static void correctInventoryName(std::string& name); //-------------------------------------------------------------------- // File Support // Implemented here so that a minimal information set can be transmitted // between simulator and viewer. //-------------------------------------------------------------------- -public: // virtual BOOL importFile(LLFILE* fp); virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const; virtual BOOL importLegacyStream(std::istream& input_stream); -- cgit v1.2.3 From 34d2cd03765b6b9b582035a933f4ec11fb262ff4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 May 2013 15:51:33 -0400 Subject: SH-4207 WIP - use item updates with callback when updating link descriptions. Reworked updateAppearanceFromCOF() cof-validation stages. --- indra/llinventory/llinventory.cpp | 9 +++++++-- indra/llinventory/llinventory.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 641532ec29..a529aa3af3 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -416,12 +416,17 @@ U32 LLInventoryItem::getCRC32() const return crc; } +// static +void LLInventoryItem::correctInventoryDescription(std::string& desc) +{ + LLStringUtil::replaceNonstandardASCII(desc, ' '); + LLStringUtil::replaceChar(desc, '|', ' '); +} void LLInventoryItem::setDescription(const std::string& d) { std::string new_desc(d); - LLStringUtil::replaceNonstandardASCII(new_desc, ' '); - LLStringUtil::replaceChar(new_desc, '|', ' '); + LLInventoryItem::correctInventoryDescription(new_desc); if( new_desc != mDescription ) { mDescription = new_desc; diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 17421b3f5e..cc474f3d4c 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -171,6 +171,7 @@ public: //-------------------------------------------------------------------- public: void setAssetUUID(const LLUUID& asset_id); + static void correctInventoryDescription(std::string& name); void setDescription(const std::string& new_desc); void setSaleInfo(const LLSaleInfo& sale_info); void setPermissions(const LLPermissions& perm); -- cgit v1.2.3 From f7c9739fd9bb4355765ecff4b92e879b38302e49 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 5 Jun 2013 15:13:48 -0400 Subject: SH-3635 WIP - COF slammer works in AISv3 regions. Extensive rework of onAISUpdateReceived. --- indra/llinventory/llinventory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index a529aa3af3..77b837f8ac 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -50,6 +50,7 @@ static const std::string INV_DESC_LABEL("desc"); static const std::string INV_PERMISSIONS_LABEL("permissions"); static const std::string INV_SHADOW_ID_LABEL("shadow_id"); static const std::string INV_ASSET_ID_LABEL("asset_id"); +static const std::string INV_LINKED_ID_LABEL("linked_id"); static const std::string INV_SALE_INFO_LABEL("sale_info"); static const std::string INV_FLAGS_LABEL("flags"); static const std::string INV_CREATION_DATE_LABEL("created_at"); @@ -1109,6 +1110,11 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd) { mAssetUUID = sd[w]; } + w = INV_LINKED_ID_LABEL; + if (sd.has(w)) + { + mAssetUUID = sd[w]; + } w = INV_ASSET_TYPE_LABEL; if (sd.has(w)) { -- cgit v1.2.3 From 6d46132ef5218cd17d8d201f16e5a7df4b1e39a6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 10 Jun 2013 16:29:10 -0400 Subject: SH-4216 WIP - finished item/cat update and reorg of aisv3 code --- indra/llinventory/llinventory.cpp | 11 ++++++++--- indra/llinventory/llinventory.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 77b837f8ac..6336d02f22 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1049,11 +1049,16 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); -bool LLInventoryItem::fromLLSD(const LLSD& sd) +bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) { LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE); - mInventoryType = LLInventoryType::IT_NONE; - mAssetUUID.setNull(); + if (is_new) + { + // If we're adding LLSD to an existing object, need avoid + // clobbering these fields. + mInventoryType = LLInventoryType::IT_NONE; + mAssetUUID.setNull(); + } std::string w; w = INV_ITEM_ID_LABEL; diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index cc474f3d4c..b718f0f9b7 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -210,7 +210,7 @@ public: void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size); LLSD asLLSD() const; void asLLSD( LLSD& sd ) const; - bool fromLLSD(const LLSD& sd); + bool fromLLSD(const LLSD& sd, bool is_new = true); //-------------------------------------------------------------------- // Member Variables -- cgit v1.2.3 From 3ed3b88892adb4234c375d2d6bd5f0d2da5566c7 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 9 Aug 2013 13:36:36 -0700 Subject: Refactoring link creation calls in preparation for adding AIS v3 hook. --- indra/llinventory/llinventory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index b718f0f9b7..dd504fb155 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -48,6 +48,7 @@ class LLInventoryObject : public LLRefCount { public: typedef std::list > object_list_t; + typedef std::list > const_object_list_t; //-------------------------------------------------------------------- // Initialization -- cgit v1.2.3 From 487ca1bad37883be0325b564ab557a8f77575388 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 14 May 2014 17:50:59 -0400 Subject: v-r -> s-e merge WIP --- indra/llinventory/llinventory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 443d34e145..70b200e139 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -48,6 +48,7 @@ class LLInventoryObject : public LLRefCount, public LLTrace::MemTrackable > object_list_t; + typedef std::list > const_object_list_t; //-------------------------------------------------------------------- // Initialization -- cgit v1.2.3