From d10b5e29bcef7335d38d4cbb590b60b7b171897b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 14 May 2009 16:33:04 +0000 Subject: * refactor: break some of xml2 serialization out of sog --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 3 ++- .../CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs | 3 ++- OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 3 ++- OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index f4c5cba..34640ae 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -44,6 +44,7 @@ using OpenSim.Framework.Communications.Osp; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Setup; @@ -108,7 +109,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); AssetBase asset1 = new AssetBase(); asset1.FullID = asset1Id; - asset1.Data = Encoding.ASCII.GetBytes(object1.ToXmlString2()); + asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); cm.AssetCache.AddAsset(asset1); // Create item diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs index 6ad3b73..606b47c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs @@ -276,7 +276,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Interregion RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); if (regInfo != null) { - return m_regionClient.DoCreateObjectCall(regInfo, sog, m_aScene.m_allowScriptCrossings); + return m_regionClient.DoCreateObjectCall( + regInfo, sog, SceneObjectSerializer.ToXml2Format(sog), m_aScene.m_allowScriptCrossings); } //else // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index c052bda..2012ea8 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -39,6 +39,7 @@ using OpenSim.Framework.Serialization; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.World.Terrain; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Setup; @@ -242,7 +243,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests part1Name, Math.Round(groupPosition.X), Math.Round(groupPosition.Y), Math.Round(groupPosition.Z), part1.UUID); - tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, object1.ToXmlString2()); + tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, SceneObjectSerializer.ToXml2Format(object1)); tar.Close(); diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs index ed6448f..af2e350 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs @@ -31,6 +31,7 @@ using System.IO.Compression; using System.Text; using System.Xml; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Scenes.Serialization; namespace OpenSim.Region.CoreModules.World.Serialiser { @@ -86,7 +87,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser { if (ent is SceneObjectGroup) { - EntityXml.Add(((SceneObjectGroup) ent).ToXmlString2()); + EntityXml.Add(SceneObjectSerializer.ToXml2Format((SceneObjectGroup)ent)); } } EntityXml.Sort(); -- cgit v1.1