aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-09 01:00:21 +0000
committerMelanie Thielker2009-05-09 01:00:21 +0000
commitcc2b072f6e9f535dfad79e79d778177a5aa90890 (patch)
tree54ac19fef6442bd5e7b648dceb7ff3e22a7698ff /OpenSim/Services/AssetService
parentAdd the /data and /metadata retrieval modes to the new asset server. (diff)
downloadopensim-SC_OLD-cc2b072f6e9f535dfad79e79d778177a5aa90890.zip
opensim-SC_OLD-cc2b072f6e9f535dfad79e79d778177a5aa90890.tar.gz
opensim-SC_OLD-cc2b072f6e9f535dfad79e79d778177a5aa90890.tar.bz2
opensim-SC_OLD-cc2b072f6e9f535dfad79e79d778177a5aa90890.tar.xz
FInish basic asset server functionality on the new asset server
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs20
1 files changed, 17 insertions, 3 deletions
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
74 74
75 public AssetMetadata GetMetadata(string id) 75 public AssetMetadata GetMetadata(string id)
76 { 76 {
77 return null; 77 UUID assetID;
78
79 if (!UUID.TryParse(id, out assetID))
80 return null;
81
82 AssetBase asset = m_Database.FetchAsset(assetID);
83 return asset.Metadata;
78 } 84 }
79 85
80 public byte[] GetData(string id) 86 public byte[] GetData(string id)
81 { 87 {
82 return null; 88 UUID assetID;
89
90 if (!UUID.TryParse(id, out assetID))
91 return null;
92
93 AssetBase asset = m_Database.FetchAsset(assetID);
94 return asset.Data;
83 } 95 }
84 96
85 public string Store(AssetBase asset) 97 public string Store(AssetBase asset)
86 { 98 {
87 return String.Empty; 99 m_Database.CreateAsset(asset);
100
101 return asset.ID;
88 } 102 }
89 103
90 public bool UpdateContent(string id, byte[] data) 104 public bool UpdateContent(string id, byte[] data)