diff options
author | Adam Frisby | 2007-05-31 14:24:15 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-31 14:24:15 +0000 |
commit | d3c4ff66a7e780e6e102b598e374ae36a83ec7c1 (patch) | |
tree | c204f99172e14c796cd28a74f49a0aef63291102 /OpenGridServices | |
parent | * Added some comments (diff) | |
download | opensim-SC_OLD-d3c4ff66a7e780e6e102b598e374ae36a83ec7c1.zip opensim-SC_OLD-d3c4ff66a7e780e6e102b598e374ae36a83ec7c1.tar.gz opensim-SC_OLD-d3c4ff66a7e780e6e102b598e374ae36a83ec7c1.tar.bz2 opensim-SC_OLD-d3c4ff66a7e780e6e102b598e374ae36a83ec7c1.tar.xz |
* Completed reading of inventory in Manager. (still needs to be hooked up via interfaces, but easy to do.)
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs index 11f34d7..0538bd3 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | |||
@@ -290,14 +290,50 @@ namespace OpenGrid.Framework.Data.MySQL | |||
290 | { | 290 | { |
291 | try | 291 | try |
292 | { | 292 | { |
293 | InventoryFolderBase retval = new InventoryFolderBase(); | 293 | InventoryFolderBase folder = new InventoryFolderBase(); |
294 | 294 | ||
295 | retval.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); | 295 | folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); |
296 | retval.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); | 296 | folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); |
297 | retval.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); | 297 | folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); |
298 | retval.name = (string)reader["folderName"]; | 298 | folder.name = (string)reader["folderName"]; |
299 | 299 | ||
300 | rows.Add(retval); | 300 | rows.Add(folder); |
301 | } | ||
302 | catch (Exception e) | ||
303 | { | ||
304 | Console.WriteLine(e.ToString()); | ||
305 | } | ||
306 | } | ||
307 | |||
308 | return rows; | ||
309 | } | ||
310 | |||
311 | /// <summary> | ||
312 | /// Reads a collection of items from an SQL result | ||
313 | /// </summary> | ||
314 | /// <param name="reader">The SQL Result</param> | ||
315 | /// <returns>A List containing Inventory Items</returns> | ||
316 | public List<InventoryItemBase> readInventoryItems(IDataReader reader) | ||
317 | { | ||
318 | List<InventoryItemBase> rows = new List<InventoryItemBase>(); | ||
319 | |||
320 | while (reader.Read()) | ||
321 | { | ||
322 | try | ||
323 | { | ||
324 | InventoryItemBase item = new InventoryItemBase(); | ||
325 | |||
326 | item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]); | ||
327 | item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]); | ||
328 | item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString()); | ||
329 | item.inventoryDescription = (string)reader["inventoryDescription"]; | ||
330 | item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]); | ||
331 | item.inventoryName = (string)reader["inventoryName"]; | ||
332 | item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString()); | ||
333 | item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); | ||
334 | item.type = Convert.ToInt32(reader["type"].ToString()); | ||
335 | |||
336 | rows.Add(item); | ||
301 | } | 337 | } |
302 | catch (Exception e) | 338 | catch (Exception e) |
303 | { | 339 | { |