aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2009-08-10 12:44:15 -0700
committerDiva Canto2009-08-10 12:44:15 -0700
commit17cc9b98573a1c4dd4a69113eea90c7fbeccad83 (patch)
treeacfdf6b3d25e8b30797ea77a1c8f10842152fbce /OpenSim/Framework
parentConditional to prevent a null ref in tests. The tests may still not pass. (diff)
downloadopensim-SC-17cc9b98573a1c4dd4a69113eea90c7fbeccad83.zip
opensim-SC-17cc9b98573a1c4dd4a69113eea90c7fbeccad83.tar.gz
opensim-SC-17cc9b98573a1c4dd4a69113eea90c7fbeccad83.tar.bz2
opensim-SC-17cc9b98573a1c4dd4a69113eea90c7fbeccad83.tar.xz
Last piece of cleaning up old inventory. Old IInventoryServices and ISecureInventoryService interfaces removed.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/IInventoryServices.cs137
-rw-r--r--OpenSim/Framework/Communications/ISecureInventoryService.cs117
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs6
3 files changed, 2 insertions, 258 deletions
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
deleted file mode 100644
index 166b9aa..0000000
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ /dev/null
@@ -1,137 +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
28using System.Collections.Generic;
29using OpenMetaverse;
30using OpenSim.Framework.Communications.Cache;
31
32namespace OpenSim.Framework.Communications
33{
34 /// <summary>
35 /// Callback used when a user's inventory is received from the inventory service
36 /// </summary>
37 public delegate void InventoryReceiptCallback(
38 ICollection<InventoryFolderImpl> folders, ICollection<InventoryItemBase> items);
39
40 /// <summary>
41 /// Defines all the operations one can perform on a user's inventory.
42 /// </summary>
43 public interface IInventoryServices
44 {
45 string Host
46 {
47 get;
48 }
49
50 /// <summary>
51 /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
52 /// inventory has been received
53 /// </summary>
54 /// <param name="userID"></param>
55 /// <param name="callback"></param>
56 void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback);
57
58 /// <summary>
59 /// Add a new folder to the user's inventory
60 /// </summary>
61 /// <param name="folder"></param>
62 /// <returns>true if the folder was successfully added</returns>
63 bool AddFolder(InventoryFolderBase folder);
64
65 /// <summary>
66 /// Update a folder in the user's inventory
67 /// </summary>
68 /// <param name="folder"></param>
69 /// <returns>true if the folder was successfully updated</returns>
70 bool UpdateFolder(InventoryFolderBase folder);
71
72 /// <summary>
73 /// Move an inventory folder to a new location
74 /// </summary>
75 /// <param name="folder">A folder containing the details of the new location</param>
76 /// <returns>true if the folder was successfully moved</returns>
77 bool MoveFolder(InventoryFolderBase folder);
78
79 /// <summary>
80 /// Purge an inventory folder of all its items and subfolders.
81 /// </summary>
82 /// <param name="folder"></param>
83 /// <returns>true if the folder was successfully purged</returns>
84 bool PurgeFolder(InventoryFolderBase folder);
85
86 /// <summary>
87 /// Add a new item to the user's inventory
88 /// </summary>
89 /// <param name="item"></param>
90 /// <returns>true if the item was successfully added</returns>
91 bool AddItem(InventoryItemBase item);
92
93 /// <summary>
94 /// Update an item in the user's inventory
95 /// </summary>
96 /// <param name="item"></param>
97 /// <returns>true if the item was successfully updated</returns>
98 bool UpdateItem(InventoryItemBase item);
99
100 /// <summary>
101 /// Delete an item from the user's inventory
102 /// </summary>
103 /// <param name="item"></param>
104 /// <returns>true if the item was successfully deleted</returns>
105 bool DeleteItem(InventoryItemBase item);
106
107 /// <summary>
108 /// Query the server for an item that may have been added by
109 /// another region
110 /// </summary>
111 /// <param name="item"></param>
112 /// <returns>true if the item was found in local cache</returns>
113 InventoryItemBase QueryItem(InventoryItemBase item);
114
115 /// <summary>
116 /// Query the server for a folder that may have been added by
117 /// another region
118 /// </summary>
119 /// <param name="folder"></param>
120 /// <returns>true if the folder was found in local cache</returns>
121 InventoryFolderBase QueryFolder(InventoryFolderBase folder);
122
123 /// <summary>
124 /// Does the given user have an inventory structure?
125 /// </summary>
126 /// <param name="userID"></param>
127 /// <returns></returns>
128 bool HasInventoryForUser(UUID userID);
129
130 /// <summary>
131 /// Retrieve the root inventory folder for the given user.
132 /// </summary>
133 /// <param name="userID"></param>
134 /// <returns>null if no root folder was found</returns>
135 InventoryFolderBase RequestRootFolder(UUID userID);
136 }
137} \ No newline at end of file
diff --git a/OpenSim/Framework/Communications/ISecureInventoryService.cs b/OpenSim/Framework/Communications/ISecureInventoryService.cs
deleted file mode 100644
index ef2b40c..0000000
--- a/OpenSim/Framework/Communications/ISecureInventoryService.cs
+++ /dev/null
@@ -1,117 +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
28using OpenMetaverse;
29
30namespace OpenSim.Framework.Communications
31{
32 /// <summary>
33 /// Defines all the operations one can perform on a user's inventory.
34 /// </summary>
35 public interface ISecureInventoryService
36 {
37 string Host
38 {
39 get;
40 }
41
42 /// <summary>
43 /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
44 /// inventory has been received
45 /// </summary>
46 /// <param name="userID"></param>
47 /// <param name="callback"></param>
48 void RequestInventoryForUser(UUID userID, UUID session_id, InventoryReceiptCallback callback);
49
50 /// <summary>
51 /// Add a new folder to the user's inventory
52 /// </summary>
53 /// <param name="folder"></param>
54 /// <returns>true if the folder was successfully added</returns>
55 bool AddFolder(InventoryFolderBase folder, UUID session_id);
56
57 /// <summary>
58 /// Update a folder in the user's inventory
59 /// </summary>
60 /// <param name="folder"></param>
61 /// <returns>true if the folder was successfully updated</returns>
62 bool UpdateFolder(InventoryFolderBase folder, UUID session_id);
63
64 /// <summary>
65 /// Move an inventory folder to a new location
66 /// </summary>
67 /// <param name="folder">A folder containing the details of the new location</param>
68 /// <returns>true if the folder was successfully moved</returns>
69 bool MoveFolder(InventoryFolderBase folder, UUID session_id);
70
71 /// <summary>
72 /// Purge an inventory folder of all its items and subfolders.
73 /// </summary>
74 /// <param name="folder"></param>
75 /// <returns>true if the folder was successfully purged</returns>
76 bool PurgeFolder(InventoryFolderBase folder, UUID session_id);
77
78 /// <summary>
79 /// Add a new item to the user's inventory
80 /// </summary>
81 /// <param name="item"></param>
82 /// <returns>true if the item was successfully added</returns>
83 bool AddItem(InventoryItemBase item, UUID session_id);
84
85 /// <summary>
86 /// Update an item in the user's inventory
87 /// </summary>
88 /// <param name="item"></param>
89 /// <returns>true if the item was successfully updated</returns>
90 bool UpdateItem(InventoryItemBase item, UUID session_id);
91
92 /// <summary>
93 /// Delete an item from the user's inventory
94 /// </summary>
95 /// <param name="item"></param>
96 /// <returns>true if the item was successfully deleted</returns>
97 bool DeleteItem(InventoryItemBase item, UUID session_id);
98
99 InventoryItemBase QueryItem(InventoryItemBase item, UUID session_id);
100
101 InventoryFolderBase QueryFolder(InventoryFolderBase item, UUID session_id);
102
103 /// <summary>
104 /// Does the given user have an inventory structure?
105 /// </summary>
106 /// <param name="userID"></param>
107 /// <returns></returns>
108 bool HasInventoryForUser(UUID userID);
109
110 /// <summary>
111 /// Retrieve the root inventory folder for the given user.
112 /// </summary>
113 /// <param name="userID"></param>
114 /// <returns>null if no root folder was found</returns>
115 InventoryFolderBase RequestRootFolder(UUID userID);
116 }
117}
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index a51de2d..309c415 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -36,8 +36,9 @@ namespace OpenSim.Framework.Communications
36 /// <summary> 36 /// <summary>
37 /// Abstract base class used by local and grid implementations of an inventory service. 37 /// Abstract base class used by local and grid implementations of an inventory service.
38 /// </summary> 38 /// </summary>
39 public abstract class InventoryServiceBase : IInventoryServices, IInterServiceInventoryServices 39 public abstract class InventoryServiceBase : IInterServiceInventoryServices
40 { 40 {
41
41 private static readonly ILog m_log 42 private static readonly ILog m_log
42 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 44
@@ -153,9 +154,6 @@ namespace OpenSim.Framework.Communications
153 return false; 154 return false;
154 } 155 }
155 156
156 // See IInventoryServices
157 public abstract void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback);
158
159 public List<InventoryItemBase> GetActiveGestures(UUID userId) 157 public List<InventoryItemBase> GetActiveGestures(UUID userId)
160 { 158 {
161 List<InventoryItemBase> activeGestures = new List<InventoryItemBase>(); 159 List<InventoryItemBase> activeGestures = new List<InventoryItemBase>();