aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs70
1 files changed, 10 insertions, 60 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index ce7c368..fb87677 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -35,29 +35,23 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque. 35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque.
36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation. 36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation.
37 /// </summary> 37 /// </summary>
38 /// 38 ///
39 public class AutoBackupModuleState 39 public class AutoBackupModuleState
40 { 40 {
41 private Dictionary<Guid, string> m_liveRequests = null;
42
43 public AutoBackupModuleState() 41 public AutoBackupModuleState()
44 { 42 {
45 this.Enabled = false; 43 Enabled = false;
46 this.BackupDir = "."; 44 SkipAssets = false;
47 this.BusyCheck = true; 45 NamingType = NamingType.Time;
48 this.SkipAssets = false; 46 Script = null;
49 this.Timer = null;
50 this.NamingType = NamingType.Time;
51 this.Script = null;
52 this.KeepFilesForDays = 0;
53 } 47 }
54 48
55 public Dictionary<Guid, string> LiveRequests 49 public AutoBackupModuleState(AutoBackupModuleState copyFrom)
56 { 50 {
57 get { 51 Enabled = copyFrom.Enabled;
58 return this.m_liveRequests ?? 52 SkipAssets = copyFrom.SkipAssets;
59 (this.m_liveRequests = new Dictionary<Guid, string>(1)); 53 NamingType = copyFrom.NamingType;
60 } 54 Script = copyFrom.Script;
61 } 55 }
62 56
63 public bool Enabled 57 public bool Enabled
@@ -66,33 +60,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
66 set; 60 set;
67 } 61 }
68 62
69 public System.Timers.Timer Timer
70 {
71 get;
72 set;
73 }
74
75 public double IntervalMinutes
76 {
77 get
78 {
79 if (this.Timer == null)
80 {
81 return -1.0;
82 }
83 else
84 {
85 return this.Timer.Interval / 60000.0;
86 }
87 }
88 }
89
90 public bool BusyCheck
91 {
92 get;
93 set;
94 }
95
96 public bool SkipAssets 63 public bool SkipAssets
97 { 64 {
98 get; 65 get;
@@ -105,36 +72,19 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
105 set; 72 set;
106 } 73 }
107 74
108 public string BackupDir
109 {
110 get;
111 set;
112 }
113
114 public NamingType NamingType 75 public NamingType NamingType
115 { 76 {
116 get; 77 get;
117 set; 78 set;
118 } 79 }
119 80
120 public int KeepFilesForDays
121 {
122 get;
123 set;
124 }
125
126 public new string ToString() 81 public new string ToString()
127 { 82 {
128 string retval = ""; 83 string retval = "";
129
130 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n"; 84 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n";
131 retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n";
132 retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n";
133 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n"; 85 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n";
134 retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n";
135 retval += "[AUTO BACKUP]: Script: " + Script + "\n"; 86 retval += "[AUTO BACKUP]: Script: " + Script + "\n";
136 return retval; 87 return retval;
137 } 88 }
138 } 89 }
139} 90}
140