aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs
diff options
context:
space:
mode:
authordiva2009-05-23 17:51:13 +0000
committerdiva2009-05-23 17:51:13 +0000
commitfb6d314d4db0a157799a1d49a5f467f1c051ec9b (patch)
tree3a5f7c8d3f91722d6a32ee85b7031dfb4c2de6b0 /OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs
parentAdded one missing config var for HG standalones. (diff)
downloadopensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.zip
opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.gz
opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.bz2
opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.xz
This should make HG asset transfers work much better. It now uses HGUuidGatherer, which is a subclass of UuidGatherer. Hence, on-line HG asset transfers use exactly the same UUID collection code as save oar/xml. If it doesn't work, it's Justin's fault :D
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs
new file mode 100644
index 0000000..e83478d
--- /dev/null
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs
@@ -0,0 +1,29 @@
1using System;
2using System.Collections.Generic;
3
4using OpenSim.Framework;
5using OpenSim.Services.Interfaces;
6using OpenMetaverse;
7
8namespace OpenSim.Region.Framework.Scenes.Hypergrid
9{
10 public class HGUuidGatherer : UuidGatherer
11 {
12 protected string m_assetServerURL;
13 protected HGAssetMapper m_assetMapper;
14
15 public HGUuidGatherer(HGAssetMapper assMap, IAssetService assetCache, string assetServerURL) : base(assetCache)
16 {
17 m_assetMapper = assMap;
18 m_assetServerURL = assetServerURL;
19 }
20
21 protected override AssetBase GetAsset(UUID uuid)
22 {
23 if (string.Empty == m_assetServerURL)
24 return m_assetCache.Get(uuid.ToString());
25 else
26 return m_assetMapper.FetchAsset(m_assetServerURL, uuid);
27 }
28 }
29}