aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-25 22:15:29 +0000
committerJustin Clark-Casey (justincc)2011-11-25 22:15:29 +0000
commit0688861aa72dc162a3da7b60804ac17ff5908067 (patch)
tree6a56468af2eeeb4fd825b82f89d825cfc75dcd8c /OpenSim
parentFix WebFetchInventoryDescendents cap to use Utils.AssetTypeTostring/Inventory... (diff)
downloadopensim-SC-0688861aa72dc162a3da7b60804ac17ff5908067.zip
opensim-SC-0688861aa72dc162a3da7b60804ac17ff5908067.tar.gz
opensim-SC-0688861aa72dc162a3da7b60804ac17ff5908067.tar.bz2
opensim-SC-0688861aa72dc162a3da7b60804ac17ff5908067.tar.xz
Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs5
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs57
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs4
3 files changed, 5 insertions, 61 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 17dbcd5..52b5f2c 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -235,10 +235,11 @@ namespace OpenSim.Capabilities.Handlers
235 llsdFolder.folder_id = invFolder.ID; 235 llsdFolder.folder_id = invFolder.ID;
236 llsdFolder.parent_id = invFolder.ParentID; 236 llsdFolder.parent_id = invFolder.ParentID;
237 llsdFolder.name = invFolder.Name; 237 llsdFolder.name = invFolder.Name;
238 if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length) 238
239 if (!Enum.IsDefined(typeof(AssetType), invFolder.Type))
239 llsdFolder.type = "-1"; 240 llsdFolder.type = "-1";
240 else 241 else
241 llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; 242 llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
242 llsdFolder.preferred_type = "-1"; 243 llsdFolder.preferred_type = "-1";
243 244
244 return llsdFolder; 245 return llsdFolder;
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index 30d775c..ba2a306 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -40,63 +40,6 @@ namespace OpenSim.Framework
40 /// </summary> 40 /// </summary>
41 private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647; 41 private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
42 42
43 /// <summary>
44 /// Inventory types
45 /// </summary>
46 public static string[] InvTypes = new string[]
47 {
48 "texture",
49 "sound",
50 "calling_card",
51 "landmark",
52 String.Empty,
53 String.Empty,
54 "object",
55 "notecard",
56 String.Empty,
57 String.Empty,
58 "lsl_text",
59 String.Empty,
60 String.Empty,
61 "bodypart",
62 String.Empty,
63 "snapshot",
64 String.Empty,
65 String.Empty,
66 "wearable",
67 "animation",
68 "gesture"
69 };
70
71 /// <summary>
72 /// Asset types
73 /// </summary>
74 public static string[] Types = new string[]
75 {
76 "texture",
77 "sound",
78 "callcard",
79 "landmark",
80 "clothing", // Deprecated
81 "clothing",
82 "object",
83 "notecard",
84 "category",
85 "root",
86 "lsltext",
87 "lslbyte",
88 "txtr_tga",
89 "bodypart",
90 "trash",
91 "snapshot",
92 "lstndfnd",
93 "snd_wav",
94 "img_tga",
95 "jpeg",
96 "animatn",
97 "gesture"
98 };
99
100 private UUID _assetID = UUID.Zero; 43 private UUID _assetID = UUID.Zero;
101 44
102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; 45 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d80944b..daddb90 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes
832 invString.AddSectionEnd(); 832 invString.AddSectionEnd();
833 833
834 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 834 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
835 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 835 invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
836 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 836 invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
837 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); 837 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
838 838
839 invString.AddSaleStart(); 839 invString.AddSaleStart();