From 76c0935ec744f2d230489398f879eb7f42b11d37 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 17 Feb 2009 01:36:44 +0000 Subject: - remove the Metadata property from AssetBase and return all previous properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit --- .../CoreModules/World/Archiver/ArchiveReadRequest.cs | 2 +- .../Region/CoreModules/World/Archiver/AssetsArchiver.cs | 16 ++++++++-------- .../CoreModules/World/Archiver/AssetsDearchiver.cs | 4 ++-- .../CoreModules/World/Estate/EstateTerrainXferHandler.cs | 16 ++++++++-------- .../Region/CoreModules/World/WorldMap/WorldMapModule.cs | 10 +++++----- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 66fc43b..d7ab5fd 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); AssetBase asset = new AssetBase(new UUID(uuid), String.Empty); - asset.Metadata.Type = assetType; + asset.Type = assetType; asset.Data = data; m_scene.CommsManager.AssetCache.AddAsset(asset); diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs index b3286f6..abd90de 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs @@ -86,16 +86,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver string extension = string.Empty; - if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Metadata.Type)) + if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Type)) { - extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Metadata.Type]; + extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Type]; } xtw.WriteElementString("filename", uuid.ToString() + extension); - xtw.WriteElementString("name", asset.Metadata.Name); - xtw.WriteElementString("description", asset.Metadata.Description); - xtw.WriteElementString("asset-type", asset.Metadata.Type.ToString()); + xtw.WriteElementString("name", asset.Name); + xtw.WriteElementString("description", asset.Description); + xtw.WriteElementString("asset-type", asset.Type.ToString()); xtw.WriteEndElement(); } @@ -123,15 +123,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver string extension = string.Empty; - if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Metadata.Type)) + if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Type)) { - extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Metadata.Type]; + extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Type]; } else { m_log.ErrorFormat( "[ARCHIVER]: Unrecognized asset type {0} with uuid {1}. This asset will be saved but not reloaded", - asset.Metadata.Type, asset.Metadata.ID); + asset.Type, asset.ID); } archive.AddFile( diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 743f9a1..cb267d7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs @@ -157,8 +157,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); AssetBase asset = new AssetBase(new UUID(filename), metadata.Name); - asset.Metadata.Description = metadata.Description; - asset.Metadata.Type = metadata.AssetType; + asset.Description = metadata.Description; + asset.Type = metadata.AssetType; asset.Data = data; m_cache.AddAsset(asset); diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs index 1f2d5db..93e79f0 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs @@ -54,13 +54,13 @@ namespace OpenSim.Region.CoreModules.World.Estate { m_asset = new AssetBase(); - m_asset.Metadata.FullID = UUID.Zero; - m_asset.Metadata.Type = type; + m_asset.FullID = UUID.Zero; + m_asset.Type = type; m_asset.Data = new byte[0]; - m_asset.Metadata.Name = pClientFilename; - m_asset.Metadata.Description = "empty"; - m_asset.Metadata.Local = true; - m_asset.Metadata.Temporary = true; + m_asset.Name = pClientFilename; + m_asset.Description = "empty"; + m_asset.Local = true; + m_asset.Temporary = true; } @@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.World.Estate public void RequestStartXfer(IClientAPI pRemoteClient) { mXferID = Util.GetNextXferID(); - pRemoteClient.SendXferRequest(mXferID, m_asset.Metadata.Type, m_asset.Metadata.FullID, 0, Utils.StringToBytes(m_asset.Metadata.Name)); + pRemoteClient.SendXferRequest(mXferID, m_asset.Type, m_asset.FullID, 0, Utils.StringToBytes(m_asset.Name)); } /// @@ -114,7 +114,7 @@ namespace OpenSim.Region.CoreModules.World.Estate handlerTerrainUploadDone = TerrainUploadDone; if (handlerTerrainUploadDone != null) { - handlerTerrainUploadDone(m_asset.Metadata.Name, m_asset.Data, remoteClient); + handlerTerrainUploadDone(m_asset.Name, m_asset.Data, remoteClient); } } } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index e1c3d85..4f98e8b 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -985,14 +985,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap m_scene.RegionInfo.RegionSettings.TerrainImageID = TerrainImageUUID; AssetBase asset = new AssetBase(); - asset.Metadata.FullID = m_scene.RegionInfo.RegionSettings.TerrainImageID; + asset.FullID = m_scene.RegionInfo.RegionSettings.TerrainImageID; asset.Data = data; - asset.Metadata.Name + asset.Name = "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); - asset.Metadata.Description = m_scene.RegionInfo.RegionName; + asset.Description = m_scene.RegionInfo.RegionName; - asset.Metadata.Type = 0; - asset.Metadata.Temporary = temporary; + asset.Type = 0; + asset.Temporary = temporary; m_scene.CommsManager.AssetCache.AddAsset(asset); } -- cgit v1.1