- asset server functionality works with OpenSim's HttpServer

- start of removal of AssetInventoryServer.Metadata class
This commit is contained in:
Mike Mazur
2009-02-16 02:27:25 +00:00
parent 07b8d51da8
commit f8ea274090
5 changed files with 38 additions and 108 deletions

View File

@@ -95,10 +95,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
return ret;
}
public BackendResponse TryFetchDataMetadata(UUID assetID, out Metadata metadata, out byte[] assetData)
public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
{
metadata = null;
assetData = null;
Metadata metadata = null;
byte[] assetData = null;
string filename;
BackendResponse ret;
@@ -121,6 +121,16 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
ret = BackendResponse.NotFound;
}
asset = new AssetBase();
asset.Data = assetData;
asset.Metadata.FullID = metadata.ID;
asset.Metadata.Name = metadata.Name;
asset.Metadata.Description = metadata.Description;
asset.Metadata.CreationDate = metadata.CreationDate;
asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType);
asset.Metadata.Local = false;
asset.Metadata.Temporary = metadata.Temporary;
server.MetricsProvider.LogAssetMetadataFetch(EXTENSION_NAME, ret, assetID, DateTime.Now);
server.MetricsProvider.LogAssetDataFetch(EXTENSION_NAME, ret, assetID, (assetData != null ? assetData.Length : 0), DateTime.Now);
return ret;