aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 600295f..5eb42f7 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -34,6 +34,7 @@ using log4net;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Framework.Scenes.Serialization; 36using OpenSim.Region.Framework.Scenes.Serialization;
37using OpenSim.Services.Interfaces;
37 38
38namespace OpenSim.Region.Framework.Scenes 39namespace OpenSim.Region.Framework.Scenes
39{ 40{
@@ -52,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes
52 /// <summary> 53 /// <summary>
53 /// Asset cache used for gathering assets 54 /// Asset cache used for gathering assets
54 /// </summary> 55 /// </summary>
55 protected IAssetCache m_assetCache; 56 protected IAssetService m_assetCache;
56 57
57 /// <summary> 58 /// <summary>
58 /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate 59 /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate
@@ -65,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes
65 /// </summary> 66 /// </summary>
66 protected bool m_waitingForObjectAsset; 67 protected bool m_waitingForObjectAsset;
67 68
68 public UuidGatherer(IAssetCache assetCache) 69 public UuidGatherer(IAssetService assetCache)
69 { 70 {
70 m_assetCache = assetCache; 71 m_assetCache = assetCache;
71 } 72 }
@@ -174,6 +175,12 @@ namespace OpenSim.Region.Framework.Scenes
174 } 175 }
175 } 176 }
176 177
178 protected void AssetReceived(string id, Object sender, AssetBase asset)
179 {
180 if (asset != null)
181 AssetRequestCallback(asset.FullID, asset);
182 }
183
177 /// <summary> 184 /// <summary>
178 /// Get an asset synchronously, potentially using an asynchronous callback. If the 185 /// Get an asset synchronously, potentially using an asynchronous callback. If the
179 /// asynchronous callback is used, we will wait for it to complete. 186 /// asynchronous callback is used, we will wait for it to complete.
@@ -183,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes
183 protected AssetBase GetAsset(UUID uuid) 190 protected AssetBase GetAsset(UUID uuid)
184 { 191 {
185 m_waitingForObjectAsset = true; 192 m_waitingForObjectAsset = true;
186 m_assetCache.GetAsset(uuid, AssetRequestCallback, true); 193 m_assetCache.Get(uuid.ToString(), this, AssetReceived);
187 194
188 // The asset cache callback can either 195 // The asset cache callback can either
189 // 196 //