[Opensim-dev] [Opensim-commits] r9396 - in trunk/OpenSim: Framework Framework/Communications/Cache Region/CoreModules/Agent/TextureSender Region/CoreModules/Avatar/Inventory/Archiver

Mikko Pallari mikko.pallari at adminotech.com
Tue May 5 06:36:44 UTC 2009


Hi,

Was there some particular reason why were the getters and setters removed from InventoryItemBase? This had a functional change. It caused NHibernate module not to work.

Cheers,
Mikko


-----Original Message-----
From: opensim-commits-bounces at lists.berlios.de [mailto:opensim-commits-bounces at lists.berlios.de] On Behalf Of justincc at opensimulator.org
Sent: 4. toukokuuta 2009 18:02
To: opensim-commits at lists.berlios.de
Subject: [Opensim-commits] r9396 - in trunk/OpenSim: Framework Framework/Communications/Cache Region/CoreModules/Agent/TextureSender Region/CoreModules/Avatar/Inventory/Archiver

Author: justincc
Date: 2009-05-04 08:02:14 -0700 (Mon, 04 May 2009)
New Revision: 9396

Modified:
   trunk/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
   trunk/OpenSim/Framework/InventoryItemBase.cs
   trunk/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
   trunk/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
Log:
* Refactor: Simplify InventoryFolderImpl.  No functional change.


Modified: trunk/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
===================================================================
--- trunk/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs 2009-05-04 14:25:19 UTC (rev 9395)
+++ trunk/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs 2009-05-04 15:02:14 UTC (rev 9396)
@@ -396,7 +396,7 @@
         }

         /// <summary>
-        /// Return a copy of the list of child items in this folder
+        /// Return a copy of the list of child items in this folder.  The items themselves are the originals.
         /// </summary>
         public List<InventoryItemBase> RequestListOfItems()
         {
@@ -416,7 +416,7 @@
         }

         /// <summary>
