aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities
diff options
context:
space:
mode:
authorSean Dague2008-04-07 23:15:35 +0000
committerSean Dague2008-04-07 23:15:35 +0000
commitf43681510725f5b95fcb864a1f3e4b744fcaf992 (patch)
tree2d34caa75488d1c608d1a21b4888cb0f264a6cba /OpenSim/Framework/Communications/Capabilities
parentneeded to add 4 characters to support the dashes (diff)
downloadopensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.zip
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.gz
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.bz2
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.xz
Refactor InventoryItemBase to do the following:
* wrap fields as Properties * rename some fields/properties to more sensible names * set style to PropName to match more standard C# approach
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs46
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 00de14d..315daab 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -294,14 +294,14 @@ namespace OpenSim.Region.Capabilities
294 private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) 294 private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
295 { 295 {
296 LLSDInventoryItem llsdItem = new LLSDInventoryItem(); 296 LLSDInventoryItem llsdItem = new LLSDInventoryItem();
297 llsdItem.asset_id = invItem.assetID; 297 llsdItem.asset_id = invItem.AssetID;
298 llsdItem.created_at = 1000; 298 llsdItem.created_at = 1000;
299 llsdItem.desc = invItem.inventoryDescription; 299 llsdItem.desc = invItem.Description;
300 llsdItem.flags = 0; 300 llsdItem.flags = 0;
301 llsdItem.item_id = invItem.inventoryID; 301 llsdItem.item_id = invItem.ID;
302 llsdItem.name = invItem.inventoryName; 302 llsdItem.name = invItem.Name;
303 llsdItem.parent_id = invItem.parentFolderID; 303 llsdItem.parent_id = invItem.Folder;
304 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.assetType).ToLower(); 304 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
305 305
306 // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is 306 // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is
307 // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife, 307 // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife,
@@ -311,17 +311,17 @@ namespace OpenSim.Region.Capabilities
311 llsdItem.type = "object"; 311 llsdItem.type = "object";
312 } 312 }
313 313
314 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.invType).ToLower(); 314 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
315 llsdItem.permissions = new LLSDPermissions(); 315 llsdItem.permissions = new LLSDPermissions();
316 llsdItem.permissions.creator_id = invItem.creatorsID; 316 llsdItem.permissions.creator_id = invItem.Creator;
317 llsdItem.permissions.base_mask = (int)invItem.inventoryCurrentPermissions; 317 llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
318 llsdItem.permissions.everyone_mask = (int)invItem.inventoryEveryOnePermissions; 318 llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
319 llsdItem.permissions.group_id = LLUUID.Zero; 319 llsdItem.permissions.group_id = LLUUID.Zero;
320 llsdItem.permissions.group_mask = 0; 320 llsdItem.permissions.group_mask = 0;
321 llsdItem.permissions.is_owner_group = false; 321 llsdItem.permissions.is_owner_group = false;
322 llsdItem.permissions.next_owner_mask = (int)invItem.inventoryNextPermissions; 322 llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions;
323 llsdItem.permissions.owner_id = m_agentID; // FixMe 323 llsdItem.permissions.owner_id = m_agentID; // FixMe
324 llsdItem.permissions.owner_mask = (int)invItem.inventoryCurrentPermissions; 324 llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions;
325 llsdItem.sale_info = new LLSDSaleInfo(); 325 llsdItem.sale_info = new LLSDSaleInfo();
326 llsdItem.sale_info.sale_price = 10; 326 llsdItem.sale_info.sale_price = 10;
327 llsdItem.sale_info.sale_type = "not"; 327 llsdItem.sale_info.sale_type = "not";
@@ -587,17 +587,17 @@ namespace OpenSim.Region.Capabilities
587 m_assetCache.AddAsset(asset); 587 m_assetCache.AddAsset(asset);
588 588
589 InventoryItemBase item = new InventoryItemBase(); 589 InventoryItemBase item = new InventoryItemBase();
590 item.avatarID = m_agentID; 590 item.Owner = m_agentID;
591 item.creatorsID = m_agentID; 591 item.Creator = m_agentID;
592 item.inventoryID = inventoryItem; 592 item.ID = inventoryItem;
593 item.assetID = asset.FullID; 593 item.AssetID = asset.FullID;
594 item.inventoryDescription = assetDescription; 594 item.Description = assetDescription;
595 item.inventoryName = assetName; 595 item.Name = assetName;
596 item.assetType = assType; 596 item.AssetType = assType;
597 item.invType = inType; 597 item.InvType = inType;
598 item.parentFolderID = parentFolder; 598 item.Folder = parentFolder;
599 item.inventoryCurrentPermissions = 2147483647; 599 item.CurrentPermissions = 2147483647;
600 item.inventoryNextPermissions = 2147483647; 600 item.NextPermissions = 2147483647;
601 601
602 if (AddNewInventoryItem != null) 602 if (AddNewInventoryItem != null)
603 { 603 {