aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Interfaces/IClientAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/Interfaces/IClientAPI.cs')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs180
1 files changed, 180 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
new file mode 100644
index 0000000..1b0c682
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -0,0 +1,180 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.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.Collections.Generic;
29using System.Net;
30using libsecondlife;
31using libsecondlife.Packets;
32using OpenSim.Framework.Types;
33
34namespace OpenSim.Framework.Interfaces
35{
36 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
37 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
38 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
39 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
40 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
41 public delegate void StartAnim(LLUUID animID, int seq);
42 public delegate void LinkObjects(uint parent, List<uint> children);
43 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
44 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
45
46 public delegate void GenericCall(IClientAPI remoteClient);
47 public delegate void GenericCall2();
48 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
49 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
50 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
51 public delegate void GenericCall6(LLUUID uid);
52 public delegate void GenericCall7(uint localID, string message);
53
54 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
55 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
56 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
57 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
58 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
59 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
60 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
61 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
62 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags);
63 public delegate void StatusChange(bool status);
64 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
65 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
66 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
67
68 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);
69 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
70 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
71 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); // NOTETOSELFremove the packet part
72
73 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
74
75 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
76
77 public interface IClientAPI
78 {
79 event ImprovedInstantMessage OnInstantMessage;
80 event ChatFromViewer OnChatFromViewer;
81 event RezObject OnRezObject;
82 event ModifyTerrain OnModifyTerrain;
83 event SetAppearance OnSetAppearance;
84 event StartAnim OnStartAnim;
85 event LinkObjects OnLinkObjects;
86 event RequestMapBlocks OnRequestMapBlocks;
87 event TeleportLocationRequest OnTeleportLocationRequest;
88
89 event GenericCall4 OnDeRezObject;
90 event GenericCall OnRegionHandShakeReply;
91 event GenericCall OnRequestWearables;
92 event GenericCall2 OnCompleteMovementToRegion;
93 event UpdateAgent OnAgentUpdate;
94 event GenericCall OnRequestAvatarsData;
95 event GenericCall4 OnAddPrim;
96 event ObjectDuplicate OnObjectDuplicate;
97 event UpdateVector OnGrapObject;
98 event ObjectSelect OnDeGrapObject;
99 event MoveObject OnGrapUpdate;
100
101 event UpdateShape OnUpdatePrimShape;
102 event ObjectSelect OnObjectSelect;
103 event GenericCall7 OnObjectDescription;
104 event GenericCall7 OnObjectName;
105 event UpdatePrimFlags OnUpdatePrimFlags;
106 event UpdatePrimTexture OnUpdatePrimTexture;
107 event UpdateVector OnUpdatePrimGroupPosition;
108 event UpdateVector OnUpdatePrimSinglePosition;
109 event UpdatePrimRotation OnUpdatePrimGroupRotation;
110 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
111 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
112 event UpdateVector OnUpdatePrimScale;
113 event StatusChange OnChildAgentStatus;
114 event GenericCall2 OnStopMovement;
115 event NewAvatar OnNewAvatar;
116 event GenericCall6 OnRemoveAvatar;
117
118 event UUIDNameRequest OnNameFromUUIDRequest;
119
120 event ParcelPropertiesRequest OnParcelPropertiesRequest;
121 event ParcelDivideRequest OnParcelDivideRequest;
122 event ParcelJoinRequest OnParcelJoinRequest;
123 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
124
125 event EstateOwnerMessageRequest OnEstateOwnerMessage;
126
127 LLVector3 StartPos
128 {
129 get;
130 set;
131 }
132
133 LLUUID AgentId
134 {
135 get;
136 }
137
138 string FirstName
139 {
140 get;
141 }
142
143 string LastName
144 {
145 get;
146 }
147
148 void OutPacket(Packet newPack);
149 void SendWearables(AvatarWearable[] wearables);
150 void SendStartPingCheck(byte seq);
151 void SendKillObject(ulong regionHandle, uint avatarLocalID);
152 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
153 void SendRegionHandshake(RegionInfo regionInfo);
154 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
155 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
156 void SendInstantMessage(string message, LLUUID target);
157 void SendLayerData(float[] map);
158 void SendLayerData(int px, int py, float[] map);
159 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
160 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint );
161 AgentCircuitData RequestClientInfo();
162 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint );
163 void SendMapBlock(List<MapBlockData> mapBlocks);
164 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
165 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags);
166 void SendTeleportCancel();
167 void SendTeleportLocationStart();
168 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
169
170 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
171 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
172
173 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
174 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags);
175 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags);
176 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
177 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLUUID textureID, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
178 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
179 }
180}