diff options
author | lbsa71 | 2008-07-08 11:25:18 +0000 |
---|---|---|
committer | lbsa71 | 2008-07-08 11:25:18 +0000 |
commit | d9b802bb26ee659a68270ac05ea0406389afc883 (patch) | |
tree | 54a53c343d14e15a6236a0c36daa228f07ae57b6 /OpenSim/Framework/IClientAPI.cs | |
parent | RegionInfo.configMember can be null for dynamically created regions (diff) | |
download | opensim-SC-d9b802bb26ee659a68270ac05ea0406389afc883.zip opensim-SC-d9b802bb26ee659a68270ac05ea0406389afc883.tar.gz opensim-SC-d9b802bb26ee659a68270ac05ea0406389afc883.tar.bz2 opensim-SC-d9b802bb26ee659a68270ac05ea0406389afc883.tar.xz |
* Split out various classes from IClientAPI into their own files, in accordance with code standards
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 368 |
1 files changed, 3 insertions, 365 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9307aef..f2eb6a0 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -33,360 +33,12 @@ using libsecondlife.Packets; | |||
33 | 33 | ||
34 | namespace OpenSim.Framework | 34 | namespace OpenSim.Framework |
35 | { | 35 | { |
36 | // Base Args Interface | 36 | #region Client API Delegate definitions |
37 | public interface IEventArgs | ||
38 | { | ||
39 | IScene Scene { get; set; } | ||
40 | IClientAPI Sender { get; set; } | ||
41 | } | ||
42 | 37 | ||
43 | public delegate void ViewerEffectEventHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args); | 38 | public delegate void ViewerEffectEventHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args); |
44 | 39 | ||
45 | public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); | 40 | public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); |
46 | 41 | ||
47 | public enum ChatTypeEnum | ||
48 | { | ||
49 | Whisper = 0, | ||
50 | Say = 1, | ||
51 | Shout = 2, | ||
52 | // 3 is an obsolete version of Say | ||
53 | StartTyping = 4, | ||
54 | StopTyping = 5, | ||
55 | DebugChannel = 6, | ||
56 | Region = 7, | ||
57 | Owner = 8, | ||
58 | Broadcast = 0xFF | ||
59 | } | ||
60 | |||
61 | public enum ThrottleOutPacketType : int | ||
62 | { | ||
63 | Resend = 0, | ||
64 | Land = 1, | ||
65 | Wind = 2, | ||
66 | Cloud = 3, | ||
67 | Task = 4, | ||
68 | Texture = 5, | ||
69 | Asset = 6, | ||
70 | Unknown = 7, // Also doubles as 'do not throttle' | ||
71 | Back = 8 | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// ChatFromViewer Arguments | ||
76 | /// </summary> | ||
77 | public class ChatFromViewerArgs : EventArgs, IEventArgs | ||
78 | { | ||
79 | protected int m_channel; | ||
80 | protected string m_from; | ||
81 | protected string m_message; | ||
82 | protected LLVector3 m_position; | ||
83 | |||
84 | protected IScene m_scene; | ||
85 | protected IClientAPI m_sender; | ||
86 | protected object m_senderObject; | ||
87 | protected ChatTypeEnum m_type; | ||
88 | protected LLUUID m_fromID; | ||
89 | |||
90 | public ChatFromViewerArgs() | ||
91 | { | ||
92 | m_position = new LLVector3(); | ||
93 | } | ||
94 | |||
95 | /// <summary> | ||
96 | /// The message sent by the user | ||
97 | /// </summary> | ||
98 | public string Message | ||
99 | { | ||
100 | get { return m_message; } | ||
101 | set { m_message = value; } | ||
102 | } | ||
103 | |||
104 | /// <summary> | ||
105 | /// The type of message, eg say, shout, broadcast. | ||
106 | /// </summary> | ||
107 | public ChatTypeEnum Type | ||
108 | { | ||
109 | get { return m_type; } | ||
110 | set { m_type = value; } | ||
111 | } | ||
112 | |||
113 | /// <summary> | ||
114 | /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. | ||
115 | /// </summary> | ||
116 | public int Channel | ||
117 | { | ||
118 | get { return m_channel; } | ||
119 | set { m_channel = value; } | ||
120 | } | ||
121 | |||
122 | /// <summary> | ||
123 | /// The position of the sender at the time of the message broadcast. | ||
124 | /// </summary> | ||
125 | public LLVector3 Position | ||
126 | { | ||
127 | get { return m_position; } | ||
128 | set { m_position = value; } | ||
129 | } | ||
130 | |||
131 | /// <summary> | ||
132 | /// The name of the sender (needed for scripts) | ||
133 | /// </summary> | ||
134 | public string From | ||
135 | { | ||
136 | get { return m_from; } | ||
137 | set { m_from = value; } | ||
138 | } | ||
139 | |||
140 | #region IEventArgs Members | ||
141 | |||
142 | /// TODO: Sender and SenderObject should just be Sender and of | ||
143 | /// type IChatSender | ||
144 | |||
145 | /// <summary> | ||
146 | /// The client responsible for sending the message, or null. | ||
147 | /// </summary> | ||
148 | public IClientAPI Sender | ||
149 | { | ||
150 | get { return m_sender; } | ||
151 | set { m_sender = value; } | ||
152 | } | ||
153 | |||
154 | /// <summary> | ||
155 | /// The object responsible for sending the message, or null. | ||
156 | /// </summary> | ||
157 | public object SenderObject | ||
158 | { | ||
159 | get { return m_senderObject; } | ||
160 | set { m_senderObject = value; } | ||
161 | } | ||
162 | |||
163 | public LLUUID SenderUUID | ||
164 | { | ||
165 | get { return m_fromID; } | ||
166 | set { m_fromID = value; } | ||
167 | } | ||
168 | |||
169 | /// <summary> | ||
170 | /// | ||
171 | /// </summary> | ||
172 | public IScene Scene | ||
173 | { | ||
174 | get { return m_scene; } | ||
175 | set { m_scene = value; } | ||
176 | } | ||
177 | |||
178 | #endregion | ||
179 | } | ||
180 | |||
181 | public class TextureRequestArgs : EventArgs | ||
182 | { | ||
183 | private sbyte m_discardLevel; | ||
184 | private uint m_packetNumber; | ||
185 | private float m_priority; | ||
186 | protected LLUUID m_requestedAssetID; | ||
187 | |||
188 | public float Priority | ||
189 | { | ||
190 | get { return m_priority; } | ||
191 | set { m_priority = value; } | ||
192 | } | ||
193 | |||
194 | /// <summary> | ||
195 | /// | ||
196 | /// </summary> | ||
197 | public uint PacketNumber | ||
198 | { | ||
199 | get { return m_packetNumber; } | ||
200 | set { m_packetNumber = value; } | ||
201 | } | ||
202 | |||
203 | /// <summary> | ||
204 | /// | ||
205 | /// </summary> | ||
206 | public sbyte DiscardLevel | ||
207 | { | ||
208 | get { return m_discardLevel; } | ||
209 | set { m_discardLevel = value; } | ||
210 | } | ||
211 | |||
212 | /// <summary> | ||
213 | /// | ||
214 | /// </summary> | ||
215 | public LLUUID RequestedAssetID | ||
216 | { | ||
217 | get { return m_requestedAssetID; } | ||
218 | set { m_requestedAssetID = value; } | ||
219 | } | ||
220 | } | ||
221 | |||
222 | public class AvatarWearingArgs : EventArgs | ||
223 | { | ||
224 | private List<Wearable> m_nowWearing = new List<Wearable>(); | ||
225 | |||
226 | /// <summary> | ||
227 | /// | ||
228 | /// </summary> | ||
229 | public List<Wearable> NowWearing | ||
230 | { | ||
231 | get { return m_nowWearing; } | ||
232 | set { m_nowWearing = value; } | ||
233 | } | ||
234 | |||
235 | #region Nested type: Wearable | ||
236 | |||
237 | public class Wearable | ||
238 | { | ||
239 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); | ||
240 | public byte Type = 0; | ||
241 | |||
242 | public Wearable(LLUUID itemId, byte type) | ||
243 | { | ||
244 | ItemID = itemId; | ||
245 | Type = type; | ||
246 | } | ||
247 | } | ||
248 | |||
249 | #endregion | ||
250 | } | ||
251 | |||
252 | public class ViewerEffectEventHandlerArg : EventArgs | ||
253 | { | ||
254 | public LLUUID AgentID; | ||
255 | public byte[] Color; | ||
256 | public float Duration; | ||
257 | public LLUUID ID; | ||
258 | public byte Type; | ||
259 | public byte[] TypeData; | ||
260 | } | ||
261 | |||
262 | public class LandUpdateArgs : EventArgs | ||
263 | { | ||
264 | public LLUUID AuthBuyerID; | ||
265 | public Parcel.ParcelCategory Category; | ||
266 | public string Desc; | ||
267 | public LLUUID GroupID; | ||
268 | public byte LandingType; | ||
269 | public byte MediaAutoScale; | ||
270 | public LLUUID MediaID; | ||
271 | public string MediaURL; | ||
272 | public string MusicURL; | ||
273 | public string Name; | ||
274 | public uint ParcelFlags; | ||
275 | public float PassHours; | ||
276 | public int PassPrice; | ||
277 | public int SalePrice; | ||
278 | public LLUUID SnapshotID; | ||
279 | public LLVector3 UserLocation; | ||
280 | public LLVector3 UserLookAt; | ||
281 | } | ||
282 | |||
283 | public class RegionHandshakeArgs : EventArgs | ||
284 | { | ||
285 | public bool isEstateManager; | ||
286 | public float billableFactor; | ||
287 | public float terrainHeightRange0; | ||
288 | public float terrainHeightRange1; | ||
289 | public float terrainHeightRange2; | ||
290 | public float terrainHeightRange3; | ||
291 | public float terrainStartHeight0; | ||
292 | public float terrainStartHeight1; | ||
293 | public float terrainStartHeight2; | ||
294 | public float terrainStartHeight3; | ||
295 | public byte simAccess; | ||
296 | public float waterHeight; | ||
297 | public uint regionFlags; | ||
298 | public string regionName; | ||
299 | public LLUUID SimOwner; | ||
300 | public LLUUID terrainBase0; | ||
301 | public LLUUID terrainBase1; | ||
302 | public LLUUID terrainBase2; | ||
303 | public LLUUID terrainBase3; | ||
304 | public LLUUID terrainDetail0; | ||
305 | public LLUUID terrainDetail1; | ||
306 | public LLUUID terrainDetail2; | ||
307 | public LLUUID terrainDetail3; | ||
308 | } | ||
309 | |||
310 | public class RegionInfoForEstateMenuArgs : EventArgs | ||
311 | { | ||
312 | public float billableFactor; | ||
313 | public uint estateID; | ||
314 | public byte maxAgents; | ||
315 | public float objectBonusFactor; | ||
316 | public uint parentEstateID; | ||
317 | public int pricePerMeter; | ||
318 | public int redirectGridX; | ||
319 | public int redirectGridY; | ||
320 | public uint regionFlags; | ||
321 | public byte simAccess; | ||
322 | public float sunHour; | ||
323 | public float terrainLowerLimit; | ||
324 | public float terrainRaiseLimit; | ||
325 | public bool useEstateSun; | ||
326 | public float waterHeight; | ||
327 | public string simName; | ||
328 | } | ||
329 | |||
330 | public class UpdateShapeArgs : EventArgs | ||
331 | { | ||
332 | public uint ObjectLocalID; | ||
333 | public ushort PathBegin; | ||
334 | public byte PathCurve; | ||
335 | public ushort PathEnd; | ||
336 | public sbyte PathRadiusOffset; | ||
337 | public byte PathRevolutions; | ||
338 | public byte PathScaleX; | ||
339 | public byte PathScaleY; | ||
340 | public byte PathShearX; | ||
341 | public byte PathShearY; | ||
342 | public sbyte PathSkew; | ||
343 | public sbyte PathTaperX; | ||
344 | public sbyte PathTaperY; | ||
345 | public sbyte PathTwist; | ||
346 | public sbyte PathTwistBegin; | ||
347 | public ushort ProfileBegin; | ||
348 | public byte ProfileCurve; | ||
349 | public ushort ProfileEnd; | ||
350 | public ushort ProfileHollow; | ||
351 | } | ||
352 | |||
353 | public class RequestAssetArgs : EventArgs | ||
354 | { | ||
355 | public int ChannelType; | ||
356 | public float Priority; | ||
357 | public int SourceType; | ||
358 | public LLUUID TransferID; | ||
359 | } | ||
360 | |||
361 | public class AgentUpdateArgs : EventArgs | ||
362 | { | ||
363 | public LLUUID AgentID; | ||
364 | public LLQuaternion BodyRotation; | ||
365 | public LLVector3 CameraAtAxis; | ||
366 | public LLVector3 CameraCenter; | ||
367 | public LLVector3 CameraLeftAxis; | ||
368 | public LLVector3 CameraUpAxis; | ||
369 | public uint ControlFlags; | ||
370 | public float Far; | ||
371 | public byte Flags; | ||
372 | public LLQuaternion HeadRotation; | ||
373 | public LLUUID SessionID; | ||
374 | public byte State; | ||
375 | } | ||
376 | |||
377 | public class AvatarPickerReplyAgentDataArgs : EventArgs | ||
378 | { | ||
379 | public LLUUID AgentID; | ||
380 | public LLUUID QueryID; | ||
381 | } | ||
382 | |||
383 | public class AvatarPickerReplyDataArgs : EventArgs | ||
384 | { | ||
385 | public LLUUID AvatarID; | ||
386 | public byte[] FirstName; | ||
387 | public byte[] LastName; | ||
388 | } | ||
389 | |||
390 | public delegate void TextureRequest(Object sender, TextureRequestArgs e); | 42 | public delegate void TextureRequest(Object sender, TextureRequestArgs e); |
391 | 43 | ||
392 | public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); | 44 | public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); |
@@ -646,6 +298,8 @@ namespace OpenSim.Framework | |||
646 | public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); | 298 | public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); |
647 | public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); | 299 | public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); |
648 | 300 | ||
301 | #endregion | ||
302 | |||
649 | public interface IClientAPI | 303 | public interface IClientAPI |
650 | { | 304 | { |
651 | LLVector3 StartPos { get; set; } | 305 | LLVector3 StartPos { get; set; } |
@@ -1044,20 +698,4 @@ namespace OpenSim.Framework | |||
1044 | void SetClientInfo(ClientInfo info); | 698 | void SetClientInfo(ClientInfo info); |
1045 | void Terminate(); | 699 | void Terminate(); |
1046 | } | 700 | } |
1047 | |||
1048 | [Serializable] | ||
1049 | public class ClientInfo | ||
1050 | { | ||
1051 | public sAgentCircuitData agentcircuit; | ||
1052 | |||
1053 | public Dictionary<uint, byte[]> needAck; | ||
1054 | |||
1055 | public List<byte[]> out_packets; | ||
1056 | public Dictionary<uint, uint> pendingAcks; | ||
1057 | public EndPoint proxyEP; | ||
1058 | |||
1059 | public uint sequence; | ||
1060 | public byte[] usecircuit; | ||
1061 | public EndPoint userEP; | ||
1062 | } | ||
1063 | } | 701 | } |