diff options
author | Mike Mazur | 2009-02-17 01:36:44 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-17 01:36:44 +0000 |
commit | 76c0935ec744f2d230489398f879eb7f42b11d37 (patch) | |
tree | a68253554e3899f10b6c341db369ce4a029dfaa5 /OpenSim/Grid | |
parent | Major change to how appearance is managed, including changes in login and use... (diff) | |
download | opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.zip opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.gz opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.bz2 opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.xz |
- 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
Diffstat (limited to 'OpenSim/Grid')
3 files changed, 10 insertions, 9 deletions
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 | |||
61 | if (asset == null) ret = BackendResponse.NotFound; | 61 | if (asset == null) ret = BackendResponse.NotFound; |
62 | else | 62 | else |
63 | { | 63 | { |
64 | metadata = asset.Metadata; | 64 | metadata = asset.getMetadata(); |
65 | ret = BackendResponse.Success; | 65 | ret = BackendResponse.Success; |
66 | } | 66 | } |
67 | 67 | ||
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 | |||
97 | public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) | 97 | public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) |
98 | { | 98 | { |
99 | asset = new AssetBase(); | 99 | asset = new AssetBase(); |
100 | AssetMetadata metadata = asset.Metadata; | 100 | AssetMetadata metadata = asset.getMetadata(); |
101 | 101 | ||
102 | string filename; | 102 | string filename; |
103 | BackendResponse ret; | 103 | BackendResponse ret; |
@@ -116,8 +116,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple | |||
116 | ret = BackendResponse.Failure; | 116 | ret = BackendResponse.Failure; |
117 | } | 117 | } |
118 | 118 | ||
119 | asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(asset.Metadata.ContentType); | 119 | asset.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType); |
120 | asset.Metadata.Local = false; | 120 | asset.Local = false; |
121 | } | 121 | } |
122 | else | 122 | else |
123 | { | 123 | { |
@@ -139,11 +139,12 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple | |||
139 | public BackendResponse TryCreateAsset(AssetBase asset) | 139 | public BackendResponse TryCreateAsset(AssetBase asset) |
140 | { | 140 | { |
141 | BackendResponse ret; | 141 | BackendResponse ret; |
142 | AssetMetadata metadata = asset.getMetadata(); | ||
142 | 143 | ||
143 | string path; | 144 | string path; |
144 | string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(asset.Metadata.ContentType)); | 145 | string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType)); |
145 | 146 | ||
146 | if (asset.Metadata.Temporary) | 147 | if (asset.Temporary) |
147 | path = Path.Combine(TEMP_DATA_DIR, filename); | 148 | path = Path.Combine(TEMP_DATA_DIR, filename); |
148 | else | 149 | else |
149 | path = Path.Combine(DEFAULT_DATA_DIR, filename); | 150 | path = Path.Combine(DEFAULT_DATA_DIR, filename); |
@@ -154,10 +155,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple | |||
154 | lock (filenames) filenames[asset.FullID] = path; | 155 | lock (filenames) filenames[asset.FullID] = path; |
155 | 156 | ||
156 | // Set the creation date to right now | 157 | // Set the creation date to right now |
157 | asset.Metadata.CreationDate = DateTime.Now; | 158 | metadata.CreationDate = DateTime.Now; |
158 | 159 | ||
159 | lock (metadataStorage) | 160 | lock (metadataStorage) |
160 | metadataStorage[asset.FullID] = asset.Metadata; | 161 | metadataStorage[asset.FullID] = metadata; |
161 | 162 | ||
162 | ret = BackendResponse.Success; | 163 | ret = BackendResponse.Success; |
163 | } | 164 | } |
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index ba62c55..1e01c44 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Grid.AssetServer | |||
140 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); | 140 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); |
141 | AssetBase asset = (AssetBase) xs.Deserialize(request); | 141 | AssetBase asset = (AssetBase) xs.Deserialize(request); |
142 | 142 | ||
143 | m_log.InfoFormat("[REST]: Creating asset {0}", asset.Metadata.FullID); | 143 | m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID); |
144 | m_assetProvider.CreateAsset(asset); | 144 | m_assetProvider.CreateAsset(asset); |
145 | 145 | ||
146 | return new byte[] {}; | 146 | return new byte[] {}; |