aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/IClientAPI.cs
diff options
context:
space:
mode:
authorMW2007-10-29 21:46:25 +0000
committerMW2007-10-29 21:46:25 +0000
commit3d8219f6c7faa256d6a13ab7925f75d83af95b78 (patch)
treeea507efa88aa7e526575469a6ce913fdc0c0358e /OpenSim/Framework/General/IClientAPI.cs
parentFixed a bug in SQLAssetServer that only seemed to be a problem when running u... (diff)
downloadopensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.zip
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.gz
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.bz2
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.xz
as per the "Filesystem cleanup for OpenSim repository" mailing list thread. Have flattened the OpenSim.Framework project/namespace. The problem is that the namespace is still wrong as its "OpenSim.Framework" while the directory is "OpenSim\Framework\General" , so we need to decide if we change the directory or correct the namespace.
Note this has lead to a big flat project, but I think a lot of the files we most likely don't even use any longer. And others belong in other projects/namespaces anyway.
Diffstat (limited to 'OpenSim/Framework/General/IClientAPI.cs')
-rw-r--r--OpenSim/Framework/General/IClientAPI.cs390
1 files changed, 390 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/IClientAPI.cs b/OpenSim/Framework/General/IClientAPI.cs
new file mode 100644
index 0000000..8c81eae
--- /dev/null
+++ b/OpenSim/Framework/General/IClientAPI.cs
@@ -0,0 +1,390 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Net;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Framework;
34
35namespace OpenSim.Framework
36{
37 // Base Args Interface
38 public interface IEventArgs
39 {
40 IScene Scene
41 {
42 get;
43 set;
44 }
45
46 IClientAPI Sender
47 {
48 get;
49 set;
50 }
51 }
52
53 public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock);
54
55 public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
56
57 public enum ChatTypeEnum { Whisper = 0, Say = 1, Shout = 2, Broadcast = 0xFF };
58
59 /// <summary>
60 /// ChatFromViewer Arguments
61 /// </summary>
62 public class ChatFromViewerArgs : EventArgs, IEventArgs
63 {
64 protected string m_message;
65 protected ChatTypeEnum m_type;
66 protected int m_channel;
67 protected LLVector3 m_position;
68 protected string m_from;
69
70 protected IClientAPI m_sender;
71 protected IScene m_scene;
72
73 /// <summary>
74 /// The message sent by the user
75 /// </summary>
76 public string Message
77 {
78 get { return m_message; }
79 set { m_message = value; }
80 }
81
82 /// <summary>
83 /// The type of message, eg say, shout, broadcast.
84 /// </summary>
85 public ChatTypeEnum Type
86 {
87 get { return m_type; }
88 set { m_type = value; }
89 }
90
91 /// <summary>
92 /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero.
93 /// </summary>
94 public int Channel
95 {
96 get { return m_channel; }
97 set { m_channel = value; }
98 }
99
100 /// <summary>
101 /// The position of the sender at the time of the message broadcast.
102 /// </summary>
103 public LLVector3 Position
104 {
105 get { return m_position; }
106 set { m_position = value; }
107 }
108
109 /// <summary>
110 /// The name of the sender (needed for scripts)
111 /// </summary>
112 public string From
113 {
114 get { return m_from; }
115 set { m_from = value; }
116 }
117
118 /// <summary>
119 /// The client responsible for sending the message, or null.
120 /// </summary>
121 public IClientAPI Sender
122 {
123 get { return m_sender; }
124 set { m_sender = value; }
125 }
126
127 public IScene Scene
128 {
129 get { return m_scene; }
130 set { m_scene = value; }
131 }
132
133 public ChatFromViewerArgs()
134 {
135 m_position = new LLVector3();
136 }
137 }
138
139 public class TextureRequestArgs : EventArgs
140 {
141 protected LLUUID m_requestedAssetID;
142 private sbyte m_discardLevel;
143 private uint m_packetNumber;
144
145 public uint PacketNumber
146 {
147 get { return m_packetNumber; }
148 set { m_packetNumber = value; }
149 }
150
151 public sbyte DiscardLevel
152 {
153 get { return m_discardLevel; }
154 set { m_discardLevel = value; }
155 }
156
157 public LLUUID RequestedAssetID
158 {
159 get { return m_requestedAssetID; }
160 set { m_requestedAssetID = value; }
161 }
162 }
163
164 public delegate void TextureRequest(Object sender, TextureRequestArgs e);
165
166 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list
167 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
168 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
169 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
170 public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq);
171 public delegate void LinkObjects(uint parent, List<uint> children);
172 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
173 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
174 public delegate void DisconnectUser();
175 public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
176
177 public delegate void GenericCall(IClientAPI remoteClient);
178 public delegate void GenericCall2();
179 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
180 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
181 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
182 public delegate void GenericCall6(LLUUID uid);
183 public delegate void GenericCall7(uint localID, string message);
184
185 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
186 public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data);
187 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
188 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
189 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
190 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
191 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
192 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
193 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
194 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
195 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags);
196 public delegate void StatusChange(bool status);
197 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
198 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
199 public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID);
200 public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
201 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
202
203 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
204 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
205 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
206 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
207 public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client);
208 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
209 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
210
211 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
212
213 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
214
215 public delegate void CreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
216 public delegate void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
217 public delegate void FetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
218 public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
219 public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
220 public delegate void UpdateInventoryItemTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID);
221 public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
222 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
223 public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
224
225 public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal);
226 public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
227 public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
228 public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
229
230 public interface IClientAPI
231 {
232 event ImprovedInstantMessage OnInstantMessage;
233 event ChatFromViewer OnChatFromViewer;
234 event TextureRequest OnRequestTexture;
235 event RezObject OnRezObject;
236 event ModifyTerrain OnModifyTerrain;
237 event SetAppearance OnSetAppearance;
238 event StartAnim OnStartAnim;
239 event LinkObjects OnLinkObjects;
240 event RequestMapBlocks OnRequestMapBlocks;
241 event TeleportLocationRequest OnTeleportLocationRequest;
242 event DisconnectUser OnDisconnectUser;
243 event RequestAvatarProperties OnRequestAvatarProperties;
244
245 event GenericCall4 OnDeRezObject;
246 event GenericCall OnRegionHandShakeReply;
247 event GenericCall OnRequestWearables;
248 event GenericCall2 OnCompleteMovementToRegion;
249 event UpdateAgent OnAgentUpdate;
250 event AgentRequestSit OnAgentRequestSit;
251 event AgentSit OnAgentSit;
252 event GenericCall OnRequestAvatarsData;
253 event AddNewPrim OnAddPrim;
254 event ObjectDuplicate OnObjectDuplicate;
255 event UpdateVector OnGrabObject;
256 event ObjectSelect OnDeGrabObject;
257 event MoveObject OnGrabUpdate;
258
259 event UpdateShape OnUpdatePrimShape;
260 event ObjectExtraParams OnUpdateExtraParams;
261 event ObjectSelect OnObjectSelect;
262 event ObjectDeselect OnObjectDeselect;
263 event GenericCall7 OnObjectDescription;
264 event GenericCall7 OnObjectName;
265 event UpdatePrimFlags OnUpdatePrimFlags;
266 event UpdatePrimTexture OnUpdatePrimTexture;
267 event UpdateVector OnUpdatePrimGroupPosition;
268 event UpdateVector OnUpdatePrimSinglePosition;
269 event UpdatePrimRotation OnUpdatePrimGroupRotation;
270 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
271 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
272 event UpdateVector OnUpdatePrimScale;
273 event StatusChange OnChildAgentStatus;
274 event GenericCall2 OnStopMovement;
275 event GenericCall6 OnRemoveAvatar;
276
277 event CreateNewInventoryItem OnCreateNewInventoryItem;
278 event CreateInventoryFolder OnCreateNewInventoryFolder;
279 event FetchInventoryDescendents OnFetchInventoryDescendents;
280 event FetchInventory OnFetchInventory;
281 event RequestTaskInventory OnRequestTaskInventory;
282 event UpdateInventoryItemTransaction OnUpdateInventoryItem;
283 event UDPAssetUploadRequest OnAssetUploadRequest;
284 event XferReceive OnXferReceive;
285 event RequestXfer OnRequestXfer;
286 event ConfirmXfer OnConfirmXfer;
287 event RezScript OnRezScript;
288 event UpdateTaskInventory OnUpdateTaskInventory;
289 event RemoveTaskInventory OnRemoveTaskItem;
290
291 event UUIDNameRequest OnNameFromUUIDRequest;
292
293 event ParcelPropertiesRequest OnParcelPropertiesRequest;
294 event ParcelDivideRequest OnParcelDivideRequest;
295 event ParcelJoinRequest OnParcelJoinRequest;
296 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
297 event ParcelSelectObjects OnParcelSelectObjects;
298 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
299 event EstateOwnerMessageRequest OnEstateOwnerMessage;
300
301 LLVector3 StartPos
302 {
303 get;
304 set;
305 }
306
307 LLUUID AgentId
308 {
309 get;
310 }
311
312 LLUUID SessionId
313 {
314 get;
315 }
316
317 string FirstName
318 {
319 get;
320 }
321
322 string LastName
323 {
324 get;
325 }
326
327 uint CircuitCode
328 {
329 get;
330 set;
331 }
332
333 void OutPacket(Packet newPack);
334 void SendWearables(AvatarWearable[] wearables);
335 void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
336 void SendStartPingCheck(byte seq);
337 void SendKillObject(ulong regionHandle, uint localID);
338 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
339 void SendRegionHandshake(RegionInfo regionInfo);
340 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
341 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
342 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
343 void SendLayerData(float[] map);
344 void SendLayerData(int px, int py, float[] map);
345 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
346 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint );
347 AgentCircuitData RequestClientInfo();
348 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL );
349 void SendMapBlock(List<MapBlockData> mapBlocks);
350 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
351 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL);
352 void SendTeleportCancel();
353 void SendTeleportLocationStart();
354 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
355
356 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID);
357 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity, LLQuaternion rotation);
358 void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
359
360 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
361 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem, LLQuaternion rotation);
362 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
363
364 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items);
365 void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
366 void SendInventoryItemUpdate(InventoryItemBase Item);
367 void SendRemoveInventoryItem(LLUUID itemID);
368 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
369 void SendXferPacket(ulong xferID, uint packet, byte[] data);
370
371 void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
372 void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
373
374 void SendNameReply(LLUUID profileId, string firstname, string lastname);
375 void SendAlertMessage(string message);
376 void SendAgentAlertMessage(string message, bool modal);
377 void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
378 bool AddMoney( int debit );
379
380 void SendViewerTime(int phase);
381 void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
382 void SetDebug(int newDebug);
383 void InPacket(Packet NewPack);
384 void Close();
385 event ViewerEffectEventHandler OnViewerEffect;
386 event Action<IClientAPI> OnLogout;
387 event Action<IClientAPI> OnConnectionClosed;
388 void SendLogoutPacket();
389 }
390}