From cc2b072f6e9f535dfad79e79d778177a5aa90890 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 9 May 2009 01:00:21 +0000 Subject: FInish basic asset server functionality on the new asset server --- OpenSim/Services/AssetService/AssetService.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/AssetService') diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index d6e5141..c279699 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -74,17 +74,31 @@ namespace OpenSim.Services.AssetService public AssetMetadata GetMetadata(string id) { - return null; + UUID assetID; + + if (!UUID.TryParse(id, out assetID)) + return null; + + AssetBase asset = m_Database.FetchAsset(assetID); + return asset.Metadata; } public byte[] GetData(string id) { - return null; + UUID assetID; + + if (!UUID.TryParse(id, out assetID)) + return null; + + AssetBase asset = m_Database.FetchAsset(assetID); + return asset.Data; } public string Store(AssetBase asset) { - return String.Empty; + m_Database.CreateAsset(asset); + + return asset.ID; } public bool UpdateContent(string id, byte[] data) -- cgit v1.1