aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-05-04 18:32:01 +0000
committerJustin Clarke Casey2009-05-04 18:32:01 +0000
commit780f57d5514ec27014171bc4b920db9accf2639a (patch)
tree06a774c3e4b9c54c2feb7fb4dfa34c128238b7e5 /OpenSim/Framework
parent* refactor: move OspResolver to a different namespace (diff)
downloadopensim-SC-780f57d5514ec27014171bc4b920db9accf2639a.zip
opensim-SC-780f57d5514ec27014171bc4b920db9accf2639a.tar.gz
opensim-SC-780f57d5514ec27014171bc4b920db9accf2639a.tar.bz2
opensim-SC-780f57d5514ec27014171bc4b920db9accf2639a.tar.xz
* Initial infrastructure for ospa only uuid hashing of retrieved inventory items
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs2
-rw-r--r--OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs95
2 files changed, 96 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 0909a52..010429d 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework.Communications
67 public void AddPlugin(string provider, string connect) 67 public void AddPlugin(string provider, string connect)
68 { 68 {
69 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(provider, connect)); 69 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(provider, connect));
70 } 70 }
71 71
72 #endregion 72 #endregion
73 73
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
new file mode 100644
index 0000000..3a692ae
--- /dev/null
+++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
@@ -0,0 +1,95 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using OpenSim.Data;
30using OpenMetaverse;
31
32namespace OpenSim.Framework.Communications.Osp
33{
34 /// <summary>
35 /// Wrap other inventory data plugins so that we can perform OSP related post processing for items
36 /// </summary>
37 public class OspInventoryWrapperPlugin : IInventoryDataPlugin
38 {
39 protected IInventoryDataPlugin m_wrappedPlugin;
40
41 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin)
42 {
43 m_wrappedPlugin = wrappedPlugin;
44 }
45
46 public string Name { get { return "OspInventoryWrapperPlugin"; } }
47 public string Version { get { return "0.1"; } }
48 public void Initialise() {}
49 public void Initialise(string connect) {}
50 public void Dispose() {}
51
52 public InventoryItemBase getInventoryItem(UUID item)
53 {
54 return m_wrappedPlugin.getInventoryItem(item);
55
56 // TODO: Need to post process here
57 }
58
59 // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem?
60 public InventoryItemBase queryInventoryItem(UUID item)
61 {
62 return m_wrappedPlugin.queryInventoryItem(item);
63
64 // TODO: Need to post process here
65 }
66
67 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
68 {
69 return m_wrappedPlugin.getInventoryInFolder(folderID);
70
71 // TODO: Need to post process here
72 }
73
74 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
75 {
76 return m_wrappedPlugin.fetchActiveGestures(avatarID);
77
78 // Presuming that no post processing is needed here as gestures don't refer to creator information (?)
79 }
80
81 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }
82 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); }
83 public InventoryFolderBase getUserRootFolder(UUID user) { return m_wrappedPlugin.getUserRootFolder(user); }
84 public List<InventoryFolderBase> getInventoryFolders(UUID parentID) { return m_wrappedPlugin.getInventoryFolders(parentID); }
85 public InventoryFolderBase getInventoryFolder(UUID folder) { return m_wrappedPlugin.getInventoryFolder(folder); }
86 public void addInventoryItem(InventoryItemBase item) { m_wrappedPlugin.addInventoryItem(item); }
87 public void updateInventoryItem(InventoryItemBase item) { m_wrappedPlugin.updateInventoryItem(item); }
88 public void deleteInventoryItem(UUID item) { m_wrappedPlugin.deleteInventoryItem(item); }
89 public InventoryFolderBase queryInventoryFolder(UUID folder) { return m_wrappedPlugin.queryInventoryFolder(folder); }
90 public void addInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.addInventoryFolder(folder); }
91 public void updateInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.updateInventoryFolder(folder); }
92 public void moveInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.moveInventoryFolder(folder); }
93 public void deleteInventoryFolder(UUID folder) { m_wrappedPlugin.deleteInventoryFolder(folder); }
94 }
95}