aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs50
1 files changed, 48 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index aac1a83..40acd6d 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -149,12 +149,58 @@ namespace OpenSim.Services.Connectors
149 149
150 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) 150 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID)
151 { 151 {
152 return null; 152 Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT",
153 new Dictionary<string,object> {
154 { "PRINCIPAL", principalID.ToString() },
155 { "FOLDER", folderID.ToString() }
156 });
157
158 if (ret == null)
159 return null;
160
161 if (ret.Count == 0)
162 return null;
163
164
165 InventoryCollection inventory = new InventoryCollection();
166 inventory.Folders = new List<InventoryFolderBase>();
167 inventory.Items = new List<InventoryItemBase>();
168 inventory.UserID = principalID;
169
170 Dictionary<string,object> folders =
171 (Dictionary<string,object>)ret["FOLDERS"];
172 Dictionary<string,object> items =
173 (Dictionary<string,object>)ret["ITEMS"];
174
175 foreach (Object o in folders.Values)
176 inventory.Folders.Add(BuildFolder((Dictionary<string,object>)o));
177 foreach (Object o in items.Values)
178 inventory.Items.Add(BuildItem((Dictionary<string,object>)o));
179
180 return inventory;
153 } 181 }
154 182
155 public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID) 183 public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID)
156 { 184 {
157 return null; 185 Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT",
186 new Dictionary<string,object> {
187 { "PRINCIPAL", principalID.ToString() },
188 { "FOLDER", folderID.ToString() }
189 });
190
191 if (ret == null)
192 return null;
193
194 if (ret.Count == 0)
195 return null;
196
197
198 List<InventoryItemBase> items = new List<InventoryItemBase>();
199
200 foreach (Object o in ret.Values)
201 items.Add(BuildItem((Dictionary<string,object>)o));
202
203 return items;
158 } 204 }
159 205
160 public bool AddFolder(InventoryFolderBase folder) 206 public bool AddFolder(InventoryFolderBase folder)