From 064404ab409ddd0a3b25027a98582696295c46fd Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Wed, 31 Oct 2007 07:28:23 +0000
Subject: * Moved OpenSim/Framework/General to OpenSim/Framework for great
justice.
---
OpenSim/Framework/InventoryItemBase.cs | 273 +++++++++++++++++++++++++++++++++
1 file changed, 273 insertions(+)
create mode 100644 OpenSim/Framework/InventoryItemBase.cs
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
new file mode 100644
index 0000000..331013f
--- /dev/null
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -0,0 +1,273 @@
+/*
+* Copyright (c) Contributors, http://opensimulator.org/
+* See CONTRIBUTORS.TXT for a full list of copyright holders.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* * Neither the name of the OpenSim Project nor the
+* names of its contributors may be used to endorse or promote products
+* derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+using System;
+using System.Xml.Serialization;
+using System.Collections;
+using System.Collections.Generic;
+using libsecondlife;
+
+namespace OpenSim.Framework
+{
+ ///
+ /// Inventory Item - contains all the properties associated with an individual inventory piece.
+ ///
+ public class InventoryItemBase
+ {
+ ///
+ /// A UUID containing the ID for the inventory item itself
+ ///
+ public LLUUID inventoryID;
+
+ ///
+ /// The UUID of the associated asset on the asset server
+ ///
+ public LLUUID assetID;
+
+ ///
+ /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
+ ///
+ public int assetType;
+
+ ///
+ /// The type of inventory item. (Can be slightly different to the asset type
+ ///
+ public int invType;
+
+ ///
+ /// The folder this item is contained in
+ ///
+ public LLUUID parentFolderID;
+
+ ///
+ /// The owner of this inventory item
+ ///
+ public LLUUID avatarID;
+
+ ///
+ /// The creator of this item
+ ///
+ public LLUUID creatorsID;
+
+ ///
+ /// The name of the inventory item (must be less than 64 characters)
+ ///
+ public string inventoryName;
+
+ ///
+ /// The description of the inventory item (must be less than 64 characters)
+ ///
+ public string inventoryDescription;
+
+ ///
+ /// A mask containing the permissions for the next owner (cannot be enforced)
+ ///
+ public uint inventoryNextPermissions;
+
+ ///
+ /// A mask containing permissions for the current owner (cannot be enforced)
+ ///
+ public uint inventoryCurrentPermissions;
+
+ ///
+ ///
+ ///
+ public uint inventoryBasePermissions;
+
+ ///
+ ///
+ ///
+ public uint inventoryEveryOnePermissions;
+ }
+
+ ///
+ /// A Class for folders which contain users inventory
+ ///
+ public class InventoryFolderBase
+ {
+ ///
+ /// The name of the folder (64 characters or less)
+ ///
+ public string name;
+
+ ///
+ /// The agent who's inventory this is contained by
+ ///
+ public LLUUID agentID;
+
+ ///
+ /// The folder this folder is contained in
+ ///
+ public LLUUID parentID;
+
+ ///
+ /// The UUID for this folder
+ ///
+ public LLUUID folderID;
+
+ ///
+ /// Tyep of Items normally stored in this folder
+ ///
+ public short type;
+
+ ///
+ ///
+ ///
+ public ushort version;
+ }
+
+ ///
+ /// An interface for accessing inventory data from a storage server
+ ///
+ public interface IInventoryData
+ {
+ ///
+ /// Initialises the interface
+ ///
+ void Initialise();
+
+ ///
+ /// Closes the interface
+ ///
+ void Close();
+
+ ///
+ /// The plugin being loaded
+ ///
+ /// A string containing the plugin name
+ string getName();
+
+ ///
+ /// The plugins version
+ ///
+ /// A string containing the plugin version
+ string getVersion();
+
+ ///
+ /// Returns a list of inventory items contained within the specified folder
+ ///
+ /// The UUID of the target folder
+ /// A List of InventoryItemBase items
+ List getInventoryInFolder(LLUUID folderID);
+
+ ///
+ /// Returns a list of the root folders within a users inventory
+ ///
+ /// The user whos inventory is to be searched
+ /// A list of folder objects
+ List getUserRootFolders(LLUUID user);
+
+ ///
+ /// Returns the users inventory root folder.
+ ///
+ /// The UUID of the user who is having inventory being returned
+ /// Root inventory folder
+ InventoryFolderBase getUserRootFolder(LLUUID user);
+
+ ///
+ /// Returns a list of inventory folders contained in the folder 'parentID'
+ ///
+ /// The folder to get subfolders for
+ /// A list of inventory folders
+ List getInventoryFolders(LLUUID parentID);
+
+ ///
+ /// Returns an inventory item by its UUID
+ ///
+ /// The UUID of the item to be returned
+ /// A class containing item information
+ InventoryItemBase getInventoryItem(LLUUID item);
+
+ ///
+ /// Returns a specified inventory folder by its UUID
+ ///
+ /// The UUID of the folder to be returned
+ /// A class containing folder information
+ InventoryFolderBase getInventoryFolder(LLUUID folder);
+
+ ///
+ /// Creates a new inventory item based on item
+ ///
+ /// The item to be created
+ void addInventoryItem(InventoryItemBase item);
+
+ ///
+ /// Updates an inventory item with item (updates based on ID)
+ ///
+ /// The updated item
+ void updateInventoryItem(InventoryItemBase item);
+
+ ///
+ ///
+ ///
+ ///
+ void deleteInventoryItem(LLUUID item);
+
+ ///
+ /// Adds a new folder specified by folder
+ ///
+ /// The inventory folder
+ void addInventoryFolder(InventoryFolderBase folder);
+
+ ///
+ /// Updates a folder based on its ID with folder
+ ///
+ /// The inventory folder
+ void updateInventoryFolder(InventoryFolderBase folder);
+
+ ///
+ /// Deletes a folder based on its ID with folder
+ ///
+ /// The id of the folder
+ void deleteInventoryFolder(LLUUID folder);
+ }
+
+ /*
+ * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
+ * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
+ * into this simpler class, and then use that.
+ */
+ [XmlRoot(ElementName = "inventory", IsNullable = true)]
+ public class SerializableInventory
+ {
+ [XmlRoot(ElementName = "folder", IsNullable = true)]
+ public class SerializableFolder : InventoryFolderBase
+ {
+ [XmlArray(ElementName = "folders", IsNullable = true)]
+ [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))]
+ public ArrayList SubFolders;
+
+ [XmlArray(ElementName = "items", IsNullable = true)]
+ [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))]
+ public ArrayList Items;
+ }
+
+ [XmlElement(ElementName = "folder", IsNullable = true)]
+ public SerializableFolder root;
+ }
+
+}
--
cgit v1.1
From 4fad66f855544b9298ae2216c58c0f44009358a5 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 1 Nov 2007 19:19:05 +0000
Subject: * Diuerse beavtificatems
---
OpenSim/Framework/InventoryItemBase.cs | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 331013f..80f631e 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -25,10 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-using System;
-using System.Xml.Serialization;
using System.Collections;
using System.Collections.Generic;
+using System.Xml.Serialization;
using libsecondlife;
namespace OpenSim.Framework
@@ -251,23 +250,20 @@ namespace OpenSim.Framework
* class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
* into this simpler class, and then use that.
*/
+
[XmlRoot(ElementName = "inventory", IsNullable = true)]
public class SerializableInventory
{
[XmlRoot(ElementName = "folder", IsNullable = true)]
public class SerializableFolder : InventoryFolderBase
{
- [XmlArray(ElementName = "folders", IsNullable = true)]
- [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))]
- public ArrayList SubFolders;
+ [XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
+ ArrayList SubFolders;
- [XmlArray(ElementName = "items", IsNullable = true)]
- [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))]
- public ArrayList Items;
+ [XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
+ Items;
}
- [XmlElement(ElementName = "folder", IsNullable = true)]
- public SerializableFolder root;
+ [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
}
-
-}
+}
\ No newline at end of file
--
cgit v1.1
From 5df851761aa796cba70a3b6d8b36d119502c1de2 Mon Sep 17 00:00:00 2001
From: MW
Date: Sat, 1 Dec 2007 18:49:17 +0000
Subject: Initial working Grid Inventory server. Only been tested on a very
small grid, so likely to have problems on a larger grid with more people? To
use , both the user server and Inventory server need to be running this
latest revision. (older regions should be able to still be used, just the
user won't have inventory on them). Also and HERE IS THE BIG BREAK ISSUE,
currently, so that the initial inventory details for a user are added to the
inventory db , you need to recreate the accounts using the user server
"create user" feature. It should be quite easy to manual populate the
inventory database instead but I someone else will need to look into that)
Also I've only tested using SQLite as the database provider, there is a Mysql
inventory provider but I don't know if it works (SQLite is set as default, so
you will need to change it in the inventory server config.xml)
---
OpenSim/Framework/InventoryItemBase.cs | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 80f631e..0ee30bb 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -245,6 +245,25 @@ namespace OpenSim.Framework
void deleteInventoryFolder(LLUUID folder);
}
+ public class InventoryCollection
+ {
+ public List Folders;
+ public List AllItems;
+ public LLUUID UserID;
+
+ public InventoryCollection()
+ {
+ Folders = new List();
+ AllItems = new List();
+ }
+
+ public InventoryCollection(List folders, List allItems)
+ {
+ Folders = folders;
+ AllItems = allItems;
+ }
+ }
+
/*
* .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
* class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
--
cgit v1.1
From 0855066968e30a9965088c14234b2bc93daf0481 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Sat, 8 Dec 2007 14:27:12 +0000
Subject: This patch fixes mantis 105. Basically, it stops the index exception
when no root folder is found and it makes the user server wait longer for the
inventory server to do its work.
From Justin Casey (IBM)
---
OpenSim/Framework/InventoryItemBase.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 0ee30bb..b9a11c9 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Framework
/// Returns the users inventory root folder.
///
/// The UUID of the user who is having inventory being returned
- /// Root inventory folder
+ /// Root inventory folder, null if no root inventory folder was found
InventoryFolderBase getUserRootFolder(LLUUID user);
///
@@ -285,4 +285,4 @@ namespace OpenSim.Framework
[XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From af6eb67999875f12270ef19ed33c179556696754 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 10 Dec 2007 05:25:16 +0000
Subject: saved OpenSim source code from the giant rampaging unterminated
copyright notice of doom
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index b9a11c9..adcc289 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
+* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
--
cgit v1.1
From 8a8c89a0f32b528bd588715bdbfc875c852e7187 Mon Sep 17 00:00:00 2001
From: Brian McBee
Date: Sat, 15 Dec 2007 04:57:14 +0000
Subject: Grid Inventory feature upgrade: renaming folders should now be
correct, subfolders work, moving folders works. Tested only in MYSQL, but may
work in MSSQL and sqlite. Probably not working in standalone mode.
---
OpenSim/Framework/InventoryItemBase.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index adcc289..8cb3e73 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -239,6 +239,12 @@ namespace OpenSim.Framework
void updateInventoryFolder(InventoryFolderBase folder);
///
+ /// Updates a folder based on its ID with folder
+ ///
+ /// The inventory folder
+ void moveInventoryFolder(InventoryFolderBase folder);
+
+ ///
/// Deletes a folder based on its ID with folder
///
/// The id of the folder
--
cgit v1.1
From efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 27 Dec 2007 21:41:48 +0000
Subject: * Optimized usings * shortened references * Removed redundant 'this'
* Normalized EOF
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 8cb3e73..c60fb01 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -291,4 +291,4 @@ namespace OpenSim.Framework
[XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 5ef1433e95ca388304c9eef2a4445062c7a082ae Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 31 Dec 2007 18:26:24 +0000
Subject: Correctly output library inventory folder type and version
information
---
OpenSim/Framework/InventoryItemBase.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index c60fb01..f9903d4 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -129,7 +129,7 @@ namespace OpenSim.Framework
public LLUUID folderID;
///
- /// Tyep of Items normally stored in this folder
+ /// Type of items normally stored in this folder
///
public short type;
@@ -291,4 +291,4 @@ namespace OpenSim.Framework
[XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 47180080f0f4b93c60232b47ca4e093bd7c73a1d Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 18 Mar 2008 05:16:43 +0000
Subject: Formatting cleanup.
---
OpenSim/Framework/InventoryItemBase.cs | 52 +++++++++++++++++-----------------
1 file changed, 26 insertions(+), 26 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index f9903d4..897af7f 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -1,30 +1,30 @@
/*
-* Copyright (c) Contributors, http://opensimulator.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
using System.Collections;
using System.Collections.Generic;
using System.Xml.Serialization;
--
cgit v1.1
From 0a47a75b8894942e43a132c8479b1b17e7d4e8b5 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 28 Mar 2008 19:35:01 +0000
Subject: * Send full inventory folder skeleton to standalone client logins
rather than just the root child folders * This may resolve some current
problems with non root child folders on standalone installations. * A fix for
the same problem in grid mode will come soon.
---
OpenSim/Framework/InventoryItemBase.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 897af7f..1d0246b 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -165,6 +165,14 @@ namespace OpenSim.Framework
///
/// A string containing the plugin version
string getVersion();
+
+ ///
+ /// Returns all child folders in the hierarchy from the parent folder and down.
+ /// Does not return the parent folder itself.
+ ///
+ /// The folder to get subfolders for
+ /// A list of inventory folders
+ List getFolderHierarchy(LLUUID parentID);
///
/// Returns a list of inventory items contained within the specified folder
--
cgit v1.1
From 79222a0b45eca74c32cda95cc0857ac860ab6d19 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Mon, 7 Apr 2008 18:28:48 +0000
Subject: break out the 5 classes that were InventoryItemBase into seperate .cs
files 1 per class
---
OpenSim/Framework/InventoryItemBase.cs | 197 ---------------------------------
1 file changed, 197 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 1d0246b..7d146e7 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -102,201 +102,4 @@ namespace OpenSim.Framework
///
public uint inventoryEveryOnePermissions;
}
-
- ///
- /// A Class for folders which contain users inventory
- ///
- public class InventoryFolderBase
- {
- ///
- /// The name of the folder (64 characters or less)
- ///
- public string name;
-
- ///
- /// The agent who's inventory this is contained by
- ///
- public LLUUID agentID;
-
- ///
- /// The folder this folder is contained in
- ///
- public LLUUID parentID;
-
- ///
- /// The UUID for this folder
- ///
- public LLUUID folderID;
-
- ///
- /// Type of items normally stored in this folder
- ///
- public short type;
-
- ///
- ///
- ///
- public ushort version;
- }
-
- ///
- /// An interface for accessing inventory data from a storage server
- ///
- public interface IInventoryData
- {
- ///
- /// Initialises the interface
- ///
- void Initialise();
-
- ///
- /// Closes the interface
- ///
- void Close();
-
- ///
- /// The plugin being loaded
- ///
- /// A string containing the plugin name
- string getName();
-
- ///
- /// The plugins version
- ///
- /// A string containing the plugin version
- string getVersion();
-
- ///
- /// Returns all child folders in the hierarchy from the parent folder and down.
- /// Does not return the parent folder itself.
- ///
- /// The folder to get subfolders for
- /// A list of inventory folders
- List getFolderHierarchy(LLUUID parentID);
-
- ///
- /// Returns a list of inventory items contained within the specified folder
- ///
- /// The UUID of the target folder
- /// A List of InventoryItemBase items
- List getInventoryInFolder(LLUUID folderID);
-
- ///
- /// Returns a list of the root folders within a users inventory
- ///
- /// The user whos inventory is to be searched
- /// A list of folder objects
- List getUserRootFolders(LLUUID user);
-
- ///
- /// Returns the users inventory root folder.
- ///
- /// The UUID of the user who is having inventory being returned
- /// Root inventory folder, null if no root inventory folder was found
- InventoryFolderBase getUserRootFolder(LLUUID user);
-
- ///
- /// Returns a list of inventory folders contained in the folder 'parentID'
- ///
- /// The folder to get subfolders for
- /// A list of inventory folders
- List getInventoryFolders(LLUUID parentID);
-
- ///
- /// Returns an inventory item by its UUID
- ///
- /// The UUID of the item to be returned
- /// A class containing item information
- InventoryItemBase getInventoryItem(LLUUID item);
-
- ///
- /// Returns a specified inventory folder by its UUID
- ///
- /// The UUID of the folder to be returned
- /// A class containing folder information
- InventoryFolderBase getInventoryFolder(LLUUID folder);
-
- ///
- /// Creates a new inventory item based on item
- ///
- /// The item to be created
- void addInventoryItem(InventoryItemBase item);
-
- ///
- /// Updates an inventory item with item (updates based on ID)
- ///
- /// The updated item
- void updateInventoryItem(InventoryItemBase item);
-
- ///
- ///
- ///
- ///
- void deleteInventoryItem(LLUUID item);
-
- ///
- /// Adds a new folder specified by folder
- ///
- /// The inventory folder
- void addInventoryFolder(InventoryFolderBase folder);
-
- ///
- /// Updates a folder based on its ID with folder
- ///
- /// The inventory folder
- void updateInventoryFolder(InventoryFolderBase folder);
-
- ///
- /// Updates a folder based on its ID with folder
- ///
- /// The inventory folder
- void moveInventoryFolder(InventoryFolderBase folder);
-
- ///
- /// Deletes a folder based on its ID with folder
- ///
- /// The id of the folder
- void deleteInventoryFolder(LLUUID folder);
- }
-
- public class InventoryCollection
- {
- public List Folders;
- public List AllItems;
- public LLUUID UserID;
-
- public InventoryCollection()
- {
- Folders = new List();
- AllItems = new List();
- }
-
- public InventoryCollection(List folders, List allItems)
- {
- Folders = folders;
- AllItems = allItems;
- }
- }
-
- /*
- * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
- * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
- * into this simpler class, and then use that.
- */
-
- [XmlRoot(ElementName = "inventory", IsNullable = true)]
- public class SerializableInventory
- {
- [XmlRoot(ElementName = "folder", IsNullable = true)]
- public class SerializableFolder : InventoryFolderBase
- {
- [XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
- ArrayList SubFolders;
-
- [XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
- Items;
- }
-
- [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
- }
}
--
cgit v1.1
From f43681510725f5b95fcb864a1f3e4b744fcaf992 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Mon, 7 Apr 2008 23:15:35 +0000
Subject: Refactor InventoryItemBase to do the following: * wrap fields as
Properties * rename some fields/properties to more sensible names * set
style to PropName to match more standard C# approach
---
OpenSim/Framework/InventoryItemBase.cs | 145 ++++++++++++++++++++++++++++++---
1 file changed, 132 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 7d146e7..03b47ca 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -40,66 +40,185 @@ namespace OpenSim.Framework
///
/// A UUID containing the ID for the inventory item itself
///
- public LLUUID inventoryID;
+ private LLUUID _id;
///
/// The UUID of the associated asset on the asset server
///
- public LLUUID assetID;
+ private LLUUID _assetID;
///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
///
- public int assetType;
+ private int _assetType;
///
/// The type of inventory item. (Can be slightly different to the asset type
///
- public int invType;
+ private int _invType;
///
/// The folder this item is contained in
///
- public LLUUID parentFolderID;
+ private LLUUID _folder;
///
/// The owner of this inventory item
///
- public LLUUID avatarID;
+ private LLUUID _owner;
///
/// The creator of this item
///
- public LLUUID creatorsID;
+ private LLUUID _creator;
///
/// The name of the inventory item (must be less than 64 characters)
///
- public string inventoryName;
+ private string _name;
///
/// The description of the inventory item (must be less than 64 characters)
///
- public string inventoryDescription;
+ private string _description;
///
/// A mask containing the permissions for the next owner (cannot be enforced)
///
- public uint inventoryNextPermissions;
+ private uint _nextPermissions;
///
/// A mask containing permissions for the current owner (cannot be enforced)
///
- public uint inventoryCurrentPermissions;
+ private uint _currentPermissions;
///
///
///
- public uint inventoryBasePermissions;
+ private uint _basePermissions;
///
///
///
- public uint inventoryEveryOnePermissions;
+ private uint _everyOnePermissions;
+
+ public LLUUID ID {
+ get {
+ return _id;
+ }
+ set {
+ _id = value;
+ }
+ }
+
+
+
+ public int InvType {
+ get {
+ return _invType;
+ }
+ set {
+ _invType = value;
+ }
+ }
+
+ public LLUUID Folder {
+ get {
+ return _folder;
+ }
+ set {
+ _folder = value;
+ }
+ }
+
+ public LLUUID Owner {
+ get {
+ return _owner;
+ }
+ set {
+ _owner = value;
+ }
+ }
+
+ public LLUUID Creator {
+ get {
+ return _creator;
+ }
+ set {
+ _creator = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return _name;
+ }
+ set {
+ _name = value;
+ }
+ }
+
+ public string Description {
+ get {
+ return _description;
+ }
+ set {
+ _description = value;
+ }
+ }
+
+ public uint NextPermissions {
+ get {
+ return _nextPermissions;
+ }
+ set {
+ _nextPermissions = value;
+ }
+ }
+
+ public uint CurrentPermissions {
+ get {
+ return _currentPermissions;
+ }
+ set {
+ _currentPermissions = value;
+ }
+ }
+
+ public uint BasePermissions {
+ get {
+ return _basePermissions;
+ }
+ set {
+ _basePermissions = value;
+ }
+ }
+
+ public uint EveryOnePermissions {
+ get {
+ return _everyOnePermissions;
+ }
+ set {
+ _everyOnePermissions = value;
+ }
+ }
+
+ public int AssetType {
+ get {
+ return _assetType;
+ }
+ set {
+ _assetType = value;
+ }
+ }
+
+ public LLUUID AssetID {
+ get {
+ return _assetID;
+ }
+ set {
+ _assetID = value;
+ }
+ }
}
}
--
cgit v1.1
From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Mon, 21 Apr 2008 07:09:17 +0000
Subject: * Optimised using statements and namespace references across entire
project (this took a while to run).
---
OpenSim/Framework/InventoryItemBase.cs | 3 ---
1 file changed, 3 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 03b47ca..8c8d858 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System.Collections;
-using System.Collections.Generic;
-using System.Xml.Serialization;
using libsecondlife;
namespace OpenSim.Framework
--
cgit v1.1
From 4db839c3b84bed8a775074beb1ae0b526bc05e81 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 23 Apr 2008 17:04:15 +0000
Subject: * Implement proper emptying of trashcan on standalone * On
standalone, folders (and their items) should now be persistently deleted on
trash emptying, as well as immediate child items * An implementation for grid
mode will follow.
---
OpenSim/Framework/InventoryItemBase.cs | 2 --
1 file changed, 2 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 8c8d858..6ed2961 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -108,8 +108,6 @@ namespace OpenSim.Framework
}
}
-
-
public int InvType {
get {
return _invType;
--
cgit v1.1
From 2a2ef42e64e202c81762adf0cc0e4cb1393f71ef Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Thu, 24 Apr 2008 12:27:24 +0000
Subject: replace hard tabs with 4 spaces to be consistant in the source.
Please adjust your editors to not use hard tabs.
---
OpenSim/Framework/InventoryItemBase.cs | 156 ++++++++++++++++-----------------
1 file changed, 78 insertions(+), 78 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 6ed2961..ccb8163 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -100,120 +100,120 @@ namespace OpenSim.Framework
private uint _everyOnePermissions;
public LLUUID ID {
- get {
- return _id;
- }
- set {
- _id = value;
- }
+ get {
+ return _id;
+ }
+ set {
+ _id = value;
+ }
}
public int InvType {
- get {
- return _invType;
- }
- set {
- _invType = value;
- }
+ get {
+ return _invType;
+ }
+ set {
+ _invType = value;
+ }
}
public LLUUID Folder {
- get {
- return _folder;
- }
- set {
- _folder = value;
- }
+ get {
+ return _folder;
+ }
+ set {
+ _folder = value;
+ }
}
public LLUUID Owner {
- get {
- return _owner;
- }
- set {
- _owner = value;
- }
+ get {
+ return _owner;
+ }
+ set {
+ _owner = value;
+ }
}
public LLUUID Creator {
- get {
- return _creator;
- }
- set {
- _creator = value;
- }
+ get {
+ return _creator;
+ }
+ set {
+ _creator = value;
+ }
}
public string Name {
- get {
- return _name;
- }
- set {
- _name = value;
- }
+ get {
+ return _name;
+ }
+ set {
+ _name = value;
+ }
}
public string Description {
- get {
- return _description;
- }
- set {
- _description = value;
- }
+ get {
+ return _description;
+ }
+ set {
+ _description = value;
+ }
}
public uint NextPermissions {
- get {
- return _nextPermissions;
- }
- set {
- _nextPermissions = value;
- }
+ get {
+ return _nextPermissions;
+ }
+ set {
+ _nextPermissions = value;
+ }
}
public uint CurrentPermissions {
- get {
- return _currentPermissions;
- }
- set {
- _currentPermissions = value;
- }
+ get {
+ return _currentPermissions;
+ }
+ set {
+ _currentPermissions = value;
+ }
}
public uint BasePermissions {
- get {
- return _basePermissions;
- }
- set {
- _basePermissions = value;
- }
+ get {
+ return _basePermissions;
+ }
+ set {
+ _basePermissions = value;
+ }
}
public uint EveryOnePermissions {
- get {
- return _everyOnePermissions;
- }
- set {
- _everyOnePermissions = value;
- }
+ get {
+ return _everyOnePermissions;
+ }
+ set {
+ _everyOnePermissions = value;
+ }
}
public int AssetType {
- get {
- return _assetType;
- }
- set {
- _assetType = value;
- }
+ get {
+ return _assetType;
+ }
+ set {
+ _assetType = value;
+ }
}
public LLUUID AssetID {
- get {
- return _assetID;
- }
- set {
- _assetID = value;
- }
+ get {
+ return _assetID;
+ }
+ set {
+ _assetID = value;
+ }
}
}
}
--
cgit v1.1
From 375163a6fece8b3a57c7555246abe8338223a599 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Tue, 29 Apr 2008 14:04:55 +0000
Subject: * Spring cleaning. * Added new generic "Location" class to handle 2D
integer locations. Going to use it to replace all RegionHandle and X,Y
coordinate references throughout the entire project. You have been warned.
---
OpenSim/Framework/InventoryItemBase.cs | 197 +++++++++++++--------------------
1 file changed, 79 insertions(+), 118 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ccb8163..3d75a8a 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -35,11 +35,6 @@ namespace OpenSim.Framework
public class InventoryItemBase
{
///
- /// A UUID containing the ID for the inventory item itself
- ///
- private LLUUID _id;
-
- ///
/// The UUID of the associated asset on the asset server
///
private LLUUID _assetID;
@@ -50,170 +45,136 @@ namespace OpenSim.Framework
private int _assetType;
///
- /// The type of inventory item. (Can be slightly different to the asset type
+ ///
///
- private int _invType;
+ private uint _basePermissions;
///
- /// The folder this item is contained in
+ /// The creator of this item
///
- private LLUUID _folder;
+ private LLUUID _creator;
///
- /// The owner of this inventory item
+ /// A mask containing permissions for the current owner (cannot be enforced)
///
- private LLUUID _owner;
+ private uint _currentPermissions;
///
- /// The creator of this item
+ /// The description of the inventory item (must be less than 64 characters)
///
- private LLUUID _creator;
+ private string _description;
///
- /// The name of the inventory item (must be less than 64 characters)
+ ///
///
- private string _name;
+ private uint _everyOnePermissions;
///
- /// The description of the inventory item (must be less than 64 characters)
+ /// The folder this item is contained in
///
- private string _description;
+ private LLUUID _folder;
///
- /// A mask containing the permissions for the next owner (cannot be enforced)
+ /// A UUID containing the ID for the inventory item itself
///
- private uint _nextPermissions;
+ private LLUUID _id;
///
- /// A mask containing permissions for the current owner (cannot be enforced)
+ /// The type of inventory item. (Can be slightly different to the asset type
///
- private uint _currentPermissions;
+ private int _invType;
///
- ///
+ /// The name of the inventory item (must be less than 64 characters)
///
- private uint _basePermissions;
+ private string _name;
///
- ///
+ /// A mask containing the permissions for the next owner (cannot be enforced)
///
- private uint _everyOnePermissions;
-
- public LLUUID ID {
- get {
- return _id;
- }
- set {
- _id = value;
- }
+ private uint _nextPermissions;
+
+ ///
+ /// The owner of this inventory item
+ ///
+ private LLUUID _owner;
+
+ public LLUUID ID
+ {
+ get { return _id; }
+ set { _id = value; }
}
- public int InvType {
- get {
- return _invType;
- }
- set {
- _invType = value;
- }
+ public int InvType
+ {
+ get { return _invType; }
+ set { _invType = value; }
}
- public LLUUID Folder {
- get {
- return _folder;
- }
- set {
- _folder = value;
- }
+ public LLUUID Folder
+ {
+ get { return _folder; }
+ set { _folder = value; }
}
- public LLUUID Owner {
- get {
- return _owner;
- }
- set {
- _owner = value;
- }
+ public LLUUID Owner
+ {
+ get { return _owner; }
+ set { _owner = value; }
}
- public LLUUID Creator {
- get {
- return _creator;
- }
- set {
- _creator = value;
- }
+ public LLUUID Creator
+ {
+ get { return _creator; }
+ set { _creator = value; }
}
- public string Name {
- get {
- return _name;
- }
- set {
- _name = value;
- }
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
}
- public string Description {
- get {
- return _description;
- }
- set {
- _description = value;
- }
+ public string Description
+ {
+ get { return _description; }
+ set { _description = value; }
}
- public uint NextPermissions {
- get {
- return _nextPermissions;
- }
- set {
- _nextPermissions = value;
- }
+ public uint NextPermissions
+ {
+ get { return _nextPermissions; }
+ set { _nextPermissions = value; }
}
- public uint CurrentPermissions {
- get {
- return _currentPermissions;
- }
- set {
- _currentPermissions = value;
- }
+ public uint CurrentPermissions
+ {
+ get { return _currentPermissions; }
+ set { _currentPermissions = value; }
}
- public uint BasePermissions {
- get {
- return _basePermissions;
- }
- set {
- _basePermissions = value;
- }
+ public uint BasePermissions
+ {
+ get { return _basePermissions; }
+ set { _basePermissions = value; }
}
- public uint EveryOnePermissions {
- get {
- return _everyOnePermissions;
- }
- set {
- _everyOnePermissions = value;
- }
+ public uint EveryOnePermissions
+ {
+ get { return _everyOnePermissions; }
+ set { _everyOnePermissions = value; }
}
- public int AssetType {
- get {
- return _assetType;
- }
- set {
- _assetType = value;
- }
+ public int AssetType
+ {
+ get { return _assetType; }
+ set { _assetType = value; }
}
- public LLUUID AssetID {
- get {
- return _assetID;
- }
- set {
- _assetID = value;
- }
+ public LLUUID AssetID
+ {
+ get { return _assetID; }
+ set { _assetID = value; }
}
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From a9cc76e0efba7496909d613c75b81de6a9c5d979 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Wed, 30 Apr 2008 16:08:24 +0000
Subject: * Long awaited patch from A_Biondi Mantis 923. Kept alive by
Melanie. Thanks A_Biondi and Melanie! * This builds but might not work.
JustinCC will examine.. it may work out of the box.
---
OpenSim/Framework/InventoryItemBase.cs | 118 ++++++++++++++++++++++++++++++---
1 file changed, 109 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 3d75a8a..dbf2085 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -54,6 +54,10 @@ namespace OpenSim.Framework
///
private LLUUID _creator;
+ private LLUUID _owner;
+
+ private uint _nextPermissions;
+
///
/// A mask containing permissions for the current owner (cannot be enforced)
///
@@ -89,20 +93,44 @@ namespace OpenSim.Framework
///
private string _name;
+
///
- /// A mask containing the permissions for the next owner (cannot be enforced)
+ ///
///
- private uint _nextPermissions;
+ private LLUUID _groupID;
///
- /// The owner of this inventory item
+ ///
///
- private LLUUID _owner;
+ private bool _groupOwned;
- public LLUUID ID
- {
- get { return _id; }
- set { _id = value; }
+ ///
+ ///
+ ///
+ private int _salePrice;
+
+ ///
+ ///
+ ///
+ private byte _saleType;
+
+ ///
+ ///
+ ///
+ private uint _flags;
+
+ ///
+ ///
+ ///
+ public int _creationDate;
+
+ public LLUUID ID {
+ get {
+ return _id;
+ }
+ set {
+ _id = value;
+ }
}
public int InvType
@@ -176,5 +204,77 @@ namespace OpenSim.Framework
get { return _assetID; }
set { _assetID = value; }
}
+
+ public LLUUID GroupID
+ {
+ get
+ {
+ return _groupID;
+ }
+ set
+ {
+ _groupID = value;
+ }
+ }
+
+ public bool GroupOwned
+ {
+ get
+ {
+ return _groupOwned;
+ }
+ set
+ {
+ _groupOwned = value;
+ }
+ }
+
+ public int SalePrice
+ {
+ get
+ {
+ return _salePrice;
+ }
+ set
+ {
+ _salePrice = value;
+ }
+ }
+
+ public byte SaleType
+ {
+ get
+ {
+ return _saleType;
+ }
+ set
+ {
+ _saleType = value;
+ }
+ }
+
+ public uint Flags
+ {
+ get
+ {
+ return _flags;
+ }
+ set
+ {
+ _flags = value;
+ }
+ }
+
+ public int CreationDate
+ {
+ get
+ {
+ return _creationDate;
+ }
+ set
+ {
+ _creationDate = value;
+ }
+ }
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Fri, 16 May 2008 01:22:11 +0000
Subject: Formatting cleanup.
---
OpenSim/Framework/InventoryItemBase.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index dbf2085..8d873db 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Framework
private int _assetType;
///
- ///
+ ///
///
private uint _basePermissions;
@@ -69,12 +69,12 @@ namespace OpenSim.Framework
private string _description;
///
- ///
+ ///
///
private uint _everyOnePermissions;
///
- /// The folder this item is contained in
+ /// The folder this item is contained in
///
private LLUUID _folder;
@@ -93,34 +93,34 @@ namespace OpenSim.Framework
///
private string _name;
-
+
///
- ///
+ ///
///
private LLUUID _groupID;
///
- ///
+ ///
///
private bool _groupOwned;
///
- ///
+ ///
///
private int _salePrice;
///
- ///
+ ///
///
private byte _saleType;
///
- ///
+ ///
///
private uint _flags;
///
- ///
+ ///
///
public int _creationDate;
--
cgit v1.1
From 5158aad662f3b6af788c729b3e68f76c92b3279b Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Wed, 25 Jun 2008 19:18:51 +0000
Subject: make lots of properties virtual, which lets nhibernate do some proxy
object optimizations.
---
OpenSim/Framework/InventoryItemBase.cs | 40 +++++++++++++++++-----------------
1 file changed, 20 insertions(+), 20 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 8d873db..85b08cb 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -122,9 +122,9 @@ namespace OpenSim.Framework
///
///
///
- public int _creationDate;
+ private int _creationDate;
- public LLUUID ID {
+ public virtual LLUUID ID {
get {
return _id;
}
@@ -133,79 +133,79 @@ namespace OpenSim.Framework
}
}
- public int InvType
+ public virtual int InvType
{
get { return _invType; }
set { _invType = value; }
}
- public LLUUID Folder
+ public virtual LLUUID Folder
{
get { return _folder; }
set { _folder = value; }
}
- public LLUUID Owner
+ public virtual LLUUID Owner
{
get { return _owner; }
set { _owner = value; }
}
- public LLUUID Creator
+ public virtual LLUUID Creator
{
get { return _creator; }
set { _creator = value; }
}
- public string Name
+ public virtual string Name
{
get { return _name; }
set { _name = value; }
}
- public string Description
+ public virtual string Description
{
get { return _description; }
set { _description = value; }
}
- public uint NextPermissions
+ public virtual uint NextPermissions
{
get { return _nextPermissions; }
set { _nextPermissions = value; }
}
- public uint CurrentPermissions
+ public virtual uint CurrentPermissions
{
get { return _currentPermissions; }
set { _currentPermissions = value; }
}
- public uint BasePermissions
+ public virtual uint BasePermissions
{
get { return _basePermissions; }
set { _basePermissions = value; }
}
- public uint EveryOnePermissions
+ public virtual uint EveryOnePermissions
{
get { return _everyOnePermissions; }
set { _everyOnePermissions = value; }
}
- public int AssetType
+ public virtual int AssetType
{
get { return _assetType; }
set { _assetType = value; }
}
- public LLUUID AssetID
+ public virtual LLUUID AssetID
{
get { return _assetID; }
set { _assetID = value; }
}
- public LLUUID GroupID
+ public virtual LLUUID GroupID
{
get
{
@@ -217,7 +217,7 @@ namespace OpenSim.Framework
}
}
- public bool GroupOwned
+ public virtual bool GroupOwned
{
get
{
@@ -229,7 +229,7 @@ namespace OpenSim.Framework
}
}
- public int SalePrice
+ public virtual int SalePrice
{
get
{
@@ -241,7 +241,7 @@ namespace OpenSim.Framework
}
}
- public byte SaleType
+ public virtual byte SaleType
{
get
{
@@ -253,7 +253,7 @@ namespace OpenSim.Framework
}
}
- public uint Flags
+ public virtual uint Flags
{
get
{
@@ -265,7 +265,7 @@ namespace OpenSim.Framework
}
}
- public int CreationDate
+ public virtual int CreationDate
{
get
{
--
cgit v1.1
From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sat, 6 Sep 2008 07:52:41 +0000
Subject: * This is the fabled LibOMV update with all of the libOMV types from
JHurliman * This is a HUGE OMG update and will definitely have unknown side
effects.. so this is really only for the strong hearted at this point.
Regular people should let the dust settle. * This has been tested to work
with most basic functions. However.. make sure you back up 'everything'
before using this. It's that big! * Essentially we're back at square 1 in
the testing phase.. so lets identify things that broke.
---
OpenSim/Framework/InventoryItemBase.cs | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 85b08cb..4441e73 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using libsecondlife;
+using OpenMetaverse;
namespace OpenSim.Framework
{
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
///
/// The UUID of the associated asset on the asset server
///
- private LLUUID _assetID;
+ private UUID _assetID;
///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
@@ -52,9 +52,9 @@ namespace OpenSim.Framework
///
/// The creator of this item
///
- private LLUUID _creator;
+ private UUID _creator;
- private LLUUID _owner;
+ private UUID _owner;
private uint _nextPermissions;
@@ -76,12 +76,12 @@ namespace OpenSim.Framework
///
/// The folder this item is contained in
///
- private LLUUID _folder;
+ private UUID _folder;
///
/// A UUID containing the ID for the inventory item itself
///
- private LLUUID _id;
+ private UUID _id;
///
/// The type of inventory item. (Can be slightly different to the asset type
@@ -97,7 +97,7 @@ namespace OpenSim.Framework
///
///
///
- private LLUUID _groupID;
+ private UUID _groupID;
///
///
@@ -124,7 +124,7 @@ namespace OpenSim.Framework
///
private int _creationDate;
- public virtual LLUUID ID {
+ public virtual UUID ID {
get {
return _id;
}
@@ -139,19 +139,19 @@ namespace OpenSim.Framework
set { _invType = value; }
}
- public virtual LLUUID Folder
+ public virtual UUID Folder
{
get { return _folder; }
set { _folder = value; }
}
- public virtual LLUUID Owner
+ public virtual UUID Owner
{
get { return _owner; }
set { _owner = value; }
}
- public virtual LLUUID Creator
+ public virtual UUID Creator
{
get { return _creator; }
set { _creator = value; }
@@ -199,13 +199,13 @@ namespace OpenSim.Framework
set { _assetType = value; }
}
- public virtual LLUUID AssetID
+ public virtual UUID AssetID
{
get { return _assetID; }
set { _assetID = value; }
}
- public virtual LLUUID GroupID
+ public virtual UUID GroupID
{
get
{
--
cgit v1.1
From 5557f0b772f7c68a7bd5fdc5a7916993ecba1e08 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Fri, 12 Sep 2008 21:00:29 +0000
Subject: reformat spacing on some property declarations. Take away the
virtual attribute as that was a left over of an nhibernate approach that
isn't used in the current nhibernate code anyway.
---
OpenSim/Framework/InventoryItemBase.cs | 106 ++++++++++-----------------------
1 file changed, 33 insertions(+), 73 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 4441e73..d165d86 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -124,157 +124,117 @@ namespace OpenSim.Framework
///
private int _creationDate;
- public virtual UUID ID {
- get {
- return _id;
- }
- set {
- _id = value;
- }
+ public UUID ID {
+ get { return _id; }
+ set { _id = value; }
}
- public virtual int InvType
+ public int InvType
{
get { return _invType; }
set { _invType = value; }
}
- public virtual UUID Folder
+ public UUID Folder
{
get { return _folder; }
set { _folder = value; }
}
- public virtual UUID Owner
+ public UUID Owner
{
get { return _owner; }
set { _owner = value; }
}
- public virtual UUID Creator
+ public UUID Creator
{
get { return _creator; }
set { _creator = value; }
}
- public virtual string Name
+ public string Name
{
get { return _name; }
set { _name = value; }
}
- public virtual string Description
+ public string Description
{
get { return _description; }
set { _description = value; }
}
- public virtual uint NextPermissions
+ public uint NextPermissions
{
get { return _nextPermissions; }
set { _nextPermissions = value; }
}
- public virtual uint CurrentPermissions
+ public uint CurrentPermissions
{
get { return _currentPermissions; }
set { _currentPermissions = value; }
}
- public virtual uint BasePermissions
+ public uint BasePermissions
{
get { return _basePermissions; }
set { _basePermissions = value; }
}
- public virtual uint EveryOnePermissions
+ public uint EveryOnePermissions
{
get { return _everyOnePermissions; }
set { _everyOnePermissions = value; }
}
- public virtual int AssetType
+ public int AssetType
{
get { return _assetType; }
set { _assetType = value; }
}
- public virtual UUID AssetID
+ public UUID AssetID
{
get { return _assetID; }
set { _assetID = value; }
}
- public virtual UUID GroupID
+ public UUID GroupID
{
- get
- {
- return _groupID;
- }
- set
- {
- _groupID = value;
- }
+ get { return _groupID; }
+ set { _groupID = value; }
}
- public virtual bool GroupOwned
+ public bool GroupOwned
{
- get
- {
- return _groupOwned;
- }
- set
- {
- _groupOwned = value;
- }
+ get { return _groupOwned; }
+ set { _groupOwned = value; }
}
- public virtual int SalePrice
+ public int SalePrice
{
- get
- {
- return _salePrice;
- }
- set
- {
- _salePrice = value;
- }
+ get { return _salePrice; }
+ set { _salePrice = value; }
}
- public virtual byte SaleType
+ public byte SaleType
{
- get
- {
- return _saleType;
- }
- set
- {
- _saleType = value;
- }
+ get { return _saleType; }
+ set { _saleType = value; }
}
- public virtual uint Flags
+ public uint Flags
{
- get
- {
- return _flags;
- }
- set
- {
- _flags = value;
- }
+ get { return _flags; }
+ set { _flags = value; }
}
- public virtual int CreationDate
+ public int CreationDate
{
- get
- {
- return _creationDate;
- }
- set
- {
- _creationDate = value;
- }
+ get { return _creationDate; }
+ set { _creationDate = value; }
}
}
}
--
cgit v1.1
From 5865a2b8f8bbafe6e55a91f6f716c13a0ef7adb6 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 21 Oct 2008 00:44:57 +0000
Subject: Set a default creation date on inventory and task inventory items
---
OpenSim/Framework/InventoryItemBase.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index d165d86..25cef3f 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using OpenMetaverse;
namespace OpenSim.Framework
@@ -236,5 +237,10 @@ namespace OpenSim.Framework
get { return _creationDate; }
set { _creationDate = value; }
}
+
+ public InventoryItemBase()
+ {
+ _creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+ }
}
}
--
cgit v1.1
From d66f3993de49d80d1db9f139ff08485c2d7d9664 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 14 Nov 2008 18:54:38 +0000
Subject: Add group permissions to agent inventory. Contains a migration. May
contain nuts. Please back up your inventory data store. This revision changes
the interface version!! No older regions can connect to these new UGAIM, and
the new regions can't connect to the old UGAIM. Fixes a long-standing issue
of permissions loss Currently persisted on MySQL only.
---
OpenSim/Framework/InventoryItemBase.cs | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 25cef3f..cd96e01 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -75,6 +75,11 @@ namespace OpenSim.Framework
private uint _everyOnePermissions;
///
+ ///
+ ///
+ private uint _groupPermissions;
+
+ ///
/// The folder this item is contained in
///
private UUID _folder;
@@ -190,6 +195,12 @@ namespace OpenSim.Framework
set { _everyOnePermissions = value; }
}
+ public uint GroupPermissions
+ {
+ get { return _groupPermissions; }
+ set { _groupPermissions = value; }
+ }
+
public int AssetType
{
get { return _assetType; }
--
cgit v1.1
From e12981ef1be8a424a975f8976d43245de868efb9 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 11 Feb 2009 19:29:59 +0000
Subject: * Establish a common InventoryNodeBase class from InventoryItemBase
and InventoryFolderBase
---
OpenSim/Framework/InventoryItemBase.cs | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index cd96e01..ecc2d76 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework
///
/// Inventory Item - contains all the properties associated with an individual inventory piece.
///
- public class InventoryItemBase
+ public class InventoryItemBase : InventoryNodeBase
{
///
/// The UUID of the associated asset on the asset server
@@ -55,8 +55,6 @@ namespace OpenSim.Framework
///
private UUID _creator;
- private UUID _owner;
-
private uint _nextPermissions;
///
@@ -85,22 +83,11 @@ namespace OpenSim.Framework
private UUID _folder;
///
- /// A UUID containing the ID for the inventory item itself
- ///
- private UUID _id;
-
- ///
- /// The type of inventory item. (Can be slightly different to the asset type
+ /// The inventory type of the item. This is slightly different from the asset type in some situations.
///
private int _invType;
///
- /// The name of the inventory item (must be less than 64 characters)
- ///
- private string _name;
-
-
- ///
///
///
private UUID _groupID;
@@ -130,11 +117,6 @@ namespace OpenSim.Framework
///
private int _creationDate;
- public UUID ID {
- get { return _id; }
- set { _id = value; }
- }
-
public int InvType
{
get { return _invType; }
@@ -147,24 +129,12 @@ namespace OpenSim.Framework
set { _folder = value; }
}
- public UUID Owner
- {
- get { return _owner; }
- set { _owner = value; }
- }
-
public UUID Creator
{
get { return _creator; }
set { _creator = value; }
}
- public string Name
- {
- get { return _name; }
- set { _name = value; }
- }
-
public string Description
{
get { return _description; }
--
cgit v1.1
From 229b69e044ca81233f248ff623b22516136bb3c6 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 17 Feb 2009 15:39:18 +0000
Subject: * Establish InventoryArchiveSaved event for unit tests * This is done
on the inventory archiver module directly rather than Scene.EventManager -
the module seems the more appropriate location
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ecc2d76..21683c4 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
///
/// The description of the inventory item (must be less than 64 characters)
///
- private string _description;
+ private string _description = string.Empty;
///
///
--
cgit v1.1
From f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 8 Apr 2009 17:50:57 +0000
Subject: * Make it possible to store creator strings in user inventory items
as well as UUIDs * All existing functionality should be unaffected. *
Database schemas have not been changed.
---
OpenSim/Framework/InventoryItemBase.cs | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 21683c4..ae3777c 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -53,8 +53,16 @@ namespace OpenSim.Framework
///
/// The creator of this item
///
- private UUID _creator;
+ private string m_creatorId = String.Empty;
+
+ ///
+ /// The creator of this item expressed as a UUID
+ ///
+ private UUID m_creatorIdAsUuid = UUID.Zero;
+ ///
+ ///
+ ///
private uint _nextPermissions;
///
@@ -129,10 +137,27 @@ namespace OpenSim.Framework
set { _folder = value; }
}
- public UUID Creator
+ ///
+ /// The creator ID
+ ///
+ public string CreatorId
+ {
+ get { return m_creatorId; }
+ set
+ {
+ m_creatorId = value;
+
+ // For now, all IDs are UUIDs
+ UUID.TryParse(m_creatorId, out m_creatorIdAsUuid);
+ }
+ }
+
+ ///
+ /// The creator ID expressed as a UUID
+ ///
+ public UUID CreatorIdAsUuid
{
- get { return _creator; }
- set { _creator = value; }
+ get { return m_creatorIdAsUuid; }
}
public string Description
--
cgit v1.1
From 509ec2637bd178c270106725297da7f6a1180096 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 4 May 2009 15:02:14 +0000
Subject: * Refactor: Simplify InventoryFolderImpl. No functional change.
---
OpenSim/Framework/InventoryItemBase.cs | 231 +++++++++------------------------
1 file changed, 63 insertions(+), 168 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ae3777c..ce3dc63 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,219 +34,114 @@ namespace OpenSim.Framework
/// Inventory Item - contains all the properties associated with an individual inventory piece.
///
public class InventoryItemBase : InventoryNodeBase
- {
+ {
///
- /// The UUID of the associated asset on the asset server
- ///
- private UUID _assetID;
-
- ///
- /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
- ///
- private int _assetType;
+ /// The inventory type of the item. This is slightly different from the asset type in some situations.
+ ///
+ public int InvType;
///
- ///
- ///
- private uint _basePermissions;
+ /// The folder this item is contained in
+ ///
+ public UUID Folder;
- ///
+ ///
/// The creator of this item
- ///
- private string m_creatorId = String.Empty;
+ ///
+ public string CreatorId
+ {
+ get { return m_creatorId; }
+ set
+ {
+ m_creatorId = value;
+ UUID creatorIdAsUuid;
+
+ // For now, all IDs are UUIDs
+ UUID.TryParse(m_creatorId, out creatorIdAsUuid);
+ CreatorIdAsUuid = creatorIdAsUuid;
+ }
+ }
+
+ private string m_creatorId = String.Empty;
- ///
+ ///
/// The creator of this item expressed as a UUID
- ///
- private UUID m_creatorIdAsUuid = UUID.Zero;
+ ///
+ public UUID CreatorIdAsUuid { get; private set; }
///
+ /// The description of the inventory item (must be less than 64 characters)
+ ///
+ public string Description = String.Empty;
+
+ ///
///
- ///
- private uint _nextPermissions;
+ ///
+ public uint NextPermissions;
///
/// A mask containing permissions for the current owner (cannot be enforced)
- ///
- private uint _currentPermissions;
+ ///
+ public uint CurrentPermissions;
///
- /// The description of the inventory item (must be less than 64 characters)
- ///
- private string _description = string.Empty;
+ ///
+ ///
+ public uint BasePermissions;
///
///
- ///
- private uint _everyOnePermissions;
-
+ ///
+ public uint EveryOnePermissions;
+
///
///
- ///
- private uint _groupPermissions;
+ ///
+ public uint GroupPermissions;
///
- /// The folder this item is contained in
- ///
- private UUID _folder;
+ /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
+ ///
+ public int AssetType;
///
- /// The inventory type of the item. This is slightly different from the asset type in some situations.
- ///
- private int _invType;
+ /// The UUID of the associated asset on the asset server
+ ///
+ public UUID AssetID;
///
///
- ///
- private UUID _groupID;
+ ///
+ public UUID GroupID;
///
///
- ///
- private bool _groupOwned;
+ ///
+ public bool GroupOwned;
///
///
- ///
- private int _salePrice;
+ ///
+ public int SalePrice;
///
///
- ///
- private byte _saleType;
+ ///
+ public byte SaleType;
///
///
- ///
- private uint _flags;
+ ///
+ public uint Flags;
///
///
- ///
- private int _creationDate;
-
- public int InvType
- {
- get { return _invType; }
- set { _invType = value; }
- }
-
- public UUID Folder
- {
- get { return _folder; }
- set { _folder = value; }
- }
-
- ///
- /// The creator ID
- ///
- public string CreatorId
- {
- get { return m_creatorId; }
- set
- {
- m_creatorId = value;
-
- // For now, all IDs are UUIDs
- UUID.TryParse(m_creatorId, out m_creatorIdAsUuid);
- }
- }
-
- ///
- /// The creator ID expressed as a UUID
- ///
- public UUID CreatorIdAsUuid
- {
- get { return m_creatorIdAsUuid; }
- }
-
- public string Description
- {
- get { return _description; }
- set { _description = value; }
- }
-
- public uint NextPermissions
- {
- get { return _nextPermissions; }
- set { _nextPermissions = value; }
- }
-
- public uint CurrentPermissions
- {
- get { return _currentPermissions; }
- set { _currentPermissions = value; }
- }
-
- public uint BasePermissions
- {
- get { return _basePermissions; }
- set { _basePermissions = value; }
- }
-
- public uint EveryOnePermissions
- {
- get { return _everyOnePermissions; }
- set { _everyOnePermissions = value; }
- }
-
- public uint GroupPermissions
- {
- get { return _groupPermissions; }
- set { _groupPermissions = value; }
- }
-
- public int AssetType
- {
- get { return _assetType; }
- set { _assetType = value; }
- }
-
- public UUID AssetID
- {
- get { return _assetID; }
- set { _assetID = value; }
- }
-
- public UUID GroupID
- {
- get { return _groupID; }
- set { _groupID = value; }
- }
-
- public bool GroupOwned
- {
- get { return _groupOwned; }
- set { _groupOwned = value; }
- }
-
- public int SalePrice
- {
- get { return _salePrice; }
- set { _salePrice = value; }
- }
-
- public byte SaleType
- {
- get { return _saleType; }
- set { _saleType = value; }
- }
-
- public uint Flags
- {
- get { return _flags; }
- set { _flags = value; }
- }
-
- public int CreationDate
- {
- get { return _creationDate; }
- set { _creationDate = value; }
- }
+ ///
+ public int CreationDate;
public InventoryItemBase()
{
- _creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+ CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
}
}
}
--
cgit v1.1
From 257fc5515ac9cb36032c2f44f040c3620ed2f328 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 4 May 2009 15:38:36 +0000
Subject: * minor: remove some mono compiler warnings, minor cleanup
---
OpenSim/Framework/InventoryItemBase.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ce3dc63..b14ce7f 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework
///
/// Inventory Item - contains all the properties associated with an individual inventory piece.
///
- public class InventoryItemBase : InventoryNodeBase
+ public class InventoryItemBase : InventoryNodeBase, ICloneable
{
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
@@ -143,5 +143,16 @@ namespace OpenSim.Framework
{
CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
}
+
+ public object Clone()
+ {
+ InventoryItemBase clone = new InventoryItemBase();
+ clone.AssetID = AssetID;
+ clone.AssetType = AssetType;
+ clone.BasePermissions = BasePermissions;
+ clone.CreationDate = CreationDate;
+ clone.CreatorId = CreatorId;
+
+ }
}
}
--
cgit v1.1
From a61cbab799886e43749bc4d0803e579fec000f4c Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 4 May 2009 16:15:30 +0000
Subject: * Insert profile references for creators for items saved into iars
---
OpenSim/Framework/InventoryItemBase.cs | 75 +++++++++++++++-------------------
1 file changed, 32 insertions(+), 43 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index b14ce7f..29142af 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -35,14 +35,14 @@ namespace OpenSim.Framework
///
public class InventoryItemBase : InventoryNodeBase, ICloneable
{
- ///
+ ///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
- ///
+ ///
public int InvType;
- ///
+ ///
/// The folder this item is contained in
- ///
+ ///
public UUID Folder;
///
@@ -69,9 +69,9 @@ namespace OpenSim.Framework
///
public UUID CreatorIdAsUuid { get; private set; }
- ///
+ ///
/// The description of the inventory item (must be less than 64 characters)
- ///
+ ///
public string Description = String.Empty;
///
@@ -79,80 +79,69 @@ namespace OpenSim.Framework
///
public uint NextPermissions;
- ///
+ ///
/// A mask containing permissions for the current owner (cannot be enforced)
- ///
+ ///
public uint CurrentPermissions;
- ///
+ ///
///
- ///
+ ///
public uint BasePermissions;
- ///
+ ///
///
- ///
+ ///
public uint EveryOnePermissions;
- ///
+ ///
///
- ///
+ ///
public uint GroupPermissions;
- ///
+ ///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
- ///
+ ///
public int AssetType;
- ///
+ ///
/// The UUID of the associated asset on the asset server
- ///
+ ///
public UUID AssetID;
- ///
+ ///
///
- ///
+ ///
public UUID GroupID;
- ///
+ ///
///
- ///
+ ///
public bool GroupOwned;
- ///
+ ///
///
- ///
+ ///
public int SalePrice;
- ///
+ ///
///
- ///
+ ///
public byte SaleType;
- ///
+ ///
///
- ///
+ ///
public uint Flags;
- ///
+ ///
///
- ///
- public int CreationDate;
-
- public InventoryItemBase()
- {
- CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
- }
+ ///
+ public int CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
public object Clone()
{
- InventoryItemBase clone = new InventoryItemBase();
- clone.AssetID = AssetID;
- clone.AssetType = AssetType;
- clone.BasePermissions = BasePermissions;
- clone.CreationDate = CreationDate;
- clone.CreatorId = CreatorId;
-
+ return MemberwiseClone();
}
}
}
--
cgit v1.1
From ebb8111f6c414388e2877804295339550f6d0ce2 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 4 May 2009 21:17:40 +0000
Subject: Fox the InventoryItem.CreatorIdAsUuid property
---
OpenSim/Framework/InventoryItemBase.cs | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 29142af..fe1d306 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -67,7 +67,19 @@ namespace OpenSim.Framework
///
/// The creator of this item expressed as a UUID
///
- public UUID CreatorIdAsUuid { get; private set; }
+ public UUID CreatorIdAsUuid
+ {
+ get
+ {
+ UUID uuid = UUID.Zero;
+ UUID.TryParse(m_creatorId, out uuid);
+ return uuid;
+ }
+ private set
+ {
+ m_creatorId = value.ToString();
+ }
+ }
///
/// The description of the inventory item (must be less than 64 characters)
--
cgit v1.1
From 2cded6d3696fcca5b64b46ad071432c6afe38946 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 4 May 2009 21:40:19 +0000
Subject: Fix the AsUuid thingy
---
OpenSim/Framework/InventoryItemBase.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index fe1d306..b544790 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -71,16 +71,16 @@ namespace OpenSim.Framework
{
get
{
- UUID uuid = UUID.Zero;
- UUID.TryParse(m_creatorId, out uuid);
- return uuid;
+ return m_creatorIdAsUuid;
}
private set
{
- m_creatorId = value.ToString();
+ m_creatorIdAsUuid = value;
}
}
+ private UUID m_creatorIdAsUuid = UUID.Zero;
+
///
/// The description of the inventory item (must be less than 64 characters)
///
--
cgit v1.1
From 58650180887e13dd5ff7ca0533924147c8561b72 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 5 May 2009 01:36:51 +0000
Subject: Fix crash on login
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index b544790..6c54924 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Framework
{
return m_creatorIdAsUuid;
}
- private set
+ set
{
m_creatorIdAsUuid = value;
}
--
cgit v1.1
From 8ea12ad6c06ec9cce4bc470b40079546f18b61c8 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 5 May 2009 09:59:15 +0000
Subject: Add copyright header. Formatting cleanup. Ignore some generated
files.
---
OpenSim/Framework/InventoryItemBase.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 6c54924..74b504e 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework
{
m_creatorId = value;
UUID creatorIdAsUuid;
-
+
// For now, all IDs are UUIDs
UUID.TryParse(m_creatorId, out creatorIdAsUuid);
CreatorIdAsUuid = creatorIdAsUuid;
@@ -63,7 +63,7 @@ namespace OpenSim.Framework
}
private string m_creatorId = String.Empty;
-
+
///
/// The creator of this item expressed as a UUID
///
@@ -105,7 +105,7 @@ namespace OpenSim.Framework
///
///
public uint EveryOnePermissions;
-
+
///
///
///
@@ -150,10 +150,10 @@ namespace OpenSim.Framework
///
///
public int CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
-
- public object Clone()
- {
- return MemberwiseClone();
- }
+
+ public object Clone()
+ {
+ return MemberwiseClone();
+ }
}
}
--
cgit v1.1
From b6ae8b7ba7407970ee03ae9c0ebed0c08bb8a7c9 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 5 May 2009 15:23:44 +0000
Subject: * Fix http://opensimulator.org/mantis/view.php?id=3585 * Make public
variables properties instead, as there is a difference
---
OpenSim/Framework/InventoryItemBase.cs | 38 ++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 16 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 74b504e..61771ab 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -38,12 +38,12 @@ namespace OpenSim.Framework
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
///
- public int InvType;
+ public int InvType { get; set; }
///
/// The folder this item is contained in
///
- public UUID Folder;
+ public UUID Folder { get; set; }
///
/// The creator of this item
@@ -84,73 +84,79 @@ namespace OpenSim.Framework
///
/// The description of the inventory item (must be less than 64 characters)
///
- public string Description = String.Empty;
+ public string Description { get; set; }
///
///
///
- public uint NextPermissions;
+ public uint NextPermissions { get; set; }
///
/// A mask containing permissions for the current owner (cannot be enforced)
///
- public uint CurrentPermissions;
+ public uint CurrentPermissions { get; set; }
///
///
///
- public uint BasePermissions;
+ public uint BasePermissions { get; set; }
///
///
///
- public uint EveryOnePermissions;
+ public uint EveryOnePermissions { get; set; }
///
///
///
- public uint GroupPermissions;
+ public uint GroupPermissions { get; set; }
///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
///
- public int AssetType;
+ public int AssetType { get; set; }
///
/// The UUID of the associated asset on the asset server
///
- public UUID AssetID;
+ public UUID AssetID { get; set; }
///
///
///
- public UUID GroupID;
+ public UUID GroupID { get; set; }
///
///
///
- public bool GroupOwned;
+ public bool GroupOwned { get; set; }
///
///
///
- public int SalePrice;
+ public int SalePrice { get; set; }
///
///
///
- public byte SaleType;
+ public byte SaleType { get; set; }
///
///
///
- public uint Flags;
+ public uint Flags { get; set; }
///
///
///
- public int CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+ public int CreationDate { get; set; }
+ public InventoryItemBase()
+ {
+ Description = String.Empty;
+ CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+ }
+
public object Clone()
{
return MemberwiseClone();
--
cgit v1.1
From f8e0653e73932bae20f483e0ce669f1623c6ff1e Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 5 May 2009 16:45:21 +0000
Subject: * If an item creator id contains an iar loaded name, create a
temporary profile and hashed UUID to represent the user
---
OpenSim/Framework/InventoryItemBase.cs | 32 ++++++++++++--------------------
1 file changed, 12 insertions(+), 20 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 61771ab..f874de1 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -48,38 +48,30 @@ namespace OpenSim.Framework
///
/// The creator of this item
///
- public string CreatorId
- {
- get { return m_creatorId; }
- set
- {
- m_creatorId = value;
- UUID creatorIdAsUuid;
-
- // For now, all IDs are UUIDs
- UUID.TryParse(m_creatorId, out creatorIdAsUuid);
- CreatorIdAsUuid = creatorIdAsUuid;
- }
- }
-
- private string m_creatorId = String.Empty;
+ public string CreatorId { get; set; }
///
- /// The creator of this item expressed as a UUID
+ /// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
+ /// upstream code (or set by the get accessor if left unset).
///
- public UUID CreatorIdAsUuid
+ public UUID CreatorIdAsUuid
{
get
{
+ if (UUID.Zero == m_creatorIdAsUuid)
+ {
+ UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
+ }
+
return m_creatorIdAsUuid;
}
+
set
{
m_creatorIdAsUuid = value;
}
- }
-
- private UUID m_creatorIdAsUuid = UUID.Zero;
+ }
+ protected UUID m_creatorIdAsUuid = UUID.Zero;
///
/// The description of the inventory item (must be less than 64 characters)
--
cgit v1.1
From 78425e392b81f0124fe6da0366e6a189ea3b7c07 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 5 May 2009 17:09:46 +0000
Subject: * Change automatic properties back to manual get/set * Automatic
properties are only supported after .Net 2.0, causing these to fail when
building via nant on Windows (and probably visual c# 2005 too) * Hopefully
these can be used once building support in Visual C# 2005 is dropped.
---
OpenSim/Framework/InventoryItemBase.cs | 242 ++++++++++++++++++++++++++++++---
1 file changed, 220 insertions(+), 22 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index f874de1..d14ce23 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -38,17 +38,53 @@ namespace OpenSim.Framework
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
///
- public int InvType { get; set; }
+ public int InvType
+ {
+ get
+ {
+ return m_invType;
+ }
+
+ set
+ {
+ m_invType = value;
+ }
+ }
+ protected int m_invType;
///
/// The folder this item is contained in
///
- public UUID Folder { get; set; }
+ public UUID Folder
+ {
+ get
+ {
+ return m_folder;
+ }
+
+ set
+ {
+ m_folder = value;
+ }
+ }
+ protected UUID m_folder;
///
/// The creator of this item
///
- public string CreatorId { get; set; }
+ public string CreatorId
+ {
+ get
+ {
+ return m_creatorId;
+ }
+
+ set
+ {
+ m_creatorId = value;
+ }
+ }
+ protected string m_creatorId;
///
/// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
@@ -76,78 +112,240 @@ namespace OpenSim.Framework
///
/// The description of the inventory item (must be less than 64 characters)
///
- public string Description { get; set; }
+ public string Description
+ {
+ get
+ {
+ return m_description;
+ }
+
+ set
+ {
+ m_description = value;
+ }
+ }
+ protected string m_description = String.Empty;
///
///
///
- public uint NextPermissions { get; set; }
+ public uint NextPermissions
+ {
+ get
+ {
+ return m_nextPermissions;
+ }
+
+ set
+ {
+ m_nextPermissions = value;
+ }
+ }
+ protected uint m_nextPermissions;
///
/// A mask containing permissions for the current owner (cannot be enforced)
///
- public uint CurrentPermissions { get; set; }
+ public uint CurrentPermissions
+ {
+ get
+ {
+ return m_currentPermissions;
+ }
+
+ set
+ {
+ m_currentPermissions = value;
+ }
+ }
+ protected uint m_currentPermissions;
///
///
///
- public uint BasePermissions { get; set; }
+ public uint BasePermissions
+ {
+ get
+ {
+ return m_basePermissions;
+ }
+
+ set
+ {
+ m_basePermissions = value;
+ }
+ }
+ protected uint m_basePermissions;
///
///
///
- public uint EveryOnePermissions { get; set; }
+ public uint EveryOnePermissions
+ {
+ get
+ {
+ return m_everyonePermissions;
+ }
+
+ set
+ {
+ m_everyonePermissions = value;
+ }
+ }
+ protected uint m_everyonePermissions;
///
///
///
- public uint GroupPermissions { get; set; }
+ public uint GroupPermissions
+ {
+ get
+ {
+ return m_groupPermissions;
+ }
+
+ set
+ {
+ m_groupPermissions = value;
+ }
+ }
+ protected uint m_groupPermissions;
///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
///
- public int AssetType { get; set; }
+ public int AssetType
+ {
+ get
+ {
+ return m_assetType;
+ }
+
+ set
+ {
+ m_assetType = value;
+ }
+ }
+ protected int m_assetType;
///
/// The UUID of the associated asset on the asset server
///
- public UUID AssetID { get; set; }
+ public UUID AssetID
+ {
+ get
+ {
+ return m_assetID;
+ }
+
+ set
+ {
+ m_assetID = value;
+ }
+ }
+ protected UUID m_assetID;
///
///
///
- public UUID GroupID { get; set; }
+ public UUID GroupID
+ {
+ get
+ {
+ return m_groupID;
+ }
+
+ set
+ {
+ m_groupID = value;
+ }
+ }
+ protected UUID m_groupID;
///
///
///
- public bool GroupOwned { get; set; }
+ public bool GroupOwned
+ {
+ get
+ {
+ return m_groupOwned;
+ }
+
+ set
+ {
+ m_groupOwned = value;
+ }
+ }
+ protected bool m_groupOwned;
///
///
///
- public int SalePrice { get; set; }
+ public int SalePrice
+ {
+ get
+ {
+ return m_salePrice;
+ }
+
+ set
+ {
+ m_salePrice = value;
+ }
+ }
+ protected int m_salePrice;
///
///
///
- public byte SaleType { get; set; }
+ public byte SaleType
+ {
+ get
+ {
+ return m_saleType;
+ }
+
+ set
+ {
+ m_saleType = value;
+ }
+ }
+ protected byte m_saleType;
///
///
///
- public uint Flags { get; set; }
+ public uint Flags
+ {
+ get
+ {
+ return m_flags;
+ }
+
+ set
+ {
+ m_flags = value;
+ }
+ }
+ protected uint m_flags;
///
///
///
- public int CreationDate { get; set; }
-
- public InventoryItemBase()
- {
- Description = String.Empty;
- CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+ public int CreationDate
+ {
+ get
+ {
+ return m_creationDate;
+ }
+
+ set
+ {
+ m_creationDate = value;
+ }
}
+ protected int m_creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
public object Clone()
{
--
cgit v1.1
From 6b88a205d696ee175a6c90fa6a35304e53d9b1ae Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Fri, 8 May 2009 15:40:39 +0000
Subject: another possible cause of some of the inventory wierdness is the 1/2
implemented OSP resolver, and the caching of the uuid seperate from the
string that is a UUID. Change this behavior back to something that ensures
the data for the 2 is the same. Put the 2 unit tests that depend on the new
behavior into ignore state.
---
OpenSim/Framework/InventoryItemBase.cs | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index d14ce23..2968712 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -84,8 +84,8 @@ namespace OpenSim.Framework
m_creatorId = value;
}
}
- protected string m_creatorId;
+ protected string m_creatorId = UUID.Zero.ToString();
///
/// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
/// upstream code (or set by the get accessor if left unset).
@@ -94,20 +94,16 @@ namespace OpenSim.Framework
{
get
{
- if (UUID.Zero == m_creatorIdAsUuid)
- {
- UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
- }
-
- return m_creatorIdAsUuid;
+ UUID temp = UUID.Zero;
+ UUID.TryParse(CreatorId, out temp);
+ return temp;
}
set
{
- m_creatorIdAsUuid = value;
+ CreatorId = value.ToString();
}
}
- protected UUID m_creatorIdAsUuid = UUID.Zero;
///
/// The description of the inventory item (must be less than 64 characters)
--
cgit v1.1
From 582c20b1c4fb669884f0e2804487dd050f779f2b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 25 May 2009 19:54:47 +0000
Subject: * reseparate inventory item creator id and creator uuid *
unfortunately, while the client requires uuids and we want to be able to have
arbitrary string ids, these cannot be kept in sync * I think the problems
last time were due to a serialization change * So the major inteface version
has been bumped to take care of any lingering issues here. * This means that
region servers beyond this revision can only connect to similarly uptodate
grid services, and vice versa
---
OpenSim/Framework/InventoryItemBase.cs | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 2968712..cab241e 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -84,26 +84,38 @@ namespace OpenSim.Framework
m_creatorId = value;
}
}
+ protected string m_creatorId;
- protected string m_creatorId = UUID.Zero.ToString();
///
- /// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
+ /// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
+ /// for communication with the client over the Second Life protocol, since that protocol can only understand
+ /// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid
+ /// reference have to be settable separately
+ ///
+ /// Database plugins don't need to set this, it will be set by
/// upstream code (or set by the get accessor if left unset).
+ ///
+ /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
+ /// every time there was communication with a UUID-only client. This may be much more expensive.
///
public UUID CreatorIdAsUuid
{
get
{
- UUID temp = UUID.Zero;
- UUID.TryParse(CreatorId, out temp);
- return temp;
+ if (UUID.Zero == m_creatorIdAsUuid)
+ {
+ UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
+ }
+
+ return m_creatorIdAsUuid;
}
set
{
- CreatorId = value.ToString();
+ m_creatorIdAsUuid = value;
}
}
+ protected UUID m_creatorIdAsUuid = UUID.Zero;
///
/// The description of the inventory item (must be less than 64 characters)
--
cgit v1.1
From 840de6c036570d559ec6924cd8405d3f34a99fdd Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 1 Jun 2009 06:37:14 +0000
Subject: Minor: Change OpenSim to OpenSimulator in older copyright headers and
LICENSE.txt.
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index cab241e..4307fe2 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
--
cgit v1.1
From 7aa54593e0b6672979feec97b8151ed134388723 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 12 Aug 2009 20:39:48 -0700
Subject: Redirected all calls to CachedUserProfile methods to the inventory
service. Redirection of the RootFolder property is still todo. This compiles
but probably inventory will be inconsistent.
---
OpenSim/Framework/InventoryItemBase.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 4307fe2..b5bf92f 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -354,7 +354,16 @@ namespace OpenSim.Framework
}
}
protected int m_creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
-
+
+ public InventoryItemBase()
+ {
+ }
+
+ public InventoryItemBase(UUID id)
+ {
+ ID = id;
+ }
+
public object Clone()
{
return MemberwiseClone();
--
cgit v1.1
From 50056871b89be654a77310ac8cb49995dd1ee5f6 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 16 Aug 2009 19:35:14 -0700
Subject: IAvatarFactory.UpdateDatabase gets the assetID and not the object's
inworld UUID.
---
OpenSim/Framework/InventoryItemBase.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index b5bf92f..7150c82 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -364,6 +364,12 @@ namespace OpenSim.Framework
ID = id;
}
+ public InventoryItemBase(UUID id, UUID owner)
+ {
+ ID = id;
+ Owner = owner;
+ }
+
public object Clone()
{
return MemberwiseClone();
--
cgit v1.1
From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 01:00:09 +0900
Subject: Formatting cleanup.
---
OpenSim/Framework/InventoryItemBase.cs | 40 +++++++++++++++++-----------------
1 file changed, 20 insertions(+), 20 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 7150c82..aeb01e2 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,10 +34,10 @@ namespace OpenSim.Framework
/// Inventory Item - contains all the properties associated with an individual inventory piece.
///
public class InventoryItemBase : InventoryNodeBase, ICloneable
- {
+ {
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
- ///
+ ///
public int InvType
{
get
@@ -54,7 +54,7 @@ namespace OpenSim.Framework
///
/// The folder this item is contained in
- ///
+ ///
public UUID Folder
{
get
@@ -71,7 +71,7 @@ namespace OpenSim.Framework
///
/// The creator of this item
- ///
+ ///
public string CreatorId
{
get
@@ -114,7 +114,7 @@ namespace OpenSim.Framework
{
m_creatorIdAsUuid = value;
}
- }
+ }
protected UUID m_creatorIdAsUuid = UUID.Zero;
///
@@ -130,13 +130,13 @@ namespace OpenSim.Framework
set
{
m_description = value;
- }
+ }
}
protected string m_description = String.Empty;
///
///
- ///
+ ///
public uint NextPermissions
{
get
@@ -153,7 +153,7 @@ namespace OpenSim.Framework
///
/// A mask containing permissions for the current owner (cannot be enforced)
- ///
+ ///
public uint CurrentPermissions
{
get
@@ -170,7 +170,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public uint BasePermissions
{
get
@@ -187,7 +187,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public uint EveryOnePermissions
{
get
@@ -204,7 +204,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public uint GroupPermissions
{
get
@@ -221,7 +221,7 @@ namespace OpenSim.Framework
///
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
- ///
+ ///
public int AssetType
{
get
@@ -238,7 +238,7 @@ namespace OpenSim.Framework
///
/// The UUID of the associated asset on the asset server
- ///
+ ///
public UUID AssetID
{
get
@@ -255,7 +255,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public UUID GroupID
{
get
@@ -272,13 +272,13 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public bool GroupOwned
{
get
{
return m_groupOwned;
- }
+ }
set
{
@@ -289,7 +289,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public int SalePrice
{
get
@@ -306,7 +306,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public byte SaleType
{
get
@@ -323,7 +323,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public uint Flags
{
get
@@ -340,7 +340,7 @@ namespace OpenSim.Framework
///
///
- ///
+ ///
public int CreationDate
{
get
--
cgit v1.1
From c617d658dda92ad97de678d477a98c3df0659303 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 21 Nov 2010 17:19:24 -0800
Subject: Added creator info across the board -- TaskInventoryItems and
InventoryItems themselves. Tested. Seems to be working, main tests pass.
Nothing done for IARs or HG transfers yet -- this only works for OARs for the
time being. New migration in inventory table in order to make CreatorID
varchar(255).
---
OpenSim/Framework/InventoryItemBase.cs | 50 ++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index aeb01e2..ce4fc38 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -117,6 +117,56 @@ namespace OpenSim.Framework
}
protected UUID m_creatorIdAsUuid = UUID.Zero;
+ protected string m_creatorData;
+ public string CreatorData // = ;
+ {
+ get { return m_creatorData; }
+ set { m_creatorData = value; }
+ }
+
+ ///
+ /// Used by the DB layer to retrieve / store the entire user identification.
+ /// The identification can either be a simple UUID or a string of the form
+ /// uuid[;profile_url[;name]]
+ ///
+ public string CreatorIdentification
+ {
+ get
+ {
+ if (m_creatorData != null && m_creatorData != string.Empty)
+ return m_creatorId + ';' + m_creatorData;
+ else
+ return m_creatorId;
+ }
+ set
+ {
+ if ((value == null) || (value != null && value == string.Empty))
+ {
+ m_creatorData = string.Empty;
+ return;
+ }
+
+ if (!value.Contains(";")) // plain UUID
+ {
+ m_creatorId = value;
+ }
+ else // [;[;name]]
+ {
+ string name = "Unknown User";
+ string[] parts = value.Split(';');
+ if (parts.Length >= 1)
+ m_creatorId = parts[0];
+ if (parts.Length >= 2)
+ m_creatorData = parts[1];
+ if (parts.Length >= 3)
+ name = parts[2];
+
+ m_creatorData += ';' + name;
+
+ }
+ }
+ }
+
///
/// The description of the inventory item (must be less than 64 characters)
///
--
cgit v1.1
From 61a49ec4a8d6e0466d6aa8363b7012dc4e6eab9f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 23 Nov 2010 06:36:57 -0800
Subject: Initialize InventoryItemBase.creatorData properly. Could throw.
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ce4fc38..a663680 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Framework
}
protected UUID m_creatorIdAsUuid = UUID.Zero;
- protected string m_creatorData;
+ protected string m_creatorData = string.Empty;
public string CreatorData // = ;
{
get { return m_creatorData; }
--
cgit v1.1
From 392e84e55402166f5b4ec708d3338efe70a94c2e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 01:23:29 +0000
Subject: Remove unnecessary ability to directly set
InventoryItemBase.CreatorIdAsUuid
This was necessary historically but hasn't been for many years.
Can still get CreatorIdAsUuid, which is really just a UUID cached version of the string CreatorId
---
OpenSim/Framework/InventoryItemBase.cs | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index a663680..3d45e76 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -87,16 +87,7 @@ namespace OpenSim.Framework
protected string m_creatorId;
///
- /// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
- /// for communication with the client over the Second Life protocol, since that protocol can only understand
- /// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid
- /// reference have to be settable separately
- ///
- /// Database plugins don't need to set this, it will be set by
- /// upstream code (or set by the get accessor if left unset).
- ///
- /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
- /// every time there was communication with a UUID-only client. This may be much more expensive.
+ /// The CreatorId expressed as a UUID.tely
///
public UUID CreatorIdAsUuid
{
@@ -109,20 +100,18 @@ namespace OpenSim.Framework
return m_creatorIdAsUuid;
}
-
- set
- {
- m_creatorIdAsUuid = value;
- }
}
protected UUID m_creatorIdAsUuid = UUID.Zero;
- protected string m_creatorData = string.Empty;
+ ///
+ /// Extended creator information of the form ;
+ ///
public string CreatorData // = ;
{
get { return m_creatorData; }
set { m_creatorData = value; }
}
+ protected string m_creatorData = string.Empty;
///
/// Used by the DB layer to retrieve / store the entire user identification.
@@ -162,7 +151,6 @@ namespace OpenSim.Framework
name = parts[2];
m_creatorData += ';' + name;
-
}
}
}
--
cgit v1.1
From 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Nov 2013 21:45:08 +0000
Subject: refactor: replace verbose checks with String.IsNullOrEmpty where
applicable.
Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
---
OpenSim/Framework/InventoryItemBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 3d45e76..558dfd0 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Framework
{
get
{
- if (m_creatorData != null && m_creatorData != string.Empty)
+ if (!string.IsNullOrEmpty(m_creatorData))
return m_creatorId + ';' + m_creatorData;
else
return m_creatorId;
--
cgit v1.1
From edc04d4184bb9ec224b27cc7b463bec6e4e65dde Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Tue, 22 Oct 2013 09:45:18 +0300
Subject: When updating the CreatorId of an inventory item, automatically
update the CreatorIdAsUuid field as well
Resolves http://opensimulator.org/mantis/view.php?id=6933
---
OpenSim/Framework/InventoryItemBase.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 558dfd0..5761200 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -82,12 +82,15 @@ namespace OpenSim.Framework
set
{
m_creatorId = value;
+
+ if ((m_creatorId == null) || !UUID.TryParse(m_creatorId, out m_creatorIdAsUuid))
+ m_creatorIdAsUuid = UUID.Zero;
}
}
protected string m_creatorId;
///
- /// The CreatorId expressed as a UUID.tely
+ /// The CreatorId expressed as a UUID.
///
public UUID CreatorIdAsUuid
{
--
cgit v1.1
From 0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Sun, 4 May 2014 13:36:36 +0300
Subject: - When sending the "My Suitcase" folder to the client, always claim
it has Folder Type 8. (Previously we had used Folder Type -1 in one place,
and LLClientView didn't even bother changing Folder Type 100 to anything
else.)
---
OpenSim/Framework/InventoryItemBase.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 5761200..ce63ee0 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -35,6 +35,10 @@ namespace OpenSim.Framework
///
public class InventoryItemBase : InventoryNodeBase, ICloneable
{
+ public static readonly string SUITCASE_FOLDER_NAME = "My Suitcase";
+ public static readonly sbyte SUITCASE_FOLDER_TYPE = 100;
+ public static readonly sbyte SUITCASE_FOLDER_FAKE_TYPE = 8;
+
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
///
--
cgit v1.1
From 959872315f67a1a33a2bae7330749f7dd74a4774 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 8 Aug 2015 12:12:50 -0700
Subject: WARNING: massive refactor to follow libomv's latest changes regarding
inventory folders. The newest version of libomv itself is committed here.
Basically, everything that was using the AssetType enum has been combed
through; many of those uses were changed to the new FolderType enum. This
means that from now on, [new] root folders have code 8 (FolderType.Root), as
the viewers expect, as opposed to 9, which was what we had been doing. Normal
folders are as they were, -1. Also now sending folder code 100 for Suitcase
folders to viewers, with no filter. All tests pass, but fingers crossed!
---
OpenSim/Framework/InventoryItemBase.cs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
(limited to 'OpenSim/Framework/InventoryItemBase.cs')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ce63ee0..f9fd752 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,11 +34,7 @@ namespace OpenSim.Framework
/// Inventory Item - contains all the properties associated with an individual inventory piece.
///
public class InventoryItemBase : InventoryNodeBase, ICloneable
- {
- public static readonly string SUITCASE_FOLDER_NAME = "My Suitcase";
- public static readonly sbyte SUITCASE_FOLDER_TYPE = 100;
- public static readonly sbyte SUITCASE_FOLDER_FAKE_TYPE = 8;
-
+ {
///
/// The inventory type of the item. This is slightly different from the asset type in some situations.
///
--
cgit v1.1