aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs11
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/IRegionArchiver.cs49
2 files changed, 7 insertions, 53 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index df17ad2..de60472 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -40,9 +40,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
40 /// <summary> 40 /// <summary>
41 /// This module loads and saves OpenSimulator archives 41 /// This module loads and saves OpenSimulator archives
42 /// </summary> 42 /// </summary>
43 public class ArchiverModule : IRegionModule, IRegionArchiver 43 public class ArchiverModule : IRegionModule, IRegionArchiverModule
44 { 44 {
45 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <summary> 47 /// <summary>
48 /// Scene to which this module belongs 48 /// Scene to which this module belongs
@@ -58,8 +58,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
58 public void Initialise(Scene scene, IConfigSource source) 58 public void Initialise(Scene scene, IConfigSource source)
59 { 59 {
60 m_scene = scene; 60 m_scene = scene;
61 61 m_scene.RegisterModuleInterface<IRegionArchiverModule>(this);
62 m_scene.RegisterModuleInterface<IRegionArchiver>(this);
63 } 62 }
64 63
65 public void PostInitialise() 64 public void PostInitialise()
@@ -72,11 +71,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
72 71
73 public void ArchiveRegion(string savePath) 72 public void ArchiveRegion(string savePath)
74 { 73 {
74 m_log.InfoFormat("[SCENE]: Writing archive for region {0} to {1}", m_scene.RegionInfo.RegionName, savePath);
75
75 new ArchiveWriteRequestPreparation(m_scene, savePath).ArchiveRegion(); 76 new ArchiveWriteRequestPreparation(m_scene, savePath).ArchiveRegion();
76 } 77 }
77 78
78 public void DearchiveRegion(string loadPath) 79 public void DearchiveRegion(string loadPath)
79 { 80 {
81 m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath);
82
80 new ArchiveReadRequest(m_scene, loadPath); 83 new ArchiveReadRequest(m_scene, loadPath);
81 } 84 }
82 } 85 }
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/IRegionArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/IRegionArchiver.cs
deleted file mode 100644
index b949666..0000000
--- a/OpenSim/Region/Environment/Modules/World/Archiver/IRegionArchiver.cs
+++ /dev/null
@@ -1,49 +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 OpenSim.Region.Environment.Scenes;
29
30namespace OpenSim.Region.Environment.Modules.World.Archiver
31{
32 /// <summary>
33 /// Interface to region archive functionality
34 /// </summary>
35 public interface IRegionArchiver
36 {
37 /// <summary>
38 /// Archive the region to the given path
39 /// </summary>
40 /// <param name="savePath"></param>
41 void ArchiveRegion(string savePath);
42
43 /// <summary>
44 /// Dearchive the given region archive into the scene
45 /// </summary>
46 /// <param name="loadPath"></param>
47 void DearchiveRegion(string loadPath);
48 }
49}