diff options
author | diva | 2009-06-10 13:18:32 +0000 |
---|---|---|
committer | diva | 2009-06-10 13:18:32 +0000 |
commit | 0f367bd7bbc5d22d4834e1eb0f1671381485143e (patch) | |
tree | eeb4290f1146601f8fd97dc164e0a7f247a2fafb /OpenSim/Services/InventoryService/HGInventoryService.cs | |
parent | From: Alan Webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.zip opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.gz opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.bz2 opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.xz |
Heart surgery no.2: the inventory service hooks.
Several improvements in the connectors themselves.
Several improvements in configurations.
Needed to add a hack in IUserService and UserManagerBase, to be removed when that service is refactored.
Diffstat (limited to 'OpenSim/Services/InventoryService/HGInventoryService.cs')
-rw-r--r-- | OpenSim/Services/InventoryService/HGInventoryService.cs | 100 |
1 files changed, 82 insertions, 18 deletions
diff --git a/OpenSim/Services/InventoryService/HGInventoryService.cs b/OpenSim/Services/InventoryService/HGInventoryService.cs index e5e40c6..0db80d0 100644 --- a/OpenSim/Services/InventoryService/HGInventoryService.cs +++ b/OpenSim/Services/InventoryService/HGInventoryService.cs | |||
@@ -109,6 +109,7 @@ namespace OpenSim.Services.InventoryService | |||
109 | 109 | ||
110 | public void GetUserInventory(string id, UUID sessionID, InventoryReceiptCallback callback) | 110 | public void GetUserInventory(string id, UUID sessionID, InventoryReceiptCallback callback) |
111 | { | 111 | { |
112 | m_log.Debug("[HGInventory]: GetUserInventory " + id); | ||
112 | string url = string.Empty; | 113 | string url = string.Empty; |
113 | string userID = string.Empty; | 114 | string userID = string.Empty; |
114 | 115 | ||
@@ -120,57 +121,120 @@ namespace OpenSim.Services.InventoryService | |||
120 | 121 | ||
121 | } | 122 | } |
122 | 123 | ||
123 | public bool AddFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 124 | public bool AddFolder(string id, InventoryFolderBase folder, UUID sessionID) |
124 | { | 125 | { |
125 | // TODO | 126 | string url = string.Empty; |
127 | string userID = string.Empty; | ||
128 | |||
129 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
130 | { | ||
131 | ISessionAuthInventoryService connector = GetConnector(url); | ||
132 | return connector.AddFolder(userID, folder, sessionID); | ||
133 | } | ||
126 | return false; | 134 | return false; |
127 | } | 135 | } |
128 | 136 | ||
129 | public bool UpdateFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 137 | public bool UpdateFolder(string id, InventoryFolderBase folder, UUID sessionID) |
130 | { | 138 | { |
131 | // TODO | 139 | string url = string.Empty; |
140 | string userID = string.Empty; | ||
141 | |||
142 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
143 | { | ||
144 | ISessionAuthInventoryService connector = GetConnector(url); | ||
145 | return connector.UpdateFolder(userID, folder, sessionID); | ||
146 | } | ||
132 | return false; | 147 | return false; |
133 | } | 148 | } |
134 | 149 | ||
135 | public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 150 | public bool MoveFolder(string id, InventoryFolderBase folder, UUID sessionID) |
136 | { | 151 | { |
137 | // TODO | 152 | string url = string.Empty; |
153 | string userID = string.Empty; | ||
154 | |||
155 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
156 | { | ||
157 | ISessionAuthInventoryService connector = GetConnector(url); | ||
158 | return connector.MoveFolder(userID, folder, sessionID); | ||
159 | } | ||
138 | return false; | 160 | return false; |
139 | } | 161 | } |
140 | 162 | ||
141 | public bool PurgeFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 163 | public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) |
142 | { | 164 | { |
143 | // TODO | 165 | string url = string.Empty; |
166 | string userID = string.Empty; | ||
167 | |||
168 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
169 | { | ||
170 | ISessionAuthInventoryService connector = GetConnector(url); | ||
171 | return connector.PurgeFolder(userID, folder, sessionID); | ||
172 | } | ||
144 | return false; | 173 | return false; |
145 | } | 174 | } |
146 | 175 | ||
147 | public bool AddItem(string userID, InventoryItemBase item, UUID sessionID) | 176 | public bool AddItem(string id, InventoryItemBase item, UUID sessionID) |
148 | { | 177 | { |
149 | // TODO | 178 | string url = string.Empty; |
179 | string userID = string.Empty; | ||
180 | |||
181 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
182 | { | ||
183 | ISessionAuthInventoryService connector = GetConnector(url); | ||
184 | return connector.AddItem(userID, item, sessionID); | ||
185 | } | ||
150 | return false; | 186 | return false; |
151 | } | 187 | } |
152 | 188 | ||
153 | public bool UpdateItem(string userID, InventoryItemBase item, UUID sessionID) | 189 | public bool UpdateItem(string id, InventoryItemBase item, UUID sessionID) |
154 | { | 190 | { |
155 | // TODO | 191 | string url = string.Empty; |
192 | string userID = string.Empty; | ||
193 | |||
194 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
195 | { | ||
196 | ISessionAuthInventoryService connector = GetConnector(url); | ||
197 | return connector.UpdateItem(userID, item, sessionID); | ||
198 | } | ||
156 | return false; | 199 | return false; |
157 | } | 200 | } |
158 | 201 | ||
159 | public bool DeleteItem(string userID, InventoryItemBase item, UUID sessionID) | 202 | public bool DeleteItem(string id, InventoryItemBase item, UUID sessionID) |
160 | { | 203 | { |
161 | // TODO | 204 | string url = string.Empty; |
205 | string userID = string.Empty; | ||
206 | |||
207 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
208 | { | ||
209 | ISessionAuthInventoryService connector = GetConnector(url); | ||
210 | return connector.UpdateItem(userID, item, sessionID); | ||
211 | } | ||
162 | return false; | 212 | return false; |
163 | } | 213 | } |
164 | 214 | ||
165 | public InventoryItemBase QueryItem(string userID, InventoryItemBase item, UUID sessionID) | 215 | public InventoryItemBase QueryItem(string id, InventoryItemBase item, UUID sessionID) |
166 | { | 216 | { |
167 | // TODO | 217 | string url = string.Empty; |
218 | string userID = string.Empty; | ||
219 | |||
220 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
221 | { | ||
222 | ISessionAuthInventoryService connector = GetConnector(url); | ||
223 | return connector.QueryItem(userID, item, sessionID); | ||
224 | } | ||
168 | return null; | 225 | return null; |
169 | } | 226 | } |
170 | 227 | ||
171 | public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 228 | public InventoryFolderBase QueryFolder(string id, InventoryFolderBase folder, UUID sessionID) |
172 | { | 229 | { |
173 | // TODO | 230 | string url = string.Empty; |
231 | string userID = string.Empty; | ||
232 | |||
233 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
234 | { | ||
235 | ISessionAuthInventoryService connector = GetConnector(url); | ||
236 | return connector.QueryFolder(userID, folder, sessionID); | ||
237 | } | ||
174 | return null; | 238 | return null; |
175 | } | 239 | } |
176 | 240 | ||