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 --- .../Plugins/OpenSim/OpenSimAssetStoragePlugin.cs | 2 +- .../Plugins/Simple/SimpleAssetStoragePlugin.cs | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'OpenSim/Grid/AssetInventoryServer/Plugins') diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs index 8fa8474..dcacab2 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs @@ -61,7 +61,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim if (asset == null) ret = BackendResponse.NotFound; else { - metadata = asset.Metadata; + metadata = asset.getMetadata(); ret = BackendResponse.Success; } diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs index e7e898b..890a6a0 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs @@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) { asset = new AssetBase(); - AssetMetadata metadata = asset.Metadata; + AssetMetadata metadata = asset.getMetadata(); string filename; BackendResponse ret; @@ -116,8 +116,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple ret = BackendResponse.Failure; } - asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(asset.Metadata.ContentType); - asset.Metadata.Local = false; + asset.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType); + asset.Local = false; } else { @@ -139,11 +139,12 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple public BackendResponse TryCreateAsset(AssetBase asset) { BackendResponse ret; + AssetMetadata metadata = asset.getMetadata(); string path; - string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(asset.Metadata.ContentType)); + string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType)); - if (asset.Metadata.Temporary) + if (asset.Temporary) path = Path.Combine(TEMP_DATA_DIR, filename); else path = Path.Combine(DEFAULT_DATA_DIR, filename); @@ -154,10 +155,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple lock (filenames) filenames[asset.FullID] = path; // Set the creation date to right now - asset.Metadata.CreationDate = DateTime.Now; + metadata.CreationDate = DateTime.Now; lock (metadataStorage) - metadataStorage[asset.FullID] = asset.Metadata; + metadataStorage[asset.FullID] = metadata; ret = BackendResponse.Success; } -- cgit v1.1