aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs226
1 files changed, 226 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
new file mode 100644
index 0000000..b4ac615
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
@@ -0,0 +1,226 @@
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 */
29using System;
30using libsecondlife;
31using OpenSim.Framework;
32
33namespace OpenSim.Region.ScriptEngine.RemoteServer
34{
35 /// <summary>
36 /// </summary>
37 [Serializable]
38 internal class EventManager
39 {
40
41 System.Collections.Generic.Dictionary<uint, EventManager> remoteScript = new System.Collections.Generic.Dictionary<uint, EventManager>();
42
43
44 private ScriptEngine myScriptEngine;
45 public EventManager(ScriptEngine _ScriptEngine)
46 {
47 myScriptEngine = _ScriptEngine;
48
49 myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events");
50 myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
51 myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
52 myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
53 }
54
55 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
56 {
57 remoteScript[localID].touch_start(localID, offsetPos, remoteClient);
58 }
59
60 public void OnRezScript(uint localID, LLUUID itemID, string script)
61 {
62 remoteScript[localID].OnRezScript(localID, itemID, script);
63 }
64
65 public void OnRemoveScript(uint localID, LLUUID itemID)
66 {
67 remoteScript[localID].OnRemoveScript(localID, itemID);
68 }
69
70 public void state_exit(uint localID, LLUUID itemID)
71 {
72 remoteScript[localID].state_exit(localID, itemID);
73 }
74
75 public void touch(uint localID, LLUUID itemID)
76 {
77 remoteScript[localID].touch(localID, itemID);
78 }
79
80 public void touch_end(uint localID, LLUUID itemID)
81 {
82 remoteScript[localID].touch_end(localID, itemID);
83 }
84
85 public void collision_start(uint localID, LLUUID itemID)
86 {
87 remoteScript[localID].collision_start(localID, itemID);
88 }
89
90 public void collision(uint localID, LLUUID itemID)
91 {
92 remoteScript[localID].collision(localID, itemID);
93 }
94
95 public void collision_end(uint localID, LLUUID itemID)
96 {
97 remoteScript[localID].collision_end(localID, itemID);
98 }
99
100 public void land_collision_start(uint localID, LLUUID itemID)
101 {
102 remoteScript[localID].land_collision_start(localID, itemID);
103 }
104
105 public void land_collision(uint localID, LLUUID itemID)
106 {
107 remoteScript[localID].land_collision(localID, itemID);
108 }
109
110 public void land_collision_end(uint localID, LLUUID itemID)
111 {
112 remoteScript[localID].land_collision_end(localID, itemID);
113 }
114
115 public void timer(uint localID, LLUUID itemID)
116 {
117 remoteScript[localID].timer(localID, itemID);
118 }
119
120 public void listen(uint localID, LLUUID itemID)
121 {
122 remoteScript[localID].listen(localID, itemID);
123 }
124
125 public void on_rez(uint localID, LLUUID itemID)
126 {
127 remoteScript[localID].on_rez(localID, itemID);
128 }
129
130 public void sensor(uint localID, LLUUID itemID)
131 {
132 remoteScript[localID].sensor(localID, itemID);
133 }
134
135 public void no_sensor(uint localID, LLUUID itemID)
136 {
137 remoteScript[localID].no_sensor(localID, itemID);
138 }
139
140 public void control(uint localID, LLUUID itemID)
141 {
142 remoteScript[localID].control(localID, itemID);
143 }
144
145 public void money(uint localID, LLUUID itemID)
146 {
147 remoteScript[localID].money(localID, itemID);
148 }
149
150 public void email(uint localID, LLUUID itemID)
151 {
152 remoteScript[localID].email(localID, itemID);
153 }
154
155 public void at_target(uint localID, LLUUID itemID)
156 {
157 remoteScript[localID].at_target(localID, itemID);
158 }
159
160 public void not_at_target(uint localID, LLUUID itemID)
161 {
162 remoteScript[localID].not_at_target(localID, itemID);
163 }
164
165 public void at_rot_target(uint localID, LLUUID itemID)
166 {
167 remoteScript[localID].at_rot_target(localID, itemID);
168 }
169
170 public void not_at_rot_target(uint localID, LLUUID itemID)
171 {
172 remoteScript[localID].not_at_rot_target(localID, itemID);
173 }
174
175 public void run_time_permissions(uint localID, LLUUID itemID)
176 {
177 remoteScript[localID].run_time_permissions(localID, itemID);
178 }
179
180 public void changed(uint localID, LLUUID itemID)
181 {
182 remoteScript[localID].changed(localID, itemID);
183 }
184
185 public void attach(uint localID, LLUUID itemID)
186 {
187 remoteScript[localID].attach(localID, itemID);
188 }
189
190 public void dataserver(uint localID, LLUUID itemID)
191 {
192 remoteScript[localID].dataserver(localID, itemID);
193 }
194
195 public void link_message(uint localID, LLUUID itemID)
196 {
197 remoteScript[localID].link_message(localID, itemID);
198 }
199
200 public void moving_start(uint localID, LLUUID itemID)
201 {
202 remoteScript[localID].moving_start(localID, itemID);
203 }
204
205 public void moving_end(uint localID, LLUUID itemID)
206 {
207 remoteScript[localID].moving_end(localID, itemID);
208 }
209
210 public void object_rez(uint localID, LLUUID itemID)
211 {
212 remoteScript[localID].object_rez(localID, itemID);
213 }
214
215 public void remote_data(uint localID, LLUUID itemID)
216 {
217 remoteScript[localID].remote_data(localID, itemID);
218 }
219
220 public void http_response(uint localID, LLUUID itemID)
221 {
222 remoteScript[localID].http_response(localID, itemID);
223 }
224
225 }
226} \ No newline at end of file