aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authorMelanie2010-09-13 16:16:40 +0100
committerMelanie2010-09-13 16:17:38 +0100
commit6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e (patch)
tree1e7bf4fddcf559886c6b2babf13cf4b2ca8829a1 /OpenSim/Framework/PrimitiveBaseShape.cs
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
parentFix unit test SceneSetupHelpers to load the mock simulation data store (diff)
downloadopensim-SC-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.zip
opensim-SC-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.gz
opensim-SC-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.bz2
opensim-SC-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.xz
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please don't use until I do the companion commit to modules later on.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs74
1 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index a4587d8..f07ab7c 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Framework
175 } 175 }
176 } 176 }
177 } 177 }
178 178
179 /// <summary> 179 /// <summary>
180 /// Entries to store media textures on each face 180 /// Entries to store media textures on each face
181 /// </summary> 181 /// </summary>
@@ -1216,28 +1216,28 @@ namespace OpenSim.Framework
1216 prim.Properties.Permissions = new Permissions(); 1216 prim.Properties.Permissions = new Permissions();
1217 prim.Properties.SalePrice = 10; 1217 prim.Properties.SalePrice = 10;
1218 prim.Properties.SaleType = new SaleType(); 1218 prim.Properties.SaleType = new SaleType();
1219 1219
1220 return prim; 1220 return prim;
1221 } 1221 }
1222 1222
1223 /// <summary> 1223 /// <summary>
1224 /// Encapsulates a list of media entries. 1224 /// Encapsulates a list of media entries.
1225 /// </summary> 1225 /// </summary>
1226 /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more 1226 /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more
1227 /// OSD like and less vulnerable to change. 1227 /// OSD like and less vulnerable to change.
1228 public class MediaList : List<MediaEntry>, IXmlSerializable 1228 public class MediaList : List<MediaEntry>, IXmlSerializable
1229 { 1229 {
1230 public const string MEDIA_TEXTURE_TYPE = "sl"; 1230 public const string MEDIA_TEXTURE_TYPE = "sl";
1231 1231
1232 public MediaList() : base() {} 1232 public MediaList() : base() {}
1233 public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {} 1233 public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {}
1234 public MediaList(int capacity) : base(capacity) {} 1234 public MediaList(int capacity) : base(capacity) {}
1235 1235
1236 public XmlSchema GetSchema() 1236 public XmlSchema GetSchema()
1237 { 1237 {
1238 return null; 1238 return null;
1239 } 1239 }
1240 1240
1241 public string ToXml() 1241 public string ToXml()
1242 { 1242 {
1243 lock (this) 1243 lock (this)
@@ -1245,78 +1245,78 @@ namespace OpenSim.Framework
1245 using (StringWriter sw = new StringWriter()) 1245 using (StringWriter sw = new StringWriter())
1246 { 1246 {
1247 using (XmlTextWriter xtw = new XmlTextWriter(sw)) 1247 using (XmlTextWriter xtw = new XmlTextWriter(sw))
1248 { 1248 {
1249 xtw.WriteStartElement("OSMedia"); 1249 xtw.WriteStartElement("OSMedia");
1250 xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE); 1250 xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE);
1251 xtw.WriteAttributeString("version", "0.1"); 1251 xtw.WriteAttributeString("version", "0.1");
1252 1252
1253 OSDArray meArray = new OSDArray(); 1253 OSDArray meArray = new OSDArray();
1254 foreach (MediaEntry me in this) 1254 foreach (MediaEntry me in this)
1255 { 1255 {
1256 OSD osd = (null == me ? new OSD() : me.GetOSD()); 1256 OSD osd = (null == me ? new OSD() : me.GetOSD());
1257 meArray.Add(osd); 1257 meArray.Add(osd);
1258 } 1258 }
1259 1259
1260 xtw.WriteStartElement("OSData"); 1260 xtw.WriteStartElement("OSData");
1261 xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray)); 1261 xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray));
1262 xtw.WriteEndElement(); 1262 xtw.WriteEndElement();
1263 1263
1264 xtw.WriteEndElement(); 1264 xtw.WriteEndElement();
1265 1265
1266 xtw.Flush(); 1266 xtw.Flush();
1267 return sw.ToString(); 1267 return sw.ToString();
1268 } 1268 }
1269 } 1269 }
1270 } 1270 }
1271 } 1271 }
1272 1272
1273 public void WriteXml(XmlWriter writer) 1273 public void WriteXml(XmlWriter writer)
1274 { 1274 {
1275 writer.WriteRaw(ToXml()); 1275 writer.WriteRaw(ToXml());
1276 } 1276 }
1277 1277
1278 public static MediaList FromXml(string rawXml) 1278 public static MediaList FromXml(string rawXml)
1279 { 1279 {
1280 MediaList ml = new MediaList(); 1280 MediaList ml = new MediaList();
1281 ml.ReadXml(rawXml); 1281 ml.ReadXml(rawXml);
1282 return ml; 1282 return ml;
1283 } 1283 }
1284 1284
1285 public void ReadXml(string rawXml) 1285 public void ReadXml(string rawXml)
1286 { 1286 {
1287 using (StringReader sr = new StringReader(rawXml)) 1287 using (StringReader sr = new StringReader(rawXml))
1288 { 1288 {
1289 using (XmlTextReader xtr = new XmlTextReader(sr)) 1289 using (XmlTextReader xtr = new XmlTextReader(sr))
1290 { 1290 {
1291 xtr.MoveToContent(); 1291 xtr.MoveToContent();
1292 1292
1293 string type = xtr.GetAttribute("type"); 1293 string type = xtr.GetAttribute("type");
1294 //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type); 1294 //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type);
1295 1295
1296 if (type != MEDIA_TEXTURE_TYPE) 1296 if (type != MEDIA_TEXTURE_TYPE)
1297 return; 1297 return;
1298 1298
1299 xtr.ReadStartElement("OSMedia"); 1299 xtr.ReadStartElement("OSMedia");
1300 1300
1301 OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); 1301 OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
1302 foreach (OSD osdMe in osdMeArray) 1302 foreach (OSD osdMe in osdMeArray)
1303 { 1303 {
1304 MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); 1304 MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
1305 Add(me); 1305 Add(me);
1306 } 1306 }
1307 1307
1308 xtr.ReadEndElement(); 1308 xtr.ReadEndElement();
1309 } 1309 }
1310 } 1310 }
1311 } 1311 }
1312 1312
1313 public void ReadXml(XmlReader reader) 1313 public void ReadXml(XmlReader reader)
1314 { 1314 {
1315 if (reader.IsEmptyElement) 1315 if (reader.IsEmptyElement)
1316 return; 1316 return;
1317 1317
1318 ReadXml(reader.ReadInnerXml()); 1318 ReadXml(reader.ReadInnerXml());
1319 } 1319 }
1320 } 1320 }
1321 } 1321 }
1322} \ No newline at end of file 1322}