diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs index de60472..f07185c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs | |||
@@ -25,15 +25,16 @@ | |||
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 | ||
28 | using OpenSim.Framework.Communications.Cache; | ||
29 | using OpenSim.Region.Environment.Interfaces; | ||
30 | using OpenSim.Region.Environment.Modules.World.Serialiser; | ||
31 | using OpenSim.Region.Environment.Scenes; | ||
32 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.IO; | ||
33 | using System.Reflection; | 30 | using System.Reflection; |
34 | using OpenMetaverse; | 31 | using OpenMetaverse; |
35 | using log4net; | 32 | using log4net; |
36 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework.Communications.Cache; | ||
35 | using OpenSim.Region.Environment.Interfaces; | ||
36 | using OpenSim.Region.Environment.Modules.World.Serialiser; | ||
37 | using OpenSim.Region.Environment.Scenes; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.Environment.Modules.World.Archiver | 39 | namespace OpenSim.Region.Environment.Modules.World.Archiver |
39 | { | 40 | { |
@@ -44,14 +45,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
44 | { | 45 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 47 | ||
47 | /// <summary> | ||
48 | /// Scene to which this module belongs | ||
49 | /// </summary> | ||
50 | /// <param name="scene"></param> | ||
51 | /// <param name="source"></param> | ||
52 | private Scene m_scene; | 48 | private Scene m_scene; |
53 | 49 | ||
54 | public string Name { get { return "ArchiverModule"; } } | 50 | public string Name { get { return "Archiver Module"; } } |
55 | 51 | ||
56 | public bool IsSharedModule { get { return false; } } | 52 | public bool IsSharedModule { get { return false; } } |
57 | 53 | ||
@@ -75,12 +71,22 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
75 | 71 | ||
76 | new ArchiveWriteRequestPreparation(m_scene, savePath).ArchiveRegion(); | 72 | new ArchiveWriteRequestPreparation(m_scene, savePath).ArchiveRegion(); |
77 | } | 73 | } |
74 | |||
75 | public void ArchiveRegion(Stream saveStream) | ||
76 | { | ||
77 | new ArchiveWriteRequestPreparation(m_scene, saveStream).ArchiveRegion(); | ||
78 | } | ||
78 | 79 | ||
79 | public void DearchiveRegion(string loadPath) | 80 | public void DearchiveRegion(string loadPath) |
80 | { | 81 | { |
81 | m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); | 82 | m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); |
82 | 83 | ||
83 | new ArchiveReadRequest(m_scene, loadPath); | 84 | new ArchiveReadRequest(m_scene, loadPath).DearchiveRegion(); |
85 | } | ||
86 | |||
87 | public void DearchiveRegion(Stream loadStream) | ||
88 | { | ||
89 | new ArchiveReadRequest(m_scene, loadStream).DearchiveRegion(); | ||
84 | } | 90 | } |
85 | } | 91 | } |
86 | } | 92 | } |