diff options
Diffstat (limited to 'OpenSim/Services')
6 files changed, 1 insertions, 175 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index 36d4ae2..d258293 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -484,45 +484,6 @@ namespace OpenSim.Services.Connectors | |||
484 | return 0; | 484 | return 0; |
485 | } | 485 | } |
486 | 486 | ||
487 | public InventoryCollection GetUserInventory(UUID principalID) | ||
488 | { | ||
489 | InventoryCollection inventory = new InventoryCollection(); | ||
490 | inventory.Folders = new List<InventoryFolderBase>(); | ||
491 | inventory.Items = new List<InventoryItemBase>(); | ||
492 | inventory.UserID = principalID; | ||
493 | |||
494 | try | ||
495 | { | ||
496 | Dictionary<string, object> ret = MakeRequest("GETUSERINVENTORY", | ||
497 | new Dictionary<string, object> { | ||
498 | { "PRINCIPAL", principalID.ToString() } | ||
499 | }); | ||
500 | |||
501 | if (!CheckReturn(ret)) | ||
502 | return null; | ||
503 | |||
504 | Dictionary<string, object> folders = | ||
505 | (Dictionary<string, object>)ret["FOLDERS"]; | ||
506 | Dictionary<string, object> items = | ||
507 | (Dictionary<string, object>)ret["ITEMS"]; | ||
508 | |||
509 | foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i | ||
510 | inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o)); | ||
511 | foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i | ||
512 | inventory.Items.Add(BuildItem((Dictionary<string, object>)o)); | ||
513 | } | ||
514 | catch (Exception e) | ||
515 | { | ||
516 | m_log.Error("[XINVENTORY SERVICES CONNECTOR]: Exception in GetUserInventory: ", e); | ||
517 | } | ||
518 | |||
519 | return inventory; | ||
520 | } | ||
521 | |||
522 | public void GetUserInventory(UUID principalID, InventoryReceiptCallback callback) | ||
523 | { | ||
524 | } | ||
525 | |||
526 | public bool HasInventoryForUser(UUID principalID) | 487 | public bool HasInventoryForUser(UUID principalID) |
527 | { | 488 | { |
528 | return false; | 489 | return false; |
@@ -607,4 +568,4 @@ namespace OpenSim.Services.Connectors | |||
607 | return item; | 568 | return item; |
608 | } | 569 | } |
609 | } | 570 | } |
610 | } \ No newline at end of file | 571 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 97eaabe..9ded1c4 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -197,37 +197,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /// <summary> | 199 | /// <summary> |
200 | /// Synchronous inventory fetch. | ||
201 | /// </summary> | ||
202 | /// <param name="userID"></param> | ||
203 | /// <returns></returns> | ||
204 | [Obsolete] | ||
205 | public InventoryCollection GetUserInventory(UUID userID) | ||
206 | { | ||
207 | m_log.Error("[SIMIAN INVENTORY CONNECTOR]: Obsolete GetUserInventory called for " + userID); | ||
208 | |||
209 | InventoryCollection inventory = new InventoryCollection(); | ||
210 | inventory.UserID = userID; | ||
211 | inventory.Folders = new List<InventoryFolderBase>(); | ||
212 | inventory.Items = new List<InventoryItemBase>(); | ||
213 | |||
214 | return inventory; | ||
215 | } | ||
216 | |||
217 | /// <summary> | ||
218 | /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the | ||
219 | /// inventory has been received | ||
220 | /// </summary> | ||
221 | /// <param name="userID"></param> | ||
222 | /// <param name="callback"></param> | ||
223 | [Obsolete] | ||
224 | public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) | ||
225 | { | ||
226 | m_log.Error("[SIMIAN INVENTORY CONNECTOR]: Obsolete GetUserInventory called for " + userID); | ||
227 | callback(new List<InventoryFolderImpl>(0), new List<InventoryItemBase>(0)); | ||
228 | } | ||
229 | |||
230 | /// <summary> | ||
231 | /// Retrieve the root inventory folder for the given user. | 200 | /// Retrieve the root inventory folder for the given user. |
232 | /// </summary> | 201 | /// </summary> |
233 | /// <param name="userID"></param> | 202 | /// <param name="userID"></param> |
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 3233caf..2c63240 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs | |||
@@ -103,12 +103,6 @@ namespace OpenSim.Services.HypergridService | |||
103 | return new List<InventoryFolderBase>(); | 103 | return new List<InventoryFolderBase>(); |
104 | } | 104 | } |
105 | 105 | ||
106 | public override InventoryCollection GetUserInventory(UUID userID) | ||
107 | { | ||
108 | // NOGO for this inventory service | ||
109 | return null; | ||
110 | } | ||
111 | |||
112 | public override InventoryFolderBase GetRootFolder(UUID principalID) | 106 | public override InventoryFolderBase GetRootFolder(UUID principalID) |
113 | { | 107 | { |
114 | //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetRootFolder for {0}", principalID); | 108 | //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetRootFolder for {0}", principalID); |
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 1608039..8269d36 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -137,59 +137,6 @@ namespace OpenSim.Services.HypergridService | |||
137 | return folders; | 137 | return folders; |
138 | } | 138 | } |
139 | 139 | ||
140 | public override InventoryCollection GetUserInventory(UUID userID) | ||
141 | { | ||
142 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID); | ||
143 | |||
144 | InventoryCollection userInventory = new InventoryCollection(); | ||
145 | userInventory.UserID = userID; | ||
146 | userInventory.Folders = new List<InventoryFolderBase>(); | ||
147 | userInventory.Items = new List<InventoryItemBase>(); | ||
148 | |||
149 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); | ||
150 | |||
151 | if (suitcase == null) | ||
152 | { | ||
153 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for user inventory", userID); | ||
154 | return null; | ||
155 | } | ||
156 | |||
157 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); | ||
158 | if (tree == null || (tree != null && tree.Count == 0)) | ||
159 | { | ||
160 | SetAsNormalFolder(suitcase); | ||
161 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | ||
162 | return userInventory; | ||
163 | } | ||
164 | |||
165 | List<InventoryItemBase> items; | ||
166 | foreach (XInventoryFolder f in tree) | ||
167 | { | ||
168 | // Add the items of this subfolder | ||
169 | items = GetFolderItems(userID, f.folderID); | ||
170 | if (items != null && items.Count > 0) | ||
171 | { | ||
172 | userInventory.Items.AddRange(items); | ||
173 | } | ||
174 | |||
175 | // Add the folder itself | ||
176 | userInventory.Folders.Add(ConvertToOpenSim(f)); | ||
177 | } | ||
178 | |||
179 | items = GetFolderItems(userID, suitcase.folderID); | ||
180 | if (items != null && items.Count > 0) | ||
181 | { | ||
182 | userInventory.Items.AddRange(items); | ||
183 | } | ||
184 | |||
185 | SetAsNormalFolder(suitcase); | ||
186 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | ||
187 | |||
188 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetUserInventory for user {0} returning {1} folders and {2} items", | ||
189 | userID, userInventory.Folders.Count, userInventory.Items.Count); | ||
190 | return userInventory; | ||
191 | } | ||
192 | |||
193 | public override InventoryFolderBase GetRootFolder(UUID principalID) | 140 | public override InventoryFolderBase GetRootFolder(UUID principalID) |
194 | { | 141 | { |
195 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); | 142 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); |
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index 36634a3..2805356 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs | |||
@@ -55,23 +55,6 @@ namespace OpenSim.Services.Interfaces | |||
55 | List<InventoryFolderBase> GetInventorySkeleton(UUID userId); | 55 | List<InventoryFolderBase> GetInventorySkeleton(UUID userId); |
56 | 56 | ||
57 | /// <summary> | 57 | /// <summary> |
58 | /// Synchronous inventory fetch. | ||
59 | /// </summary> | ||
60 | /// <param name="userID"></param> | ||
61 | /// <returns></returns> | ||
62 | [Obsolete] | ||
63 | InventoryCollection GetUserInventory(UUID userID); | ||
64 | |||
65 | /// <summary> | ||
66 | /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the | ||
67 | /// inventory has been received | ||
68 | /// </summary> | ||
69 | /// <param name="userID"></param> | ||
70 | /// <param name="callback"></param> | ||
71 | [Obsolete] | ||
72 | void GetUserInventory(UUID userID, InventoryReceiptCallback callback); | ||
73 | |||
74 | /// <summary> | ||
75 | /// Retrieve the root inventory folder for the given user. | 58 | /// Retrieve the root inventory folder for the given user. |
76 | /// </summary> | 59 | /// </summary> |
77 | /// <param name="userID"></param> | 60 | /// <param name="userID"></param> |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 7bad4b0..3bee433 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -615,34 +615,6 @@ namespace OpenSim.Services.InventoryService | |||
615 | return m_Database.GetAssetPermissions(principalID, assetID); | 615 | return m_Database.GetAssetPermissions(principalID, assetID); |
616 | } | 616 | } |
617 | 617 | ||
618 | public virtual InventoryCollection GetUserInventory(UUID userID) | ||
619 | { | ||
620 | InventoryCollection userInventory = new InventoryCollection(); | ||
621 | userInventory.UserID = userID; | ||
622 | userInventory.Folders = new List<InventoryFolderBase>(); | ||
623 | userInventory.Items = new List<InventoryItemBase>(); | ||
624 | |||
625 | List<InventoryFolderBase> skel = GetInventorySkeleton(userID); | ||
626 | if (skel != null) | ||
627 | { | ||
628 | foreach (InventoryFolderBase f in skel) | ||
629 | { | ||
630 | InventoryCollection c = GetFolderContent(userID, f.ID); | ||
631 | if (c != null && c.Items != null && c.Items.Count > 0) | ||
632 | userInventory.Items.AddRange(c.Items); | ||
633 | if (c != null && c.Folders != null && c.Folders.Count > 0) | ||
634 | userInventory.Folders.AddRange(c.Folders); | ||
635 | } | ||
636 | } | ||
637 | m_log.DebugFormat("[XINVENTORY SERVICE]: GetUserInventory for user {0} returning {1} folders and {2} items", | ||
638 | userID, userInventory.Folders.Count, userInventory.Items.Count); | ||
639 | return userInventory; | ||
640 | } | ||
641 | |||
642 | public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) | ||
643 | { | ||
644 | } | ||
645 | |||
646 | // Unused. | 618 | // Unused. |
647 | // | 619 | // |
648 | public bool HasInventoryForUser(UUID userID) | 620 | public bool HasInventoryForUser(UUID userID) |