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 | |
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 '')
16 files changed, 0 insertions, 1501 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 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs deleted file mode 100644 index 0a6a98d..0000000 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Common.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 | /* Original code: Tedd Hansen */ | ||
29 | |||
30 | namespace OpenSim.Region.ScriptEngine.RemoteServer | ||
31 | { | ||
32 | public static class Common | ||
33 | { | ||
34 | public static bool debug = true; | ||
35 | public static ScriptEngine mySE; | ||
36 | |||
37 | // This class just contains some static log stuff used for debugging. | ||
38 | |||
39 | //public delegate void SendToDebugEventDelegate(string Message); | ||
40 | //public delegate void SendToLogEventDelegate(string Message); | ||
41 | //static public event SendToDebugEventDelegate SendToDebugEvent; | ||
42 | //static public event SendToLogEventDelegate SendToLogEvent; | ||
43 | |||
44 | public static void SendToDebug(string Message) | ||
45 | { | ||
46 | //if (Debug == true) | ||
47 | mySE.Log.Info("[ScriptEngine]: Debug: " + Message); | ||
48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | ||
49 | } | ||
50 | |||
51 | public static void SendToLog(string Message) | ||
52 | { | ||
53 | //if (Debug == true) | ||
54 | mySE.Log.Info("[ScriptEngine]: LOG: " + Message); | ||
55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | ||
56 | } | ||
57 | } | ||
58 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs deleted file mode 100644 index afb7311..0000000 --- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs +++ /dev/null | |||
@@ -1,263 +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 | /* Original code: Tedd Hansen */ | ||
29 | |||
30 | using System; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Region.ScriptEngine.Common; | ||
34 | using OpenSim.Region.ScriptEngine.Common.TRPC; | ||
35 | |||
36 | namespace OpenSim.Region.ScriptEngine.RemoteServer | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// Handles events from OpenSim. Uses RemoteServer to send commands. | ||
40 | /// </summary> | ||
41 | [Serializable] | ||
42 | internal class EventManager | ||
43 | { | ||
44 | // TODO: unused: System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>(); | ||
45 | TCPClient m_TCPClient; | ||
46 | TRPC_Remote RPC; | ||
47 | int myScriptServerID; | ||
48 | |||
49 | string remoteHost = "127.0.0.1"; | ||
50 | int remotePort = 8010; | ||
51 | |||
52 | private ScriptEngine myScriptEngine; | ||
53 | public EventManager(ScriptEngine _ScriptEngine) | ||
54 | { | ||
55 | myScriptEngine = _ScriptEngine; | ||
56 | |||
57 | m_TCPClient = new TCPClient(); | ||
58 | RPC = new TRPC_Remote(m_TCPClient); | ||
59 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); | ||
60 | myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); | ||
61 | |||
62 | myScriptEngine.Log.Info("[RemoteEngine]: Hooking up to server events"); | ||
63 | //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | ||
64 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | ||
65 | //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | ||
66 | } | ||
67 | |||
68 | void RPC_ReceiveCommand(int ID, string Command, params object[] p) | ||
69 | { | ||
70 | myScriptEngine.Log.Info("[REMOTESERVER]: Received command: '" + Command + "'"); | ||
71 | if (p != null) | ||
72 | { | ||
73 | for (int i = 0; i < p.Length; i++) | ||
74 | { | ||
75 | myScriptEngine.Log.Info("[REMOTESERVER]: Param " + i + ": " + p[i].ToString()); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | |||
80 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez) | ||
81 | { | ||
82 | // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID | ||
83 | myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); | ||
84 | |||
85 | // Temp for now: We have one connection only - this is hardcoded in myScriptServerID | ||
86 | RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); | ||
87 | |||
88 | //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); | ||
89 | //remoteScript.Add(localID, obj); | ||
90 | //remoteScript[localID].Events().OnRezScript(localID, itemID, script); | ||
91 | } | ||
92 | |||
93 | public void touch_start(uint localID, Vector3 offsetPos, IClientAPI remoteClient) | ||
94 | { | ||
95 | //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); | ||
96 | RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); | ||
97 | } | ||
98 | |||
99 | |||
100 | // PLACEHOLDERS -- CODE WILL CHANGE! | ||
101 | |||
102 | |||
103 | //public void OnRemoveScript(uint localID, UUID itemID) | ||
104 | //{ | ||
105 | // remoteScript[localID].Events.OnRemoveScript(localID, itemID); | ||
106 | //} | ||
107 | |||
108 | //public void state_exit(uint localID, UUID itemID) | ||
109 | //{ | ||
110 | // remoteScript[localID].Events.state_exit(localID, itemID); | ||
111 | //} | ||
112 | |||
113 | //public void touch(uint localID, UUID itemID) | ||
114 | //{ | ||
115 | // remoteScript[localID].Events.touch(localID, itemID); | ||
116 | //} | ||
117 | |||
118 | //public void touch_end(uint localID, UUID itemID) | ||
119 | //{ | ||
120 | // remoteScript[localID].Events.touch_end(localID, itemID); | ||
121 | //} | ||
122 | |||
123 | //public void collision_start(uint localID, UUID itemID) | ||
124 | //{ | ||
125 | // remoteScript[localID].Events.collision_start(localID, itemID); | ||
126 | //} | ||
127 | |||
128 | //public void collision(uint localID, UUID itemID) | ||
129 | //{ | ||
130 | // remoteScript[localID].Events.collision(localID, itemID); | ||
131 | //} | ||
132 | |||
133 | //public void collision_end(uint localID, UUID itemID) | ||
134 | //{ | ||
135 | // remoteScript[localID].Events.collision_end(localID, itemID); | ||
136 | //} | ||
137 | |||
138 | //public void land_collision_start(uint localID, UUID itemID) | ||
139 | //{ | ||
140 | // remoteScript[localID].Events.land_collision_start(localID, itemID); | ||
141 | //} | ||
142 | |||
143 | //public void land_collision(uint localID, UUID itemID) | ||
144 | //{ | ||
145 | // remoteScript[localID].Events.land_collision(localID, itemID); | ||
146 | //} | ||
147 | |||
148 | //public void land_collision_end(uint localID, UUID itemID) | ||
149 | //{ | ||
150 | // remoteScript[localID].Events.land_collision_end(localID, itemID); | ||
151 | //} | ||
152 | |||
153 | //public void timer(uint localID, UUID itemID) | ||
154 | //{ | ||
155 | // remoteScript[localID].Events.timer(localID, itemID); | ||
156 | //} | ||
157 | |||
158 | //public void listen(uint localID, UUID itemID) | ||
159 | //{ | ||
160 | // remoteScript[localID].Events.listen(localID, itemID); | ||
161 | //} | ||
162 | |||
163 | //public void on_rez(uint localID, UUID itemID) | ||
164 | //{ | ||
165 | // remoteScript[localID].Events.on_rez(localID, itemID); | ||
166 | //} | ||
167 | |||
168 | //public void sensor(uint localID, UUID itemID) | ||
169 | //{ | ||
170 | // remoteScript[localID].Events.sensor(localID, itemID); | ||
171 | //} | ||
172 | |||
173 | //public void no_sensor(uint localID, UUID itemID) | ||
174 | //{ | ||
175 | // remoteScript[localID].Events.no_sensor(localID, itemID); | ||
176 | //} | ||
177 | |||
178 | //public void control(uint localID, UUID itemID) | ||
179 | //{ | ||
180 | // remoteScript[localID].Events.control(localID, itemID); | ||
181 | //} | ||
182 | |||
183 | //public void money(uint localID, UUID itemID) | ||
184 | //{ | ||
185 | // remoteScript[localID].Events.money(localID, itemID); | ||
186 | //} | ||
187 | |||
188 | //public void email(uint localID, UUID itemID) | ||
189 | //{ | ||
190 | // remoteScript[localID].Events.email(localID, itemID); | ||
191 | //} | ||
192 | |||
193 | //public void at_target(uint localID, UUID itemID) | ||
194 | //{ | ||
195 | // remoteScript[localID].Events.at_target(localID, itemID); | ||
196 | //} | ||
197 | |||
198 | //public void not_at_target(uint localID, UUID itemID) | ||
199 | //{ | ||
200 | // remoteScript[localID].Events.not_at_target(localID, itemID); | ||
201 | //} | ||
202 | |||
203 | //public void at_rot_target(uint localID, UUID itemID) | ||
204 | //{ | ||
205 | // remoteScript[localID].Events.at_rot_target(localID, itemID); | ||
206 | //} | ||
207 | |||
208 | //public void not_at_rot_target(uint localID, UUID itemID) | ||
209 | //{ | ||
210 | // remoteScript[localID].Events.not_at_rot_target(localID, itemID); | ||
211 | //} | ||
212 | |||
213 | //public void run_time_permissions(uint localID, UUID itemID) | ||
214 | //{ | ||
215 | // remoteScript[localID].Events.run_time_permissions(localID, itemID); | ||
216 | //} | ||
217 | |||
218 | //public void changed(uint localID, UUID itemID) | ||
219 | //{ | ||
220 | // remoteScript[localID].Events.changed(localID, itemID); | ||
221 | //} | ||
222 | |||
223 | //public void attach(uint localID, UUID itemID) | ||
224 | //{ | ||
225 | // remoteScript[localID].Events.attach(localID, itemID); | ||
226 | //} | ||
227 | |||
228 | //public void dataserver(uint localID, UUID itemID) | ||
229 | //{ | ||
230 | // remoteScript[localID].Events.dataserver(localID, itemID); | ||
231 | //} | ||
232 | |||
233 | //public void link_message(uint localID, UUID itemID) | ||
234 | //{ | ||
235 | // remoteScript[localID].Events.link_message(localID, itemID); | ||
236 | //} | ||
237 | |||
238 | //public void moving_start(uint localID, UUID itemID) | ||
239 | //{ | ||
240 | // remoteScript[localID].Events.moving_start(localID, itemID); | ||
241 | //} | ||
242 | |||
243 | //public void moving_end(uint localID, UUID itemID) | ||
244 | //{ | ||
245 | // remoteScript[localID].Events.moving_end(localID, itemID); | ||
246 | //} | ||
247 | |||
248 | //public void object_rez(uint localID, UUID itemID) | ||
249 | //{ | ||
250 | // remoteScript[localID].Events.object_rez(localID, itemID); | ||
251 | //} | ||
252 | |||
253 | //public void remote_data(uint localID, UUID itemID) | ||
254 | //{ | ||
255 | // remoteScript[localID].Events.remote_data(localID, itemID); | ||
256 | //} | ||
257 | |||
258 | //public void http_response(uint localID, UUID itemID) | ||
259 | //{ | ||
260 | // remoteScript[localID].Events.http_response(localID, itemID); | ||
261 | //} | ||
262 | } | ||
263 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs deleted file mode 100644 index 77d9b10..0000000 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,65 +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.Region.ScriptEngine.RemoteServer")] | ||
36 | [assembly : AssemblyDescription("")] | ||
37 | [assembly : AssemblyConfiguration("")] | ||
38 | [assembly : AssemblyCompany("")] | ||
39 | [assembly : AssemblyProduct("OpenSim.Region.ScriptEngine.RemoteServer")] | ||
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("2842257e-6fde-4460-9368-4cde57fa9cc4")] | ||
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 | // You can specify all the values or you can default the Revision and Build Numbers | ||
62 | // by using the '*' as shown below: | ||
63 | |||
64 | [assembly : AssemblyVersion("1.0.0.0")] | ||
65 | [assembly : AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs deleted file mode 100644 index 2a51b91..0000000 --- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs +++ /dev/null | |||
@@ -1,80 +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.Net.Sockets; | ||
30 | using System.Runtime.Remoting; | ||
31 | using System.Runtime.Remoting.Channels; | ||
32 | using System.Runtime.Remoting.Channels.Tcp; | ||
33 | using OpenSim.Region.ScriptEngine.Common; | ||
34 | |||
35 | namespace OpenSim.Region.ScriptEngine.RemoteServer | ||
36 | { | ||
37 | class RemoteServer | ||
38 | { | ||
39 | // Handles connections to servers | ||
40 | // Create and returns server object | ||
41 | |||
42 | public RemoteServer() | ||
43 | { | ||
44 | TcpChannel chan = new TcpChannel(); | ||
45 | ChannelServices.RegisterChannel(chan, true); | ||
46 | } | ||
47 | |||
48 | /// <summary> | ||
49 | /// Create a channel for communicating w/ the remote object | ||
50 | /// Notice no port is specified on the client | ||
51 | /// </summary> | ||
52 | public ScriptServerInterfaces.ServerRemotingObject Connect(string hostname, int port) | ||
53 | { | ||
54 | ScriptServerInterfaces.ServerRemotingObject obj = null; | ||
55 | |||
56 | try | ||
57 | { | ||
58 | // Create an instance of the remote object | ||
59 | obj = (ScriptServerInterfaces.ServerRemotingObject)Activator.GetObject( | ||
60 | typeof(ScriptServerInterfaces.ServerRemotingObject), | ||
61 | "tcp://" + hostname + ":" + port + "/DotNetEngine"); | ||
62 | |||
63 | if (obj == null) | ||
64 | { | ||
65 | Console.WriteLine("Error: unable to locate server"); | ||
66 | } | ||
67 | } | ||
68 | catch (SocketException) | ||
69 | { | ||
70 | Console.WriteLine("Error: unable to connect to server"); | ||
71 | } | ||
72 | catch (RemotingException) | ||
73 | { | ||
74 | Console.WriteLine("Error: unable to connect to server"); | ||
75 | } | ||
76 | |||
77 | return obj; | ||
78 | } | ||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs deleted file mode 100644 index ac6ed82..0000000 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.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 log4net; | ||
31 | using Nini.Config; | ||
32 | using OpenSim.Region.Environment.Interfaces; | ||
33 | using OpenSim.Region.Environment.Scenes; | ||
34 | |||
35 | namespace OpenSim.Region.ScriptEngine.RemoteServer | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// This is the root object for RemoteServer. Objects access each other trough this class. | ||
39 | /// </summary> | ||
40 | /// | ||
41 | [Serializable] | ||
42 | public class ScriptEngine : IRegionModule | ||
43 | { | ||
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
46 | internal Scene World; | ||
47 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim | ||
48 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers | ||
49 | |||
50 | public ScriptEngine() | ||
51 | { | ||
52 | Common.mySE = this; | ||
53 | } | ||
54 | |||
55 | public ILog Log | ||
56 | { | ||
57 | get { return m_log; } | ||
58 | } | ||
59 | |||
60 | public void InitializeEngine(Scene Sceneworld) | ||
61 | { | ||
62 | World = Sceneworld; | ||
63 | |||
64 | m_log.Info("[ScriptEngine]: RemoteEngine (Remote Script Server) initializing"); | ||
65 | // Create all objects we'll be using | ||
66 | m_EventManager = new EventManager(this); | ||
67 | m_RemoteServer = new RemoteServer(); | ||
68 | m_RemoteServer.Connect("localhost", 1234); | ||
69 | } | ||
70 | |||
71 | public void Shutdown() | ||
72 | { | ||
73 | // We are shutting down | ||
74 | } | ||
75 | |||
76 | #region IRegionModule | ||
77 | |||
78 | public void Initialise(Scene scene, IConfigSource config) | ||
79 | { | ||
80 | InitializeEngine(scene); | ||
81 | } | ||
82 | |||
83 | public void PostInitialise() | ||
84 | { | ||
85 | } | ||
86 | |||
87 | public void Close() | ||
88 | { | ||
89 | } | ||
90 | |||
91 | public string Name | ||
92 | { | ||
93 | get { return "RemoteServerScriptingModule"; } | ||
94 | } | ||
95 | |||
96 | public bool IsSharedModule | ||
97 | { | ||
98 | get { return false; } | ||
99 | } | ||
100 | |||
101 | #endregion | ||
102 | } | ||
103 | } | ||