aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptServer
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Grid/ScriptServer
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Grid/ScriptServer')
-rw-r--r--OpenSim/Grid/ScriptServer/Application.cs17
-rw-r--r--OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs31
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs214
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs12
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs12
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs3
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs9
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServerMain.cs14
8 files changed, 216 insertions, 96 deletions
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs
index 7fc9a53..e049fd7 100644
--- a/OpenSim/Grid/ScriptServer/Application.cs
+++ b/OpenSim/Grid/ScriptServer/Application.cs
@@ -26,25 +26,23 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31 29
32namespace OpenSim.Grid.ScriptServer 30namespace OpenSim.Grid.ScriptServer
33{ 31{
34 class OpenScript_Main 32 internal class OpenScript_Main
35 { 33 {
36
37 public static ScriptServerMain SE; 34 public static ScriptServerMain SE;
38 35
39 static void Main(string[] args) 36 private static void Main(string[] args)
40 { 37 {
41 // Application is starting 38 // Application is starting
42 SE = new ScriptServerMain(); 39 SE = new ScriptServerMain();
43 40
44 System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 41 AppDomain.CurrentDomain.UnhandledException +=
42 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
45 } 43 }
46 44
47 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) 45 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
48 { 46 {
49 Console.WriteLine(""); 47 Console.WriteLine("");
50 Console.WriteLine("APPLICATION EXCEPTION DETECTED"); 48 Console.WriteLine("APPLICATION EXCEPTION DETECTED");
@@ -53,6 +51,5 @@ namespace OpenSim.Grid.ScriptServer
53 Console.WriteLine("Exception:"); 51 Console.WriteLine("Exception:");
54 Console.WriteLine(e.ExceptionObject.ToString()); 52 Console.WriteLine(e.ExceptionObject.ToString());
55 } 53 }
56
57 } 54 }
58} 55} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
index 63f40d4..2886ec7 100644
--- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
@@ -1,26 +1,28 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
4 3
5// General Information about an assembly is controlled through the following 4// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 5// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 6// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] 7
9[assembly: AssemblyDescription("")] 8[assembly : AssemblyTitle("OpenSim.Grid.ScriptServer")]
10[assembly: AssemblyConfiguration("")] 9[assembly : AssemblyDescription("")]
11[assembly: AssemblyCompany("")] 10[assembly : AssemblyConfiguration("")]
12[assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] 11[assembly : AssemblyCompany("")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 12[assembly : AssemblyProduct("OpenSim.Grid.ScriptServer")]
14[assembly: AssemblyTrademark("")] 13[assembly : AssemblyCopyright("Copyright © 2007")]
15[assembly: AssemblyCulture("")] 14[assembly : AssemblyTrademark("")]
15[assembly : AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20
21[assembly : ComVisible(false)]
21 22
22// The following GUID is for the ID of the typelib if this project is exposed to COM 23// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] 24
25[assembly : Guid("b6861b87-5203-4040-b756-fd4774932f82")]
24 26
25// Version information for an assembly consists of the following four values: 27// Version information for an assembly consists of the following four values:
26// 28//
@@ -29,5 +31,6 @@ using System.Runtime.InteropServices;
29// Build Number 31// Build Number
30// Revision 32// Revision
31// 33//
32[assembly: AssemblyVersion("1.0.0.0")] 34
33[assembly: AssemblyFileVersion("1.0.0.0")] 35[assembly : AssemblyVersion("1.0.0.0")]
36[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
index b18bda2..cb6734f 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
@@ -26,10 +26,6 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Grid.ScriptServer 29namespace OpenSim.Grid.ScriptServer
34{ 30{
35 public abstract class RegionBase 31 public abstract class RegionBase
@@ -73,42 +69,176 @@ namespace OpenSim.Grid.ScriptServer
73 public event DefaultDelegate onobject_rez; 69 public event DefaultDelegate onobject_rez;
74 public event DefaultDelegate onremote_data; 70 public event DefaultDelegate onremote_data;
75 public event DefaultDelegate onhttp_response; 71 public event DefaultDelegate onhttp_response;
76 72
77 73
78 public void ScriptRez() { onScriptRez(); } 74 public void ScriptRez()
79 public void state_entry() { onstate_entry(); } 75 {
80 public void state_exit() { onstate_exit(); } 76 onScriptRez();
81 public void touch_start() { ontouch_start(); } 77 }
82 public void touch() { ontouch(); } 78
83 public void touch_end() { ontouch_end(); } 79 public void state_entry()
84 public void collision_start() { oncollision_start(); } 80 {
85 public void collision() { oncollision(); } 81 onstate_entry();
86 public void collision_end() { oncollision_end(); } 82 }
87 public void land_collision_start() { onland_collision_start(); } 83
88 public void land_collision() { onland_collision(); } 84 public void state_exit()
89 public void land_collision_end() { onland_collision_end(); } 85 {
90 public void timer() { ontimer(); } 86 onstate_exit();
91 public void listen() { onlisten(); } 87 }
92 public void on_rez() { onon_rez(); } 88
93 public void sensor() { onsensor(); } 89 public void touch_start()
94 public void no_sensor() { onno_sensor(); } 90 {
95 public void control() { oncontrol(); } 91 ontouch_start();
96 public void money() { onmoney(); } 92 }
97 public void email() { onemail(); } 93
98 public void at_target() { onat_target(); } 94 public void touch()
99 public void not_at_target() { onnot_at_target(); } 95 {
100 public void at_rot_target() { onat_rot_target(); } 96 ontouch();
101 public void not_at_rot_target() { onnot_at_rot_target(); } 97 }
102 public void run_time_permissions() { onrun_time_permissions(); } 98
103 public void changed() { onchanged(); } 99 public void touch_end()
104 public void attach() { onattach(); } 100 {
105 public void dataserver() { ondataserver(); } 101 ontouch_end();
106 public void link_message() { onlink_message(); } 102 }
107 public void moving_start() { onmoving_start(); } 103
108 public void moving_end() { onmoving_end(); } 104 public void collision_start()
109 public void object_rez() { onobject_rez(); } 105 {
110 public void remote_data() { onremote_data(); } 106 oncollision_start();
111 public void http_response() { onhttp_response(); } 107 }
112 108
109 public void collision()
110 {
111 oncollision();
112 }
113
114 public void collision_end()
115 {
116 oncollision_end();
117 }
118
119 public void land_collision_start()
120 {
121 onland_collision_start();
122 }
123
124 public void land_collision()
125 {
126 onland_collision();
127 }
128
129 public void land_collision_end()
130 {
131 onland_collision_end();
132 }
133
134 public void timer()
135 {
136 ontimer();
137 }
138
139 public void listen()
140 {
141 onlisten();
142 }
143
144 public void on_rez()
145 {
146 onon_rez();
147 }
148
149 public void sensor()
150 {
151 onsensor();
152 }
153
154 public void no_sensor()
155 {
156 onno_sensor();
157 }
158
159 public void control()
160 {
161 oncontrol();
162 }
163
164 public void money()
165 {
166 onmoney();
167 }
168
169 public void email()
170 {
171 onemail();
172 }
173
174 public void at_target()
175 {
176 onat_target();
177 }
178
179 public void not_at_target()
180 {
181 onnot_at_target();
182 }
183
184 public void at_rot_target()
185 {
186 onat_rot_target();
187 }
188
189 public void not_at_rot_target()
190 {
191 onnot_at_rot_target();
192 }
193
194 public void run_time_permissions()
195 {
196 onrun_time_permissions();
197 }
198
199 public void changed()
200 {
201 onchanged();
202 }
203
204 public void attach()
205 {
206 onattach();
207 }
208
209 public void dataserver()
210 {
211 ondataserver();
212 }
213
214 public void link_message()
215 {
216 onlink_message();
217 }
218
219 public void moving_start()
220 {
221 onmoving_start();
222 }
223
224 public void moving_end()
225 {
226 onmoving_end();
227 }
228
229 public void object_rez()
230 {
231 onobject_rez();
232 }
233
234 public void remote_data()
235 {
236 onremote_data();
237 }
238
239 public void http_response()
240 {
241 onhttp_response();
242 }
113 } 243 }
114} 244} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
index fa13807..819a037 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
@@ -26,19 +26,17 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
33 30
34namespace OpenSim.Grid.ScriptServer 31namespace OpenSim.Grid.ScriptServer
35{ 32{
36 // Maintains connection and communication to a region 33 // Maintains connection and communication to a region
37 public class RegionConnectionManager: RegionBase 34 public class RegionConnectionManager : RegionBase
38 { 35 {
39 private LogBase m_log; 36 private LogBase m_log;
40 private ScriptServerMain m_ScriptServerMain; 37 private ScriptServerMain m_ScriptServerMain;
41 private object m_Connection; 38 private object m_Connection;
39
42 public RegionConnectionManager(ScriptServerMain scm, LogBase logger, object Connection) 40 public RegionConnectionManager(ScriptServerMain scm, LogBase logger, object Connection)
43 { 41 {
44 m_ScriptServerMain = scm; 42 m_ScriptServerMain = scm;
@@ -56,8 +54,6 @@ namespace OpenSim.Grid.ScriptServer
56 54
57 // EVENT? DELIVER EVENT DIRECTLY TO SCRIPTENGINE 55 // EVENT? DELIVER EVENT DIRECTLY TO SCRIPTENGINE
58 touch_start(); 56 touch_start();
59
60 } 57 }
61
62 } 58 }
63} 59} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
index ac56fbe..45bf88d 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
@@ -25,9 +25,7 @@
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 System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Text;
31using System.Threading; 29using System.Threading;
32using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
33 31
@@ -42,11 +40,13 @@ namespace OpenSim.Grid.ScriptServer
42 40
43 private LogBase m_log; 41 private LogBase m_log;
44 private ScriptServerMain m_ScriptServerMain; 42 private ScriptServerMain m_ScriptServerMain;
43
45 public RegionCommManager(ScriptServerMain scm, LogBase logger) 44 public RegionCommManager(ScriptServerMain scm, LogBase logger)
46 { 45 {
47 m_ScriptServerMain = scm; 46 m_ScriptServerMain = scm;
48 m_log = logger; 47 m_log = logger;
49 } 48 }
49
50 ~RegionCommManager() 50 ~RegionCommManager()
51 { 51 {
52 Stop(); 52 Stop();
@@ -64,6 +64,7 @@ namespace OpenSim.Grid.ScriptServer
64 listenThread.IsBackground = true; 64 listenThread.IsBackground = true;
65 listenThread.Start(); 65 listenThread.Start();
66 } 66 }
67
67 /// <summary> 68 /// <summary>
68 /// Stops listening for region requests 69 /// Stops listening for region requests
69 /// </summary> 70 /// </summary>
@@ -78,7 +79,9 @@ namespace OpenSim.Grid.ScriptServer
78 listenThread.Abort(); 79 listenThread.Abort();
79 listenThread.Join(1000); // Wait 1 second for thread to shut down 80 listenThread.Join(1000); // Wait 1 second for thread to shut down
80 } 81 }
81 catch { } 82 catch
83 {
84 }
82 listenThread = null; 85 listenThread = null;
83 } 86 }
84 } 87 }
@@ -97,6 +100,5 @@ namespace OpenSim.Grid.ScriptServer
97 // TODO: FAKING A CONNECTION 100 // TODO: FAKING A CONNECTION
98 Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null)); 101 Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null));
99 } 102 }
100
101 } 103 }
102} 104} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
index a259b1b..3dbd42d 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
@@ -121,5 +121,4 @@ namespace OpenSim.Grid.ScriptServer
121 return ret; 121 return ret;
122 } 122 }
123 } 123 }
124} 124} \ No newline at end of file
125
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
index 4ec2b35..7b49127 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
@@ -26,9 +26,7 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic; 29using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
33 31
34namespace OpenSim.Grid.ScriptServer 32namespace OpenSim.Grid.ScriptServer
@@ -46,10 +44,11 @@ namespace OpenSim.Grid.ScriptServer
46 m_ScriptServerMain = scm; 44 m_ScriptServerMain = scm;
47 m_log = logger; 45 m_log = logger;
48 ScriptEngineLoader = new ScriptEngineLoader(m_log); 46 ScriptEngineLoader = new ScriptEngineLoader(m_log);
49 47
50 // Temp - we should not load during initialize... Loading should be done later. 48 // Temp - we should not load during initialize... Loading should be done later.
51 LoadEngine("DotNetScriptEngine"); 49 LoadEngine("DotNetScriptEngine");
52 } 50 }
51
53 ~ScriptEngineManager() 52 ~ScriptEngineManager()
54 { 53 {
55 } 54 }
@@ -63,7 +62,5 @@ namespace OpenSim.Grid.ScriptServer
63 scriptEngines.Add(sei); 62 scriptEngines.Add(sei);
64 } 63 }
65 } 64 }
66
67
68 } 65 }
69} 66} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 82035ac..1749376 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
@@ -26,20 +26,17 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using System.IO; 29using System.IO;
33using OpenSim.Framework.Console;
34using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Framework.Console;
35 32
36namespace OpenSim.Grid.ScriptServer 33namespace OpenSim.Grid.ScriptServer
37{ 34{
38 public class ScriptServerMain : conscmd_callback 35 public class ScriptServerMain : conscmd_callback
39 { 36 {
40 private readonly string m_logFilename = ("region-console.log"); 37 private readonly string m_logFilename = ("region-console.log");
41 internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region 38 internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region
42 internal ScriptEngineManager ScriptEngines; // Loads scriptengines 39 internal ScriptEngineManager ScriptEngines; // Loads scriptengines
43 private LogBase m_log; 40 private LogBase m_log;
44 41
45 public ScriptServerMain() 42 public ScriptServerMain()
@@ -48,7 +45,6 @@ namespace OpenSim.Grid.ScriptServer
48 45
49 RegionScriptDaemon = new RegionCommManager(this, m_log); 46 RegionScriptDaemon = new RegionCommManager(this, m_log);
50 ScriptEngines = new ScriptEngineManager(this, m_log); 47 ScriptEngines = new ScriptEngineManager(this, m_log);
51
52 } 48 }
53 49
54 ~ScriptServerMain() 50 ~ScriptServerMain()
@@ -68,9 +64,9 @@ namespace OpenSim.Grid.ScriptServer
68 public void RunCmd(string command, string[] cmdparams) 64 public void RunCmd(string command, string[] cmdparams)
69 { 65 {
70 } 66 }
67
71 public void Show(string ShowWhat) 68 public void Show(string ShowWhat)
72 { 69 {
73 } 70 }
74
75 } 71 }
76} 72} \ No newline at end of file