aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-10 14:03:06 +0000
committerMelanie Thielker2009-05-10 14:03:06 +0000
commit1a910b6e1dbace70b27581c51148a8732b46de79 (patch)
treec13e58aa932b0db95ca895cd0ff1275c0014ca9f /OpenSim/Services/AssetService
parentAdd some asset cache plumbing. Change the generic cache from UUID to string (diff)
downloadopensim-SC-1a910b6e1dbace70b27581c51148a8732b46de79.zip
opensim-SC-1a910b6e1dbace70b27581c51148a8732b46de79.tar.gz
opensim-SC-1a910b6e1dbace70b27581c51148a8732b46de79.tar.bz2
opensim-SC-1a910b6e1dbace70b27581c51148a8732b46de79.tar.xz
Connect up the new asset cache and introduce an asynchronous call path
for asset retrieval (full asset only) to ease migration to the new system
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index c279699..1e038d4 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -94,6 +94,20 @@ namespace OpenSim.Services.AssetService
94 return asset.Data; 94 return asset.Data;
95 } 95 }
96 96
97 public bool Get(string id, Object sender, AssetRetrieved handler)
98 {
99 UUID assetID;
100
101 if (!UUID.TryParse(id, out assetID))
102 return false;
103
104 AssetBase asset = m_Database.FetchAsset(assetID);
105
106 handler(id, sender, asset);
107
108 return true;
109 }
110
97 public string Store(AssetBase asset) 111 public string Store(AssetBase asset)
98 { 112 {
99 m_Database.CreateAsset(asset); 113 m_Database.CreateAsset(asset);