aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2015-08-08 12:12:50 -0700
committerDiva Canto2015-08-08 12:12:50 -0700
commit959872315f67a1a33a2bae7330749f7dd74a4774 (patch)
treee31f6900453e77815859767cb2331d0412ec5b57 /OpenSim/Framework
parentHave osAvatarName2Key check the cache first, even for foreign users (diff)
downloadopensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.zip
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.gz
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.bz2
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.xz
WARNING: massive refactor to follow libomv's latest changes regarding inventory folders. The newest version of libomv itself is committed here. Basically, everything that was using the AssetType enum has been combed through; many of those uses were changed to the new FolderType enum.
This means that from now on, [new] root folders have code 8 (FolderType.Root), as the viewers expect, as opposed to 9, which was what we had been doing. Normal folders are as they were, -1. Also now sending folder code 100 for Suitcase folders to viewers, with no filter. All tests pass, but fingers crossed!
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AssetBase.cs10
-rw-r--r--OpenSim/Framework/InventoryFolderBase.cs3
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs6
-rw-r--r--OpenSim/Framework/SLUtil.cs68
-rw-r--r--OpenSim/Framework/Serialization/ArchiveConstants.cs10
-rw-r--r--OpenSim/Framework/Tests/AssetBaseTest.cs4
6 files changed, 53 insertions, 48 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 153a1d0..2f04d2e 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Framework
136 get 136 get
137 { 137 {
138 return 138 return
139 (Type == (sbyte) AssetType.Animation || 139 (Type == (sbyte)AssetType.Animation ||
140 Type == (sbyte)AssetType.Gesture || 140 Type == (sbyte)AssetType.Gesture ||
141 Type == (sbyte)AssetType.Simstate || 141 Type == (sbyte)AssetType.Simstate ||
142 Type == (sbyte)AssetType.Unknown || 142 Type == (sbyte)AssetType.Unknown ||
@@ -146,13 +146,9 @@ namespace OpenSim.Framework
146 Type == (sbyte)AssetType.Texture || 146 Type == (sbyte)AssetType.Texture ||
147 Type == (sbyte)AssetType.TextureTGA || 147 Type == (sbyte)AssetType.TextureTGA ||
148 Type == (sbyte)AssetType.Folder || 148 Type == (sbyte)AssetType.Folder ||
149 Type == (sbyte)AssetType.RootFolder ||
150 Type == (sbyte)AssetType.LostAndFoundFolder ||
151 Type == (sbyte)AssetType.SnapshotFolder ||
152 Type == (sbyte)AssetType.TrashFolder ||
153 Type == (sbyte)AssetType.ImageJPEG || 149 Type == (sbyte)AssetType.ImageJPEG ||
154 Type == (sbyte) AssetType.ImageTGA || 150 Type == (sbyte)AssetType.ImageTGA ||
155 Type == (sbyte) AssetType.LSLBytecode); 151 Type == (sbyte)AssetType.LSLBytecode);
156 } 152 }
157 } 153 }
158 154
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs
index b3457a6..fb66056 100644
--- a/OpenSim/Framework/InventoryFolderBase.cs
+++ b/OpenSim/Framework/InventoryFolderBase.cs
@@ -34,6 +34,9 @@ namespace OpenSim.Framework
34 /// </summary> 34 /// </summary>
35 public class InventoryFolderBase : InventoryNodeBase 35 public class InventoryFolderBase : InventoryNodeBase
36 { 36 {
37 public static readonly string ROOT_FOLDER_NAME = "My Inventory";
38 public static readonly string SUITCASE_FOLDER_NAME = "My Suitcase";
39
37 /// <summary> 40 /// <summary>
38 /// The folder this folder is contained in 41 /// The folder this folder is contained in
39 /// </summary> 42 /// </summary>
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index ce63ee0..f9fd752 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,11 +34,7 @@ namespace OpenSim.Framework
34 /// Inventory Item - contains all the properties associated with an individual inventory piece. 34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase : InventoryNodeBase, ICloneable 36 public class InventoryItemBase : InventoryNodeBase, ICloneable
37 { 37 {
38 public static readonly string SUITCASE_FOLDER_NAME = "My Suitcase";
39 public static readonly sbyte SUITCASE_FOLDER_TYPE = 100;
40 public static readonly sbyte SUITCASE_FOLDER_FAKE_TYPE = 8;
41
42 /// <value> 38 /// <value>
43 /// The inventory type of the item. This is slightly different from the asset type in some situations. 39 /// The inventory type of the item. This is slightly different from the asset type in some situations.
44 /// </value> 40 /// </value>
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs
index 027fc0e..e66d5be 100644
--- a/OpenSim/Framework/SLUtil.cs
+++ b/OpenSim/Framework/SLUtil.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Framework
64 private class TypeMapping 64 private class TypeMapping
65 { 65 {
66 private sbyte assetType; 66 private sbyte assetType;
67 private InventoryType inventoryType; 67 private sbyte inventoryType;
68 private string contentType; 68 private string contentType;
69 private string contentType2; 69 private string contentType2;
70 private string extension; 70 private string extension;
@@ -79,7 +79,7 @@ namespace OpenSim.Framework
79 get { return AssetTypeFromCode(assetType); } 79 get { return AssetTypeFromCode(assetType); }
80 } 80 }
81 81
82 public InventoryType InventoryType 82 public sbyte InventoryType
83 { 83 {
84 get { return inventoryType; } 84 get { return inventoryType; }
85 } 85 }
@@ -99,7 +99,7 @@ namespace OpenSim.Framework
99 get { return extension; } 99 get { return extension; }
100 } 100 }
101 101
102 private TypeMapping(sbyte assetType, InventoryType inventoryType, string contentType, string contentType2, string extension) 102 private TypeMapping(sbyte assetType, sbyte inventoryType, string contentType, string contentType2, string extension)
103 { 103 {
104 this.assetType = assetType; 104 this.assetType = assetType;
105 this.inventoryType = inventoryType; 105 this.inventoryType = inventoryType;
@@ -108,18 +108,28 @@ namespace OpenSim.Framework
108 this.extension = extension; 108 this.extension = extension;
109 } 109 }
110 110
111 public TypeMapping(AssetType assetType, InventoryType inventoryType, string contentType, string contentType2, string extension) 111 public TypeMapping(AssetType assetType, sbyte inventoryType, string contentType, string contentType2, string extension)
112 : this((sbyte)assetType, inventoryType, contentType, contentType2, extension) 112 : this((sbyte)assetType, inventoryType, contentType, contentType2, extension)
113 { 113 {
114 } 114 }
115 115
116 public TypeMapping(AssetType assetType, InventoryType inventoryType, string contentType, string contentType2, string extension)
117 : this((sbyte)assetType, (sbyte)inventoryType, contentType, contentType2, extension)
118 {
119 }
120
116 public TypeMapping(AssetType assetType, InventoryType inventoryType, string contentType, string extension) 121 public TypeMapping(AssetType assetType, InventoryType inventoryType, string contentType, string extension)
117 : this((sbyte)assetType, inventoryType, contentType, null, extension) 122 : this((sbyte)assetType, (sbyte)inventoryType, contentType, null, extension)
123 {
124 }
125
126 public TypeMapping(AssetType assetType, FolderType inventoryType, string contentType, string extension)
127 : this((sbyte)assetType, (sbyte)inventoryType, contentType, null, extension)
118 { 128 {
119 } 129 }
120 130
121 public TypeMapping(OpenSimAssetType assetType, InventoryType inventoryType, string contentType, string extension) 131 public TypeMapping(OpenSimAssetType assetType, InventoryType inventoryType, string contentType, string extension)
122 : this((sbyte)assetType, inventoryType, contentType, null, extension) 132 : this((sbyte)assetType, (sbyte)inventoryType, contentType, null, extension)
123 { 133 {
124 } 134 }
125 } 135 }
@@ -145,53 +155,65 @@ namespace OpenSim.Framework
145 new TypeMapping(AssetType.Object, InventoryType.Object, "application/vnd.ll.primitive", "application/x-metaverse-primitive", "primitive"), 155 new TypeMapping(AssetType.Object, InventoryType.Object, "application/vnd.ll.primitive", "application/x-metaverse-primitive", "primitive"),
146 new TypeMapping(AssetType.Object, InventoryType.Attachment, "application/vnd.ll.primitive", "application/x-metaverse-primitive", "primitive"), 156 new TypeMapping(AssetType.Object, InventoryType.Attachment, "application/vnd.ll.primitive", "application/x-metaverse-primitive", "primitive"),
147 new TypeMapping(AssetType.Notecard, InventoryType.Notecard, "application/vnd.ll.notecard", "application/x-metaverse-notecard", "notecard"), 157 new TypeMapping(AssetType.Notecard, InventoryType.Notecard, "application/vnd.ll.notecard", "application/x-metaverse-notecard", "notecard"),
148 new TypeMapping(AssetType.Folder, InventoryType.Folder, "application/vnd.ll.folder", "folder"),
149 new TypeMapping(AssetType.RootFolder, InventoryType.RootCategory, "application/vnd.ll.rootfolder", "rootfolder"),
150 new TypeMapping(AssetType.LSLText, InventoryType.LSL, "application/vnd.ll.lsltext", "application/x-metaverse-lsl", "lsl"), 158 new TypeMapping(AssetType.LSLText, InventoryType.LSL, "application/vnd.ll.lsltext", "application/x-metaverse-lsl", "lsl"),
151 new TypeMapping(AssetType.LSLBytecode, InventoryType.LSL, "application/vnd.ll.lslbyte", "application/x-metaverse-lso", "lso"), 159 new TypeMapping(AssetType.LSLBytecode, InventoryType.LSL, "application/vnd.ll.lslbyte", "application/x-metaverse-lso", "lso"),
152 new TypeMapping(AssetType.Bodypart, InventoryType.Wearable, "application/vnd.ll.bodypart", "application/x-metaverse-bodypart", "bodypart"), 160 new TypeMapping(AssetType.Bodypart, InventoryType.Wearable, "application/vnd.ll.bodypart", "application/x-metaverse-bodypart", "bodypart"),
153 new TypeMapping(AssetType.TrashFolder, InventoryType.Folder, "application/vnd.ll.trashfolder", "trashfolder"),
154 new TypeMapping(AssetType.SnapshotFolder, InventoryType.Folder, "application/vnd.ll.snapshotfolder", "snapshotfolder"),
155 new TypeMapping(AssetType.LostAndFoundFolder, InventoryType.Folder, "application/vnd.ll.lostandfoundfolder", "lostandfoundfolder"),
156 new TypeMapping(AssetType.Animation, InventoryType.Animation, "application/vnd.ll.animation", "application/x-metaverse-animation", "animation"), 161 new TypeMapping(AssetType.Animation, InventoryType.Animation, "application/vnd.ll.animation", "application/x-metaverse-animation", "animation"),
157 new TypeMapping(AssetType.Gesture, InventoryType.Gesture, "application/vnd.ll.gesture", "application/x-metaverse-gesture", "gesture"), 162 new TypeMapping(AssetType.Gesture, InventoryType.Gesture, "application/vnd.ll.gesture", "application/x-metaverse-gesture", "gesture"),
158 new TypeMapping(AssetType.Simstate, InventoryType.Snapshot, "application/x-metaverse-simstate", "simstate"), 163 new TypeMapping(AssetType.Simstate, InventoryType.Snapshot, "application/x-metaverse-simstate", "simstate"),
159 new TypeMapping(AssetType.FavoriteFolder, InventoryType.Unknown, "application/vnd.ll.favoritefolder", "favoritefolder"),
160 new TypeMapping(AssetType.Link, InventoryType.Unknown, "application/vnd.ll.link", "link"), 164 new TypeMapping(AssetType.Link, InventoryType.Unknown, "application/vnd.ll.link", "link"),
161 new TypeMapping(AssetType.LinkFolder, InventoryType.Unknown, "application/vnd.ll.linkfolder", "linkfolder"), 165 new TypeMapping(AssetType.LinkFolder, InventoryType.Unknown, "application/vnd.ll.linkfolder", "linkfolder"),
162 new TypeMapping(AssetType.CurrentOutfitFolder, InventoryType.Unknown, "application/vnd.ll.currentoutfitfolder", "currentoutfitfolder"),
163 new TypeMapping(AssetType.OutfitFolder, InventoryType.Unknown, "application/vnd.ll.outfitfolder", "outfitfolder"),
164 new TypeMapping(AssetType.MyOutfitsFolder, InventoryType.Unknown, "application/vnd.ll.myoutfitsfolder", "myoutfitsfolder"),
165 new TypeMapping(AssetType.Mesh, InventoryType.Mesh, "application/vnd.ll.mesh", "llm"), 166 new TypeMapping(AssetType.Mesh, InventoryType.Mesh, "application/vnd.ll.mesh", "llm"),
167
168 // The next few items are about inventory folders
169 new TypeMapping(AssetType.Folder, FolderType.None, "application/vnd.ll.folder", "folder"),
170 new TypeMapping(AssetType.Folder, FolderType.Root, "application/vnd.ll.rootfolder", "rootfolder"),
171 new TypeMapping(AssetType.Folder, FolderType.Trash, "application/vnd.ll.trashfolder", "trashfolder"),
172 new TypeMapping(AssetType.Folder, FolderType.Snapshot, "application/vnd.ll.snapshotfolder", "snapshotfolder"),
173 new TypeMapping(AssetType.Folder, FolderType.LostAndFound, "application/vnd.ll.lostandfoundfolder", "lostandfoundfolder"),
174 new TypeMapping(AssetType.Folder, FolderType.Favorites, "application/vnd.ll.favoritefolder", "favoritefolder"),
175 new TypeMapping(AssetType.Folder, FolderType.CurrentOutfit, "application/vnd.ll.currentoutfitfolder", "currentoutfitfolder"),
176 new TypeMapping(AssetType.Folder, FolderType.Outfit, "application/vnd.ll.outfitfolder", "outfitfolder"),
177 new TypeMapping(AssetType.Folder, FolderType.MyOutfits, "application/vnd.ll.myoutfitsfolder", "myoutfitsfolder"),
166 178
179 // This next mappping is an asset to inventory item mapping.
180 // Note: LL stores folders as assets of type Folder = 8, and it has a corresponding InventoryType = 8
181 // OpenSim doesn't store folders as assets, so this mapping should only be used when parsing things from the viewer to the server
182 new TypeMapping(AssetType.Folder, InventoryType.Folder, "application/vnd.ll.folder", "folder"),
183
184 // OpenSim specific
167 new TypeMapping(OpenSimAssetType.Material, InventoryType.Unknown, "application/llsd+xml", "material") 185 new TypeMapping(OpenSimAssetType.Material, InventoryType.Unknown, "application/llsd+xml", "material")
168 }; 186 };
169 187
170 private static Dictionary<sbyte, string> asset2Content; 188 private static Dictionary<sbyte, string> asset2Content;
171 private static Dictionary<sbyte, string> asset2Extension; 189 private static Dictionary<sbyte, string> asset2Extension;
172 private static Dictionary<InventoryType, string> inventory2Content; 190 private static Dictionary<sbyte, string> inventory2Content;
173 private static Dictionary<string, sbyte> content2Asset; 191 private static Dictionary<string, sbyte> content2Asset;
174 private static Dictionary<string, InventoryType> content2Inventory; 192 private static Dictionary<string, sbyte> content2Inventory;
175 193
176 static SLUtil() 194 static SLUtil()
177 { 195 {
178 asset2Content = new Dictionary<sbyte, string>(); 196 asset2Content = new Dictionary<sbyte, string>();
179 asset2Extension = new Dictionary<sbyte, string>(); 197 asset2Extension = new Dictionary<sbyte, string>();
180 inventory2Content = new Dictionary<InventoryType, string>(); 198 inventory2Content = new Dictionary<sbyte, string>();
181 content2Asset = new Dictionary<string, sbyte>(); 199 content2Asset = new Dictionary<string, sbyte>();
182 content2Inventory = new Dictionary<string, InventoryType>(); 200 content2Inventory = new Dictionary<string, sbyte>();
183 201
184 foreach (TypeMapping mapping in MAPPINGS) 202 foreach (TypeMapping mapping in MAPPINGS)
185 { 203 {
186 sbyte assetType = mapping.AssetTypeCode; 204 sbyte assetType = mapping.AssetTypeCode;
187 if (!asset2Content.ContainsKey(assetType)) 205 if (!asset2Content.ContainsKey(assetType))
188 asset2Content.Add(assetType, mapping.ContentType); 206 asset2Content.Add(assetType, mapping.ContentType);
207
189 if (!asset2Extension.ContainsKey(assetType)) 208 if (!asset2Extension.ContainsKey(assetType))
190 asset2Extension.Add(assetType, mapping.Extension); 209 asset2Extension.Add(assetType, mapping.Extension);
210
191 if (!inventory2Content.ContainsKey(mapping.InventoryType)) 211 if (!inventory2Content.ContainsKey(mapping.InventoryType))
192 inventory2Content.Add(mapping.InventoryType, mapping.ContentType); 212 inventory2Content.Add(mapping.InventoryType, mapping.ContentType);
213
193 if (!content2Asset.ContainsKey(mapping.ContentType)) 214 if (!content2Asset.ContainsKey(mapping.ContentType))
194 content2Asset.Add(mapping.ContentType, assetType); 215 content2Asset.Add(mapping.ContentType, assetType);
216
195 if (!content2Inventory.ContainsKey(mapping.ContentType)) 217 if (!content2Inventory.ContainsKey(mapping.ContentType))
196 content2Inventory.Add(mapping.ContentType, mapping.InventoryType); 218 content2Inventory.Add(mapping.ContentType, mapping.InventoryType);
197 219
@@ -216,8 +238,8 @@ namespace OpenSim.Framework
216 public static string SLInvTypeToContentType(int invType) 238 public static string SLInvTypeToContentType(int invType)
217 { 239 {
218 string contentType; 240 string contentType;
219 if (!inventory2Content.TryGetValue((InventoryType)invType, out contentType)) 241 if (!inventory2Content.TryGetValue((sbyte)invType, out contentType))
220 contentType = inventory2Content[InventoryType.Unknown]; 242 contentType = inventory2Content[(sbyte)InventoryType.Unknown];
221 return contentType; 243 return contentType;
222 } 244 }
223 245
@@ -231,9 +253,9 @@ namespace OpenSim.Framework
231 253
232 public static sbyte ContentTypeToSLInvType(string contentType) 254 public static sbyte ContentTypeToSLInvType(string contentType)
233 { 255 {
234 InventoryType invType; 256 sbyte invType;
235 if (!content2Inventory.TryGetValue(contentType, out invType)) 257 if (!content2Inventory.TryGetValue(contentType, out invType))
236 invType = InventoryType.Unknown; 258 invType = (sbyte)InventoryType.Unknown;
237 return (sbyte)invType; 259 return (sbyte)invType;
238 } 260 }
239 261
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs
index 73ebfae..ab3c285 100644
--- a/OpenSim/Framework/Serialization/ArchiveConstants.cs
+++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs
@@ -115,20 +115,16 @@ namespace OpenSim.Framework.Serialization
115 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageJPEG] = ASSET_EXTENSION_SEPARATOR + "image.jpg"; 115 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageJPEG] = ASSET_EXTENSION_SEPARATOR + "image.jpg";
116 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageTGA] = ASSET_EXTENSION_SEPARATOR + "image.tga"; 116 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageTGA] = ASSET_EXTENSION_SEPARATOR + "image.tga";
117 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Landmark] = ASSET_EXTENSION_SEPARATOR + "landmark.txt"; 117 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Landmark] = ASSET_EXTENSION_SEPARATOR + "landmark.txt";
118 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LostAndFoundFolder] = ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"; // Not sure if we'll ever see this
119 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLBytecode] = ASSET_EXTENSION_SEPARATOR + "bytecode.lso"; 118 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLBytecode] = ASSET_EXTENSION_SEPARATOR + "bytecode.lso";
120 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLText] = ASSET_EXTENSION_SEPARATOR + "script.lsl"; 119 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLText] = ASSET_EXTENSION_SEPARATOR + "script.lsl";
121 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Mesh] = ASSET_EXTENSION_SEPARATOR + "mesh.llmesh"; 120 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Mesh] = ASSET_EXTENSION_SEPARATOR + "mesh.llmesh";
122 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt"; 121 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt";
123 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml"; 122 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml";
124 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this
125 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this 123 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this
126 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this
127 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg"; 124 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg";
128 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV] = ASSET_EXTENSION_SEPARATOR + "sound.wav"; 125 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV] = ASSET_EXTENSION_SEPARATOR + "sound.wav";
129 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Texture] = ASSET_EXTENSION_SEPARATOR + "texture.jp2"; 126 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Texture] = ASSET_EXTENSION_SEPARATOR + "texture.jp2";
130 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TextureTGA] = ASSET_EXTENSION_SEPARATOR + "texture.tga"; 127 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TextureTGA] = ASSET_EXTENSION_SEPARATOR + "texture.tga";
131 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TrashFolder] = ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"; // Not sure if we'll ever see this
132 ASSET_TYPE_TO_EXTENSION[(sbyte)OpenSimAssetType.Material] = ASSET_EXTENSION_SEPARATOR + "material.xml"; // Not sure if we'll ever see this 128 ASSET_TYPE_TO_EXTENSION[(sbyte)OpenSimAssetType.Material] = ASSET_EXTENSION_SEPARATOR + "material.xml"; // Not sure if we'll ever see this
133 129
134 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "animation.bvh"] = (sbyte)AssetType.Animation; 130 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "animation.bvh"] = (sbyte)AssetType.Animation;
@@ -140,21 +136,17 @@ namespace OpenSim.Framework.Serialization
140 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.jpg"] = (sbyte)AssetType.ImageJPEG; 136 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.jpg"] = (sbyte)AssetType.ImageJPEG;
141 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.tga"] = (sbyte)AssetType.ImageTGA; 137 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.tga"] = (sbyte)AssetType.ImageTGA;
142 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "landmark.txt"] = (sbyte)AssetType.Landmark; 138 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "landmark.txt"] = (sbyte)AssetType.Landmark;
143 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"] = (sbyte)AssetType.LostAndFoundFolder;
144 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bytecode.lso"] = (sbyte)AssetType.LSLBytecode; 139 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bytecode.lso"] = (sbyte)AssetType.LSLBytecode;
145 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.lsl"] = (sbyte)AssetType.LSLText; 140 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.lsl"] = (sbyte)AssetType.LSLText;
146 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "mesh.llmesh"] = (sbyte)AssetType.Mesh; 141 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "mesh.llmesh"] = (sbyte)AssetType.Mesh;
147 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard; 142 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard;
148 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object; 143 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object;
149 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder;
150 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate; 144 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate;
151 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder;
152 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound; 145 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound;
153 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.wav"] = (sbyte)AssetType.SoundWAV; 146 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.wav"] = (sbyte)AssetType.SoundWAV;
154 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.jp2"] = (sbyte)AssetType.Texture; 147 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.jp2"] = (sbyte)AssetType.Texture;
155 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.tga"] = (sbyte)AssetType.TextureTGA; 148 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.tga"] = (sbyte)AssetType.TextureTGA;
156 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder; 149 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "material.xml"] = (sbyte)OpenSimAssetType.Material;
157 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "material.xml"] = (sbyte)OpenSimAssetType.Material;
158 } 150 }
159 151
160 public static string CreateOarLandDataPath(LandData ld) 152 public static string CreateOarLandDataPath(LandData ld)
diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs
index 25d2393..1975a4d 100644
--- a/OpenSim/Framework/Tests/AssetBaseTest.cs
+++ b/OpenSim/Framework/Tests/AssetBaseTest.cs
@@ -50,19 +50,15 @@ namespace OpenSim.Framework.Tests
50 CheckContainsReferences(AssetType.ImageJPEG , false); 50 CheckContainsReferences(AssetType.ImageJPEG , false);
51 CheckContainsReferences(AssetType.ImageTGA , false); 51 CheckContainsReferences(AssetType.ImageTGA , false);
52 CheckContainsReferences(AssetType.Landmark , false); 52 CheckContainsReferences(AssetType.Landmark , false);
53 CheckContainsReferences(AssetType.LostAndFoundFolder, false);
54 CheckContainsReferences(AssetType.LSLBytecode, false); 53 CheckContainsReferences(AssetType.LSLBytecode, false);
55 CheckContainsReferences(AssetType.LSLText, false); 54 CheckContainsReferences(AssetType.LSLText, false);
56 CheckContainsReferences(AssetType.Notecard, false); 55 CheckContainsReferences(AssetType.Notecard, false);
57 CheckContainsReferences(AssetType.Object, false); 56 CheckContainsReferences(AssetType.Object, false);
58 CheckContainsReferences(AssetType.RootFolder, false);
59 CheckContainsReferences(AssetType.Simstate, false); 57 CheckContainsReferences(AssetType.Simstate, false);
60 CheckContainsReferences(AssetType.SnapshotFolder, false);
61 CheckContainsReferences(AssetType.Sound, false); 58 CheckContainsReferences(AssetType.Sound, false);
62 CheckContainsReferences(AssetType.SoundWAV, false); 59 CheckContainsReferences(AssetType.SoundWAV, false);
63 CheckContainsReferences(AssetType.Texture, false); 60 CheckContainsReferences(AssetType.Texture, false);
64 CheckContainsReferences(AssetType.TextureTGA, false); 61 CheckContainsReferences(AssetType.TextureTGA, false);
65 CheckContainsReferences(AssetType.TrashFolder, false);
66 CheckContainsReferences(AssetType.Unknown, false); 62 CheckContainsReferences(AssetType.Unknown, false);
67 } 63 }
68 64