diff options
author | Justin Clarke Casey | 2009-05-05 16:45:21 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-05-05 16:45:21 +0000 |
commit | f8e0653e73932bae20f483e0ce669f1623c6ff1e (patch) | |
tree | 9fc902fc17567755bad28f0f6d88b7089c0365e1 /OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs | |
parent | - moving banned check and public/private check to (diff) | |
download | opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.zip opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.gz opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.bz2 opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.xz |
* If an item creator id contains an iar loaded name, create a temporary profile and hashed UUID to represent the user
Diffstat (limited to 'OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs | 25 |
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); } |