aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs')
-rw-r--r--OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
index 3a692ae..95ef484 100644
--- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
+++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
@@ -37,10 +37,12 @@ namespace OpenSim.Framework.Communications.Osp
37 public class OspInventoryWrapperPlugin : IInventoryDataPlugin 37 public class OspInventoryWrapperPlugin : IInventoryDataPlugin
38 { 38 {
39 protected IInventoryDataPlugin m_wrappedPlugin; 39 protected IInventoryDataPlugin m_wrappedPlugin;
40 protected CommunicationsManager m_commsManager;
40 41
41 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin) 42 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, CommunicationsManager commsManager)
42 { 43 {
43 m_wrappedPlugin = wrappedPlugin; 44 m_wrappedPlugin = wrappedPlugin;
45 m_commsManager = commsManager;
44 } 46 }
45 47
46 public string Name { get { return "OspInventoryWrapperPlugin"; } } 48 public string Name { get { return "OspInventoryWrapperPlugin"; } }
@@ -51,24 +53,23 @@ namespace OpenSim.Framework.Communications.Osp
51 53
52 public InventoryItemBase getInventoryItem(UUID item) 54 public InventoryItemBase getInventoryItem(UUID item)
53 { 55 {
54 return m_wrappedPlugin.getInventoryItem(item); 56 return PostProcessItem(m_wrappedPlugin.getInventoryItem(item));
55
56 // TODO: Need to post process here
57 } 57 }
58 58
59 // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem? 59 // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem?
60 public InventoryItemBase queryInventoryItem(UUID item) 60 public InventoryItemBase queryInventoryItem(UUID item)
61 { 61 {
62 return m_wrappedPlugin.queryInventoryItem(item); 62 return PostProcessItem(m_wrappedPlugin.queryInventoryItem(item));
63
64 // TODO: Need to post process here
65 } 63 }
66 64
67 public List<InventoryItemBase> getInventoryInFolder(UUID folderID) 65 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
68 { 66 {
69 return m_wrappedPlugin.getInventoryInFolder(folderID); 67 List<InventoryItemBase> items = m_wrappedPlugin.getInventoryInFolder(folderID);
70 68
71 // TODO: Need to post process here 69 foreach (InventoryItemBase item in items)
70 PostProcessItem(item);
71
72 return items;
72 } 73 }
73 74
74 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) 75 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
@@ -77,6 +78,12 @@ namespace OpenSim.Framework.Communications.Osp
77 78
78 // Presuming that no post processing is needed here as gestures don't refer to creator information (?) 79 // Presuming that no post processing is needed here as gestures don't refer to creator information (?)
79 } 80 }
81
82 protected InventoryItemBase PostProcessItem(InventoryItemBase item)
83 {
84 item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
85 return item;
86 }
80 87
81 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } 88 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }
82 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); } 89 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); }