diff options
author | Diva Canto | 2010-11-29 08:43:33 -0800 |
---|---|---|
committer | Diva Canto | 2010-11-29 08:43:33 -0800 |
commit | f86c438653fc3c8356a8f0c43a055b1928183f02 (patch) | |
tree | b8ad05db04efde6385eeaed48dcbe4e896133ad5 /OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs | |
parent | Changed the parser for InventoryItem deserialization. Moved some utility func... (diff) | |
download | opensim-SC-f86c438653fc3c8356a8f0c43a055b1928183f02.zip opensim-SC-f86c438653fc3c8356a8f0c43a055b1928183f02.tar.gz opensim-SC-f86c438653fc3c8356a8f0c43a055b1928183f02.tar.bz2 opensim-SC-f86c438653fc3c8356a8f0c43a055b1928183f02.tar.xz |
Preservation of creator information now also working in IARs. Cleaned up usage help. Moved Osp around, deleted unnecessary OspInventoryWrapperPlugin, added manipulation of SOP's xml representation in a generic ExternalRepresentationUtils function.
Diffstat (limited to 'OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs deleted file mode 100644 index bcd1eee..0000000 --- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
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 OpenSimulator 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 | |||
28 | using System.Collections.Generic; | ||
29 | using OpenSim.Data; | ||
30 | using OpenMetaverse; | ||
31 | using OpenSim.Services.Interfaces; | ||
32 | |||
33 | namespace OpenSim.Framework.Communications.Osp | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Wrap other inventory data plugins so that we can perform OSP related post processing for items | ||
37 | /// </summary> | ||
38 | public class OspInventoryWrapperPlugin : IInventoryDataPlugin | ||
39 | { | ||
40 | protected IInventoryDataPlugin m_wrappedPlugin; | ||
41 | //protected CommunicationsManager m_commsManager; | ||
42 | protected IUserAccountService m_userAccountService; | ||
43 | |||
44 | public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, IUserAccountService userService) | ||
45 | { | ||
46 | m_wrappedPlugin = wrappedPlugin; | ||
47 | m_userAccountService = userService; | ||
48 | } | ||
49 | |||
50 | public string Name { get { return "OspInventoryWrapperPlugin"; } } | ||
51 | public string Version { get { return "0.1"; } } | ||
52 | public void Initialise() {} | ||
53 | public void Initialise(string connect) {} | ||
54 | public void Dispose() {} | ||
55 | |||
56 | public InventoryItemBase getInventoryItem(UUID item) | ||
57 | { | ||
58 | return PostProcessItem(m_wrappedPlugin.getInventoryItem(item)); | ||
59 | } | ||
60 | |||
61 | // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem? | ||
62 | public InventoryItemBase queryInventoryItem(UUID item) | ||
63 | { | ||
64 | return PostProcessItem(m_wrappedPlugin.queryInventoryItem(item)); | ||
65 | } | ||
66 | |||
67 | public List<InventoryItemBase> getInventoryInFolder(UUID folderID) | ||
68 | { | ||
69 | List<InventoryItemBase> items = m_wrappedPlugin.getInventoryInFolder(folderID); | ||
70 | |||
71 | foreach (InventoryItemBase item in items) | ||
72 | PostProcessItem(item); | ||
73 | |||
74 | return items; | ||
75 | } | ||
76 | |||
77 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) | ||
78 | { | ||
79 | return m_wrappedPlugin.fetchActiveGestures(avatarID); | ||
80 | |||
81 | // Presuming that no post processing is needed here as gestures don't refer to creator information (?) | ||
82 | } | ||
83 | |||
84 | protected InventoryItemBase PostProcessItem(InventoryItemBase item) | ||
85 | { | ||
86 | item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_userAccountService); | ||
87 | return item; | ||
88 | } | ||
89 | |||
90 | public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } | ||
91 | public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); } | ||
92 | public InventoryFolderBase getUserRootFolder(UUID user) { return m_wrappedPlugin.getUserRootFolder(user); } | ||
93 | public List<InventoryFolderBase> getInventoryFolders(UUID parentID) { return m_wrappedPlugin.getInventoryFolders(parentID); } | ||
94 | public InventoryFolderBase getInventoryFolder(UUID folder) { return m_wrappedPlugin.getInventoryFolder(folder); } | ||
95 | public void addInventoryItem(InventoryItemBase item) { m_wrappedPlugin.addInventoryItem(item); } | ||
96 | public void updateInventoryItem(InventoryItemBase item) { m_wrappedPlugin.updateInventoryItem(item); } | ||
97 | public void deleteInventoryItem(UUID item) { m_wrappedPlugin.deleteInventoryItem(item); } | ||
98 | public InventoryFolderBase queryInventoryFolder(UUID folder) { return m_wrappedPlugin.queryInventoryFolder(folder); } | ||
99 | public void addInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.addInventoryFolder(folder); } | ||
100 | public void updateInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.updateInventoryFolder(folder); } | ||
101 | public void moveInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.moveInventoryFolder(folder); } | ||
102 | public void deleteInventoryFolder(UUID folder) { m_wrappedPlugin.deleteInventoryFolder(folder); } | ||
103 | } | ||
104 | } | ||