-        /// Return a copy of the list of child folders in this folder.
+        /// Return a copy of the list of child folders in this folder.  The folders themselves are the originals.
         /// </summary>
         public List<InventoryFolderBase> RequestListOfFolders()
         {

Modified: trunk/OpenSim/Framework/InventoryItemBase.cs
===================================================================
--- trunk/OpenSim/Framework/InventoryItemBase.cs        2009-05-04 14:25:19 UTC (rev 9395)
+++ trunk/OpenSim/Framework/InventoryItemBase.cs        2009-05-04 15:02:14 UTC (rev 9396)
@@ -34,219 +34,114 @@
     /// Inventory Item - contains all the properties associated with an individual inventory piece.
     /// </summary>
     public class InventoryItemBase : InventoryNodeBase
-    {
+    {
         /// <summary>
-        /// The UUID of the associated asset on the asset server
-        /// </summary>
-        private UUID _assetID;
+        /// The inventory type of the item.  This is slightly different from the asset type in some situations.
+        /// </summary>
+        public int InvType;

         /// <summary>
-        /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
-        /// </summary>
-        private int _assetType;
+        /// The folder this item is contained in
+        /// </summary>
+        public UUID Folder;

-        /// <summary>
-        ///
-        /// </summary>
-        private uint _basePermissions;
-
-        /// <summary>
+        /// <value>
         /// The creator of this item
-        /// </summary>
-        private string m_creatorId = String.Empty;
+        /// </value>
+        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;

-        /// <summary>
+        /// <value>
         /// The creator of this item expressed as a UUID
-        /// </summary>
-        private UUID m_creatorIdAsUuid = UUID.Zero;
+        /// </value>
+        public UUID CreatorIdAsUuid { get; private set; }

         /// <summary>
+        /// The description of the inventory item (must be less than 64 characters)
+        /// </summary>
+        public string Description = String.Empty;
+
+        /// <value>
         ///
-        /// </summary>
-        private uint _nextPermissions;
+        /// </value>
+        public uint NextPermissions;

         /// <summary>
         /// A mask containing permissions for the current owner (cannot be enforced)
-        /// </summary>
-        private uint _currentPermissions;
+        /// </summary>
+        public uint CurrentPermissions;

         /// <summary>
-        /// The description of the inventory item (must be less than 64 characters)
-        /// </summary>
-        private string _description = string.Empty;
+        ///
+        /// </summary>
+        public uint BasePermissions;

         /// <summary>
         ///
-        /// </summary>
-        private uint _everyOnePermissions;
-
+        /// </summary>
+        public uint EveryOnePermissions;
+
         /// <summary>
         ///
-        /// </summary>
-        private uint _groupPermissions;
+        /// </summary>
+        public uint GroupPermissions;

         /// <summary>
-        /// The folder this item is contained in
-        /// </summary>
-        private UUID _folder;
+        /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
+        /// </summary>
+        public int AssetType;

         /// <summary>
-        /// The inventory type of the item.  This is slightly different from the asset type in some situations.
-        /// </summary>
-        private int _invType;
+        /// The UUID of the associated asset on the asset server
+        /// </summary>
+        public UUID AssetID;

         /// <summary>
         ///
-        /// </summary>
-        private UUID _groupID;
+        /// </summary>
+        public UUID GroupID;

         /// <summary>
         ///
-        /// </summary>
-        private bool _groupOwned;
+        /// </summary>
+        public bool GroupOwned;

         /// <summary>
         ///
-        /// </summary>
-        private int _salePrice;
+        /// </summary>
+        public int SalePrice;

         /// <summary>
         ///
-        /// </summary>
-        private byte _saleType;
+        /// </summary>
+        public byte SaleType;

         /// <summary>
         ///
-        /// </summary>
-        private uint _flags;
+        /// </summary>
+        public uint Flags;

         /// <summary>
         ///
-        /// </summary>
-        private int _creationDate;
-
-        public int InvType
-        {
-            get { return _invType; }
-            set { _invType = value; }
-        }
-
-        public UUID Folder
-        {
-            get { return _folder; }
-            set { _folder = value; }
-        }
-
-        /// <value>
-        /// The creator ID
-        /// </value>
-        public string CreatorId
-        {
-            get { return m_creatorId; }
-            set
-            {
-                m_creatorId = value;
-
-                // For now, all IDs are UUIDs
-                UUID.TryParse(m_creatorId, out m_creatorIdAsUuid);
-            }
-        }
+        /// </summary>
+        public int CreationDate;

-        /// <value>
-        /// The creator ID expressed as a UUID
-        /// </value>
-        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 InventoryItemBase()
         {
-            _creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+            CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
         }
     }
 }

Modified: trunk/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
===================================================================
--- trunk/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs    2009-05-04 14:25:19 UTC (rev 9395)
+++ trunk/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs    2009-05-04 15:02:14 UTC (rev 9396)
@@ -325,17 +325,14 @@

             }

-
             // Cache Decoded layers
             lock (m_cacheddecode)
             {
                 if (!m_cacheddecode.ContainsKey(AssetId))
                     m_cacheddecode.Add(AssetId, layers);

-            }
+            }

-
-
             // Notify Interested Parties
             lock (m_notifyList)
             {
@@ -371,7 +368,6 @@
             {
                 Createj2KCacheFolder(pFolder);
             }
-
         }

         /// <summary>

Modified: trunk/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
===================================================================
--- trunk/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs  2009-05-04 14:25:19 UTC (rev 9395)
+++ trunk/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs  2009-05-04 15:02:14 UTC (rev 9396)
@@ -126,11 +126,9 @@
             string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID);
             string serialization = UserInventoryItemSerializer.Serialize(inventoryItem);
             m_archive.WriteFile(filename, serialization);
-
-            UUID creatorId = inventoryItem.CreatorIdAsUuid;

-            // Record the creator of this item
-            m_userUuids[creatorId] = 1;
+            // Record the creator of this item for user record purposes (which might go away soon)
+            m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;

             m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids);
         }

_______________________________________________
Opensim-commits mailing list
Opensim-commits at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-commits



More information about the Opensim-dev mailing list