diff options
author | Tedd Hansen | 2008-09-12 18:46:52 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-09-12 18:46:52 +0000 |
commit | 85a0e03984478b58d3568c075fbf3cc1b6e2c6e3 (patch) | |
tree | 299fccb86e9472d03eb1aa0e333c03cf50b290e8 /OpenSim/Grid/ScriptServer | |
parent | use new style asserts. They are much easier to read. (diff) | |
download | opensim-SC-85a0e03984478b58d3568c075fbf3cc1b6e2c6e3.zip opensim-SC-85a0e03984478b58d3568c075fbf3cc1b6e2c6e3.tar.gz opensim-SC-85a0e03984478b58d3568c075fbf3cc1b6e2c6e3.tar.bz2 opensim-SC-85a0e03984478b58d3568c075fbf3cc1b6e2c6e3.tar.xz |
Note to self: VisualSVN not fully compatible with OpenSim prebuild :)
Diffstat (limited to 'OpenSim/Grid/ScriptServer')
-rw-r--r-- | OpenSim/Grid/ScriptServer/Application.cs | 58 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/FakeScene.cs | 52 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs | 63 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/RemotingObject.cs | 42 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/RemotingServer.cs | 50 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs | 243 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | 41 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs | 102 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs | 117 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs | 61 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 103 |
11 files changed, 0 insertions, 932 deletions
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs deleted file mode 100644 index ef93f65..0000000 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ /dev/null | |||
@@ -1,58 +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 | |||
28 | using System; | ||
29 | using log4net.Config; | ||
30 | |||
31 | namespace OpenSim.Grid.ScriptServer | ||
32 | { | ||
33 | internal class OpenScript_Main | ||
34 | { | ||
35 | public static ScriptServerMain SE; | ||
36 | |||
37 | private static void Main(string[] args) | ||
38 | { | ||
39 | XmlConfigurator.Configure(); | ||
40 | |||
41 | AppDomain.CurrentDomain.UnhandledException += | ||
42 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | ||
43 | |||
44 | // Application is starting | ||
45 | SE = new ScriptServerMain(); | ||
46 | } | ||
47 | |||
48 | private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | ||
49 | { | ||
50 | Console.WriteLine(String.Empty); | ||
51 | Console.WriteLine("APPLICATION EXCEPTION DETECTED"); | ||
52 | Console.WriteLine(String.Empty); | ||
53 | Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); | ||
54 | //Console.WriteLine("Exception:"); | ||
55 | //Console.WriteLine(e.ExceptionObject.ToString()); | ||
56 | } | ||
57 | } | ||
58 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/FakeScene.cs b/OpenSim/Grid/ScriptServer/FakeScene.cs deleted file mode 100644 index ef88a9d..0000000 --- a/OpenSim/Grid/ScriptServer/FakeScene.cs +++ /dev/null | |||
@@ -1,52 +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 | |||
28 | using OpenSim.Framework; | ||
29 | using OpenSim.Framework.Communications; | ||
30 | using OpenSim.Framework.Communications.Cache; | ||
31 | using OpenSim.Framework.Servers; | ||
32 | using OpenSim.Region.Environment; | ||
33 | using OpenSim.Region.Environment.Scenes; | ||
34 | using Nini.Config; | ||
35 | |||
36 | namespace OpenSim.Grid.ScriptServer | ||
37 | { | ||
38 | public class FakeScene: Scene | ||
39 | { | ||
40 | public FakeScene(RegionInfo regInfo, AgentCircuitManager authen, | ||
41 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | ||
42 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, | ||
43 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool sendTasksToChild, IConfigSource config) | ||
44 | : base( | ||
45 | regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, | ||
46 | moduleLoader, dumpAssetsToFile, physicalPrim, sendTasksToChild, config, "") | ||
47 | { | ||
48 | } | ||
49 | |||
50 | // What does a scene have to do? :P | ||
51 | } | ||
52 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs deleted file mode 100644 index 0ec6d6c..0000000 --- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,63 +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 | |||
28 | using System.Reflection; | ||
29 | using System.Runtime.InteropServices; | ||
30 | |||
31 | // General information about an assembly is controlled through the following | ||
32 | // set of attributes. Change these attribute values to modify the information | ||
33 | // associated with an assembly. | ||
34 | |||
35 | [assembly : AssemblyTitle("OpenSim.Grid.ScriptServer")] | ||
36 | [assembly : AssemblyDescription("")] | ||
37 | [assembly : AssemblyConfiguration("")] | ||
38 | [assembly : AssemblyCompany("")] | ||
39 | [assembly : AssemblyProduct("OpenSim.Grid.ScriptServer")] | ||
40 | [assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2008")] | ||
41 | [assembly : AssemblyTrademark("")] | ||
42 | [assembly : AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | |||
48 | [assembly : ComVisible(false)] | ||
49 | |||
50 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
51 | |||
52 | [assembly : Guid("b6861b87-5203-4040-b756-fd4774932f82")] | ||
53 | |||
54 | // Version information for an assembly consists of the following four values: | ||
55 | // | ||
56 | // Major Version | ||
57 | // Minor Version | ||
58 | // Build Number | ||
59 | // Revision | ||
60 | // | ||
61 | |||
62 | [assembly : AssemblyVersion("1.0.0.0")] | ||
63 | [assembly : AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs deleted file mode 100644 index 9d3065b..0000000 --- a/OpenSim/Grid/ScriptServer/RemotingObject.cs +++ /dev/null | |||
@@ -1,42 +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 | |||
28 | using System; | ||
29 | using OpenSim.Region.ScriptEngine.Common; | ||
30 | |||
31 | namespace OpenSim.Grid.ScriptServer | ||
32 | { | ||
33 | public class RemotingObject : MarshalByRefObject, ScriptServerInterfaces.ServerRemotingObject | ||
34 | { | ||
35 | // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance. | ||
36 | |||
37 | ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events() | ||
38 | { | ||
39 | return ScriptServerMain.Engine.EventManager(); | ||
40 | } | ||
41 | } | ||
42 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/RemotingServer.cs b/OpenSim/Grid/ScriptServer/RemotingServer.cs deleted file mode 100644 index 7d0e334..0000000 --- a/OpenSim/Grid/ScriptServer/RemotingServer.cs +++ /dev/null | |||
@@ -1,50 +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 | |||
28 | using System.Runtime.Remoting; | ||
29 | using System.Runtime.Remoting.Channels; | ||
30 | using System.Runtime.Remoting.Channels.Tcp; | ||
31 | |||
32 | namespace OpenSim.Grid.ScriptServer | ||
33 | { | ||
34 | class RemotingServer | ||
35 | { | ||
36 | TcpChannel channel; | ||
37 | public RemotingServer(int port, string instanceName) | ||
38 | { | ||
39 | // Create an instance of a channel | ||
40 | channel = new TcpChannel(port); | ||
41 | ChannelServices.RegisterChannel(channel, true); | ||
42 | |||
43 | // Register as an available service with the name HelloWorld | ||
44 | RemotingConfiguration.RegisterWellKnownServiceType( | ||
45 | typeof(RemotingObject), | ||
46 | instanceName, | ||
47 | WellKnownObjectMode.Singleton); | ||
48 | } | ||
49 | } | ||
50 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs deleted file mode 100644 index a02429c..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs +++ /dev/null | |||
@@ -1,243 +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 | |||
28 | namespace OpenSim.Grid.ScriptServer.ScriptServer.Region | ||
29 | { | ||
30 | public abstract class RegionBase | ||
31 | { | ||
32 | // These are events that the region needs to have | ||
33 | |||
34 | // TEMP: Using System.Delegate -- needs replacing with a real delegate | ||
35 | public delegate void DefaultDelegate(); | ||
36 | |||
37 | public event DefaultDelegate onScriptRez; | ||
38 | public event DefaultDelegate onstate_entry; | ||
39 | public event DefaultDelegate onstate_exit; | ||
40 | public event DefaultDelegate ontouch_start; | ||
41 | public event DefaultDelegate ontouch; | ||
42 | public event DefaultDelegate ontouch_end; | ||
43 | public event DefaultDelegate oncollision_start; | ||
44 | public event DefaultDelegate oncollision; | ||
45 | public event DefaultDelegate oncollision_end; | ||
46 | public event DefaultDelegate onland_collision_start; | ||
47 | public event DefaultDelegate onland_collision; | ||
48 | public event DefaultDelegate onland_collision_end; | ||
49 | public event DefaultDelegate ontimer; | ||
50 | public event DefaultDelegate onlisten; | ||
51 | public event DefaultDelegate onon_rez; | ||
52 | public event DefaultDelegate onsensor; | ||
53 | public event DefaultDelegate onno_sensor; | ||
54 | public event DefaultDelegate oncontrol; | ||
55 | public event DefaultDelegate onmoney; | ||
56 | public event DefaultDelegate onemail; | ||
57 | public event DefaultDelegate onat_target; | ||
58 | public event DefaultDelegate onnot_at_target; | ||
59 | public event DefaultDelegate onat_rot_target; | ||
60 | public event DefaultDelegate onnot_at_rot_target; | ||
61 | public event DefaultDelegate onrun_time_permissions; | ||
62 | public event DefaultDelegate onchanged; | ||
63 | public event DefaultDelegate onattach; | ||
64 | public event DefaultDelegate ondataserver; | ||
65 | public event DefaultDelegate onlink_message; | ||
66 | public event DefaultDelegate onmoving_start; | ||
67 | public event DefaultDelegate onmoving_end; | ||
68 | public event DefaultDelegate onobject_rez; | ||
69 | public event DefaultDelegate onremote_data; | ||
70 | public event DefaultDelegate onhttp_response; | ||
71 | |||
72 | |||
73 | public void ScriptRez() | ||
74 | { | ||
75 | onScriptRez(); | ||
76 | } | ||
77 | |||
78 | public void state_entry() | ||
79 | { | ||
80 | onstate_entry(); | ||
81 | } | ||
82 | |||
83 | public void state_exit() | ||
84 | { | ||
85 | onstate_exit(); | ||
86 | } | ||
87 | |||
88 | public void touch_start() | ||
89 | { | ||
90 | ontouch_start(); | ||
91 | } | ||
92 | |||
93 | public void touch() | ||
94 | { | ||
95 | ontouch(); | ||
96 | } | ||
97 | |||
98 | public void touch_end() | ||
99 | { | ||
100 | ontouch_end(); | ||
101 | } | ||
102 | |||
103 | public void collision_start() | ||
104 | { | ||
105 | oncollision_start(); | ||
106 | } | ||
107 | |||
108 | public void collision() | ||
109 | { | ||
110 | oncollision(); | ||
111 | } | ||
112 | |||
113 | public void collision_end() | ||
114 | { | ||
115 | oncollision_end(); | ||
116 | } | ||
117 | |||
118 | public void land_collision_start() | ||
119 | { | ||
120 | onland_collision_start(); | ||
121 | } | ||
122 | |||
123 | public void land_collision() | ||
124 | { | ||
125 | onland_collision(); | ||
126 | } | ||
127 | |||
128 | public void land_collision_end() | ||
129 | { | ||
130 | onland_collision_end(); | ||
131 | } | ||
132 | |||
133 | public void timer() | ||
134 | { | ||
135 | ontimer(); | ||
136 | } | ||
137 | |||
138 | public void listen() | ||
139 | { | ||
140 | onlisten(); | ||
141 | } | ||
142 | |||
143 | public void on_rez() | ||
144 | { | ||
145 | onon_rez(); | ||
146 | } | ||
147 | |||
148 | public void sensor() | ||
149 | { | ||
150 | onsensor(); | ||
151 | } | ||
152 | |||
153 | public void no_sensor() | ||
154 | { | ||
155 | onno_sensor(); | ||
156 | } | ||
157 | |||
158 | public void control() | ||
159 | { | ||
160 | oncontrol(); | ||
161 | } | ||
162 | |||
163 | public void money() | ||
164 | { | ||
165 | onmoney(); | ||
166 | } | ||
167 | |||
168 | public void email() | ||
169 | { | ||
170 | onemail(); | ||
171 | } | ||
172 | |||
173 | public void at_target() | ||
174 | { | ||
175 | onat_target(); | ||
176 | } | ||
177 | |||
178 | public void not_at_target() | ||
179 | { | ||
180 | onnot_at_target(); | ||
181 | } | ||
182 | |||
183 | public void at_rot_target() | ||
184 | { | ||
185 | onat_rot_target(); | ||
186 | } | ||
187 | |||
188 | public void not_at_rot_target() | ||
189 | { | ||
190 | onnot_at_rot_target(); | ||
191 | } | ||
192 | |||
193 | public void run_time_permissions() | ||
194 | { | ||
195 | onrun_time_permissions(); | ||
196 | } | ||
197 | |||
198 | public void changed() | ||
199 | { | ||
200 | onchanged(); | ||
201 | } | ||
202 | |||
203 | public void attach() | ||
204 | { | ||
205 | onattach(); | ||
206 | } | ||
207 | |||
208 | public void dataserver() | ||
209 | { | ||
210 | ondataserver(); | ||
211 | } | ||
212 | |||
213 | public void link_message() | ||
214 | { | ||
215 | onlink_message(); | ||
216 | } | ||
217 | |||
218 | public void moving_start() | ||
219 | { | ||
220 | onmoving_start(); | ||
221 | } | ||
222 | |||
223 | public void moving_end() | ||
224 | { | ||
225 | onmoving_end(); | ||
226 | } | ||
227 | |||
228 | public void object_rez() | ||
229 | { | ||
230 | onobject_rez(); | ||
231 | } | ||
232 | |||
233 | public void remote_data() | ||
234 | { | ||
235 | onremote_data(); | ||
236 | } | ||
237 | |||
238 | public void http_response() | ||
239 | { | ||
240 | onhttp_response(); | ||
241 | } | ||
242 | } | ||
243 | } \ No newline at end of file | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs deleted file mode 100644 index 97be5c3..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ /dev/null | |||
@@ -1,41 +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 | |||
28 | namespace OpenSim.Grid.ScriptServer.ScriptServer.Region | ||
29 | { | ||
30 | public class RegionConnectionManager : RegionBase | ||
31 | { | ||
32 | // private ScriptServerMain m_ScriptServerMain; | ||
33 | // private object m_Connection; | ||
34 | |||
35 | public RegionConnectionManager(ScriptServerMain scm, object Connection) | ||
36 | { | ||
37 | // m_ScriptServerMain = scm; | ||
38 | // m_Connection = Connection; | ||
39 | } | ||
40 | } | ||
41 | } \ No newline at end of file | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs deleted file mode 100644 index 8422bea..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ /dev/null | |||
@@ -1,102 +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 | |||
28 | using System.Collections.Generic; | ||
29 | using System.Threading; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Grid.ScriptServer.ScriptServer.Region; | ||
32 | |||
33 | namespace OpenSim.Grid.ScriptServer.ScriptServer | ||
34 | { | ||
35 | internal class RegionCommManager | ||
36 | { | ||
37 | private Thread listenThread; | ||
38 | |||
39 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | ||
40 | |||
41 | private ScriptServerMain m_ScriptServerMain; | ||
42 | |||
43 | public RegionCommManager(ScriptServerMain scm) | ||
44 | { | ||
45 | m_ScriptServerMain = scm; | ||
46 | } | ||
47 | |||
48 | ~RegionCommManager() | ||
49 | { | ||
50 | Stop(); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Starts listening for region requests | ||
55 | /// </summary> | ||
56 | public void Start() | ||
57 | { | ||
58 | // Start listener | ||
59 | Stop(); | ||
60 | listenThread = new Thread(ListenThreadLoop); | ||
61 | listenThread.Name = "ListenThread"; | ||
62 | listenThread.IsBackground = true; | ||
63 | listenThread.Start(); | ||
64 | ThreadTracker.Add(listenThread); | ||
65 | } | ||
66 | |||
67 | /// <summary> | ||
68 | /// Stops listening for region requests | ||
69 | /// </summary> | ||
70 | public void Stop() | ||
71 | { | ||
72 | // Stop listener, clean up | ||
73 | if (listenThread != null) | ||
74 | { | ||
75 | try | ||
76 | { | ||
77 | if (listenThread.IsAlive) | ||
78 | listenThread.Abort(); | ||
79 | listenThread.Join(1000); // Wait 1 second for thread to shut down | ||
80 | } | ||
81 | catch | ||
82 | { | ||
83 | } | ||
84 | listenThread = null; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | private void ListenThreadLoop() | ||
89 | { | ||
90 | // * Listen for requests from regions | ||
91 | // * When a request is received: | ||
92 | // - Authenticate region | ||
93 | // - Authenticate user | ||
94 | // - Have correct scriptengine load script | ||
95 | // ~ ask scriptengines if they will accept script? | ||
96 | // - Add script to shared communication channel towards that region | ||
97 | |||
98 | // TODO: FAKING A CONNECTION | ||
99 | Regions.Add(new RegionConnectionManager(m_ScriptServerMain, null)); | ||
100 | } | ||
101 | } | ||
102 | } \ No newline at end of file | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs deleted file mode 100644 index 4d8c559..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs +++ /dev/null | |||
@@ -1,117 +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 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using OpenSim.Region.ScriptEngine.Common; | ||
33 | |||
34 | namespace OpenSim.Grid.ScriptServer.ScriptServer | ||
35 | { | ||
36 | internal class ScriptEngineLoader | ||
37 | { | ||
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
40 | public ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName) | ||
41 | { | ||
42 | ScriptServerInterfaces.ScriptEngine ret = null; | ||
43 | try | ||
44 | { | ||
45 | ret = | ||
46 | LoadAndInitAssembly( | ||
47 | Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine." + EngineName + ".dll"), | ||
48 | "OpenSim.Region.ScriptEngine." + EngineName + ".ScriptEngine"); | ||
49 | } | ||
50 | catch (Exception e) | ||
51 | { | ||
52 | m_log.Error("[ScriptEngine]: " + | ||
53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | ||
54 | e.StackTrace.ToString()); | ||
55 | } | ||
56 | return ret; | ||
57 | } | ||
58 | |||
59 | /// <summary> | ||
60 | /// Does actual loading and initialization of script Assembly | ||
61 | /// </summary> | ||
62 | /// <returns></returns> | ||
63 | private ScriptServerInterfaces.ScriptEngine LoadAndInitAssembly(string FileName, string NameSpace) | ||
64 | { | ||
65 | //Common.SendToDebug("Loading ScriptEngine Assembly " + FileName); | ||
66 | // Load .Net Assembly (.dll) | ||
67 | // Initialize and return it | ||
68 | |||
69 | // TODO: Add error handling | ||
70 | |||
71 | Assembly a; | ||
72 | //try | ||
73 | //{ | ||
74 | |||
75 | |||
76 | // Load to default appdomain (temporary) | ||
77 | a = Assembly.LoadFrom(FileName); | ||
78 | // Load to specified appdomain | ||
79 | // TODO: Insert security | ||
80 | //a = FreeAppDomain.Load(FileName); | ||
81 | //} | ||
82 | //catch (Exception e) | ||
83 | //{ | ||
84 | // m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); | ||
85 | //} | ||
86 | |||
87 | |||
88 | //Console.WriteLine("Loading: " + FileName); | ||
89 | //foreach (Type _t in a.GetTypes()) | ||
90 | //{ | ||
91 | // Console.WriteLine("Type: " + _t.ToString()); | ||
92 | //} | ||
93 | |||
94 | Type t; | ||
95 | //try | ||
96 | //{ | ||
97 | t = a.GetType(NameSpace, true); | ||
98 | //} | ||
99 | //catch (Exception e) | ||
100 | //{ | ||
101 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | ||
102 | //} | ||
103 | |||
104 | ScriptServerInterfaces.ScriptEngine ret; | ||
105 | //try | ||
106 | //{ | ||
107 | ret = (ScriptServerInterfaces.ScriptEngine)Activator.CreateInstance(t); | ||
108 | //} | ||
109 | //catch (Exception e) | ||
110 | //{ | ||
111 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | ||
112 | //} | ||
113 | |||
114 | return ret; | ||
115 | } | ||
116 | } | ||
117 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs deleted file mode 100644 index 37fbcfb..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ /dev/null | |||
@@ -1,61 +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 | |||
28 | using System.Collections.Generic; | ||
29 | using OpenSim.Region.ScriptEngine.Common; | ||
30 | |||
31 | namespace OpenSim.Grid.ScriptServer.ScriptServer | ||
32 | { | ||
33 | internal class ScriptEngineManager | ||
34 | { | ||
35 | private ScriptEngineLoader ScriptEngineLoader; | ||
36 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); | ||
37 | // private ScriptServerMain m_ScriptServerMain; | ||
38 | |||
39 | // Initialize | ||
40 | public ScriptEngineManager(ScriptServerMain scm) | ||
41 | { | ||
42 | // m_ScriptServerMain = scm; | ||
43 | ScriptEngineLoader = new ScriptEngineLoader(); | ||
44 | } | ||
45 | |||
46 | ~ScriptEngineManager() | ||
47 | { | ||
48 | } | ||
49 | |||
50 | public ScriptServerInterfaces.ScriptEngine LoadEngine(string engineName) | ||
51 | { | ||
52 | // Load and add to list of ScriptEngines | ||
53 | ScriptServerInterfaces.ScriptEngine sei = ScriptEngineLoader.LoadScriptEngine(engineName); | ||
54 | if (sei != null) | ||
55 | { | ||
56 | scriptEngines.Add(sei); | ||
57 | } | ||
58 | return sei; | ||
59 | } | ||
60 | } | ||
61 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs deleted file mode 100644 index 30448b5..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ /dev/null | |||
@@ -1,103 +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 | |||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using OpenMetaverse; | ||
31 | using log4net; | ||
32 | using OpenSim.Framework.Console; | ||
33 | using OpenSim.Framework.Servers; | ||
34 | using OpenSim.Grid.ScriptServer.ScriptServer; | ||
35 | using OpenSim.Region.ScriptEngine.Common; | ||
36 | |||
37 | namespace OpenSim.Grid.ScriptServer | ||
38 | { | ||
39 | public class ScriptServerMain : BaseOpenSimServer, conscmd_callback | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
43 | // | ||
44 | // Root object. Creates objects used. | ||
45 | // | ||
46 | private int listenPort = 8010; | ||
47 | |||
48 | // TEMP | ||
49 | public static ScriptServerInterfaces.ScriptEngine Engine; | ||
50 | //public static FakeScene m_Scene = new FakeScene(null,null,null,null,null,null,null,null,null,false, false, false); | ||
51 | |||
52 | // Objects we use | ||
53 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region | ||
54 | internal ScriptEngineManager ScriptEngines; // Loads scriptengines | ||
55 | //internal RemotingServer m_RemotingServer; | ||
56 | internal TCPServer m_TCPServer; | ||
57 | internal TRPC_Remote RPC; | ||
58 | |||
59 | public ScriptServerMain() | ||
60 | { | ||
61 | m_console = CreateConsole(); | ||
62 | |||
63 | // Set up script engine mananger | ||
64 | ScriptEngines = new ScriptEngineManager(this); | ||
65 | |||
66 | // Load DotNetEngine | ||
67 | Engine = ScriptEngines.LoadEngine("DotNetEngine"); | ||
68 | |||
69 | Engine.InitializeEngine(null, null, false, Engine.GetScriptManager()); | ||
70 | |||
71 | // Set up server | ||
72 | //m_RemotingServer = new RemotingServer(listenPort, "DotNetEngine"); | ||
73 | m_TCPServer = new TCPServer(listenPort); | ||
74 | RPC = new TRPC_Remote(m_TCPServer); | ||
75 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); | ||
76 | m_TCPServer.StartListen(); | ||
77 | |||
78 | Console.ReadLine(); | ||
79 | } | ||
80 | |||
81 | private static void RPC_ReceiveCommand(int ID, string Command, object[] p) | ||
82 | { | ||
83 | m_log.Info("[SERVER]: Received command: '" + Command + "'"); | ||
84 | if (p != null) | ||
85 | { | ||
86 | for (int i = 0; i < p.Length; i++) | ||
87 | { | ||
88 | m_log.Info("[SERVER]: Param " + i + ": " + p[i]); | ||
89 | } | ||
90 | } | ||
91 | |||
92 | if (Command == "OnRezScript") | ||
93 | { | ||
94 | Engine.EventManager().OnRezScript((uint)p[0], new UUID((string)p[1]), (string)p[2], 0, false); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | protected ConsoleBase CreateConsole() | ||
99 | { | ||
100 | return new ConsoleBase("Script", this); | ||
101 | } | ||
102 | } | ||
103 | } | ||