aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-19 19:07:11 +0000
committerJustin Clarke Casey2008-12-19 19:07:11 +0000
commiteb6cca4750e1fff2c1d8e0be93564b5f122571d9 (patch)
tree8c57e209eb1470f27e0b5aef0bbf03ff08686e99 /OpenSim/Region/Environment/Modules/World
parentReset Expire date for tempOnRez objects on rez. Fixes Mantis#2848 (diff)
downloadopensim-SC-eb6cca4750e1fff2c1d8e0be93564b5f122571d9.zip
opensim-SC-eb6cca4750e1fff2c1d8e0be93564b5f122571d9.tar.gz
opensim-SC-eb6cca4750e1fff2c1d8e0be93564b5f122571d9.tar.bz2
opensim-SC-eb6cca4750e1fff2c1d8e0be93564b5f122571d9.tar.xz
* refactor: Rename IRegionSerialiser and move into interfaces namespace
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs120
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs4
5 files changed, 11 insertions, 131 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index 3cd0652..e04662f 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -25,11 +25,6 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using OpenSim.Framework;
29using OpenSim.Region.Environment.Scenes;
30using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Modules.World.Terrain;
32using OpenSim.Framework.Communications.Cache;
33using System; 28using System;
34using System.Collections.Generic; 29using System.Collections.Generic;
35using System.IO; 30using System.IO;
@@ -39,6 +34,11 @@ using System.Xml;
39using System.Net; 34using System.Net;
40using OpenMetaverse; 35using OpenMetaverse;
41using log4net; 36using log4net;
37using OpenSim.Framework;
38using OpenSim.Framework.Communications.Cache;
39using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes;
41using OpenSim.Region.Environment.Modules.World.Terrain;
42 42
43namespace OpenSim.Region.Environment.Modules.World.Archiver 43namespace OpenSim.Region.Environment.Modules.World.Archiver
44{ 44{
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
124 // Reload serialized prims 124 // Reload serialized prims
125 m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); 125 m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
126 126
127 IRegionSerialiser serialiser = m_scene.RequestModuleInterface<IRegionSerialiser>(); 127 IRegionSerialiserModule serialiser = m_scene.RequestModuleInterface<IRegionSerialiserModule>();
128 ICollection<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 128 ICollection<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
129 129
130 foreach (string serialisedSceneObject in serialisedSceneObjects) 130 foreach (string serialisedSceneObject in serialisedSceneObjects)
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
index 5b4d9e5..73fa5d2 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 protected ITerrainModule m_terrainModule; 56 protected ITerrainModule m_terrainModule;
57 protected IRegionSerialiser m_serialiser; 57 protected IRegionSerialiserModule m_serialiser;
58 protected List<SceneObjectGroup> m_sceneObjects; 58 protected List<SceneObjectGroup> m_sceneObjects;
59 protected string m_sceneName; 59 protected string m_sceneName;
60 protected string m_savePath; 60 protected string m_savePath;
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
62 public ArchiveWriteRequestExecution( 62 public ArchiveWriteRequestExecution(
63 List<SceneObjectGroup> sceneObjects, 63 List<SceneObjectGroup> sceneObjects,
64 ITerrainModule terrainModule, 64 ITerrainModule terrainModule,
65 IRegionSerialiser serialiser, 65 IRegionSerialiserModule serialiser,
66 string sceneName, 66 string sceneName,
67 string savePath) 67 string savePath)
68 { 68 {
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index bb3a18d..9cf6bf5 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
287 = new ArchiveWriteRequestExecution( 287 = new ArchiveWriteRequestExecution(
288 sceneObjects, 288 sceneObjects,
289 m_scene.RequestModuleInterface<ITerrainModule>(), 289 m_scene.RequestModuleInterface<ITerrainModule>(),
290 m_scene.RequestModuleInterface<IRegionSerialiser>(), 290 m_scene.RequestModuleInterface<IRegionSerialiserModule>(),
291 m_scene.RegionInfo.RegionName, 291 m_scene.RegionInfo.RegionName,
292 m_savePath); 292 m_savePath);
293 new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); 293 new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
deleted file mode 100644
index bbc4acf..0000000
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29using System.Collections.Generic;
30using System.IO;
31using OpenSim.Region.Environment.Scenes;
32
33namespace OpenSim.Region.Environment.Modules.World.Serialiser
34{
35 public interface IRegionSerialiser
36 {
37 List<string> SerialiseRegion(Scene scene, string saveDir);
38
39 /// <summary>
40 /// Load prims from the xml format
41 /// </summary>
42 /// <param name="scene"></param>
43 /// <param name="fileName"></param>
44 /// <param name="newIDS"></param>
45 /// <param name="loadOffset"></param>
46 void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset);
47
48 /// <summary>
49 /// Save prims in the xml format
50 /// </summary>
51 /// <param name="scene"> </param>
52 /// <param name="fileName"></param>
53 void SavePrimsToXml(Scene scene, string fileName);
54
55 /// <summary>
56 /// Load prims from the xml2 format
57 /// </summary>
58 /// <param name="scene"></param>
59 /// <param name="fileName"></param>
60 void LoadPrimsFromXml2(Scene scene, string fileName);
61
62 /// <summary>
63 /// Load prims from the xml2 format
64 /// </summary>
65 /// <param name="scene"></param>
66 /// <param name="reader"></param>
67 /// <param name="startScripts"></param>
68 void LoadPrimsFromXml2(Scene scene, TextReader reader, bool startScripts);
69
70 /// <summary>
71 /// Save prims in the xml2 format
72 /// </summary>
73 /// <param name="scene"></param>
74 /// <param name="fileName"></param>
75 void SavePrimsToXml2(Scene scene, string fileName);
76
77 /// <summary>
78 /// Save prims in the xml2 format, optionally specifying a bounding box for which
79 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
80 /// are exported.
81 /// </summary>
82 /// <param name="scene"></param>
83 /// <param name="stream"></param>
84 /// <param name="min"></param>
85 /// <param name="max"></param>
86 void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max);
87
88 /// <summary>
89 /// Save a set of prims in the xml2 format
90 /// </summary>
91 /// <param name="entityList"></param>
92 /// <param name="fileName"></param>
93 void SavePrimListToXml2(List<EntityBase> entityList, string fileName);
94
95 /// <summary>
96 /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which
97 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
98 /// are exported.
99 /// </summary>
100 /// <param name="entityList"></param>
101 /// <param name="stream"></param>
102 /// <param name="min"></param>
103 /// <param name="max"></param>
104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max);
105
106 /// <summary>
107 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
108 /// </summary>
109 /// <param name="xmlString"></param>
110 /// <returns>The scene object created. null if the scene object already existed</returns>
111 SceneObjectGroup DeserializeGroupFromXml2(string xmlString);
112
113 /// <summary>
114 /// Serialize an individual scene object into the xml2 format
115 /// </summary>
116 /// <param name="grp"></param>
117 /// <returns></returns>
118 string SaveGroupToXml2(SceneObjectGroup grp);
119 }
120}
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index e3eb377..8b5dd2c 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -36,7 +36,7 @@ using OpenSim.Region.Environment.Scenes;
36 36
37namespace OpenSim.Region.Environment.Modules.World.Serialiser 37namespace OpenSim.Region.Environment.Modules.World.Serialiser
38{ 38{
39 public class SerialiserModule : IRegionModule, IRegionSerialiser 39 public class SerialiserModule : IRegionModule, IRegionSerialiserModule
40 { 40 {
41 private Commander m_commander = new Commander("Export"); 41 private Commander m_commander = new Commander("Export");
42 private List<Scene> m_regions = new List<Scene>(); 42 private List<Scene> m_regions = new List<Scene>();
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
49 { 49 {
50 scene.RegisterModuleCommander("Export", m_commander); 50 scene.RegisterModuleCommander("Export", m_commander);
51 scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; 51 scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
52 scene.RegisterModuleInterface<IRegionSerialiser>(this); 52 scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
53 53
54 lock (m_regions) 54 lock (m_regions)
55 { 55 {