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.cs164
1 files changed, 164 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..4e8ac1a
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -0,0 +1,164 @@
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;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Framework.Inventory;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Types;
35
36namespace OpenSim.Framework.Interfaces
37{
38 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
42 public delegate void StartAnim(LLUUID animID, int seq);
43 public delegate void LinkObjects(uint parent, List<uint> children);
44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
46
47 public delegate void GenericCall(IClientAPI remoteClient);
48 public delegate void GenericCall2();
49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
51 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
52 public delegate void GenericCall6(LLUUID uid);
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 StatusChange(bool status);
61 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
62 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
63 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
64
65 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);
66 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
67 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
68 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); // NOTETOSELFremove the packet part
69
70 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
71
72 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
73
74 public interface IClientAPI
75 {
76 event ChatFromViewer OnChatFromViewer;
77 event RezObject OnRezObject;
78 event ModifyTerrain OnModifyTerrain;
79 event SetAppearance OnSetAppearance;
80 event StartAnim OnStartAnim;
81 event LinkObjects OnLinkObjects;
82 event RequestMapBlocks OnRequestMapBlocks;
83 event TeleportLocationRequest OnTeleportLocationRequest;
84
85 event GenericCall4 OnDeRezObject;
86 event GenericCall OnRegionHandShakeReply;
87 event GenericCall OnRequestWearables;
88 event GenericCall2 OnCompleteMovementToRegion;
89 event UpdateAgent OnAgentUpdate;
90 event GenericCall OnRequestAvatarsData;
91 event GenericCall4 OnAddPrim;
92 event UpdateVector OnGrapObject;
93 event ObjectSelect OnDeGrapObject;
94 event MoveObject OnGrapUpdate;
95
96 event UpdateShape OnUpdatePrimShape;
97 event ObjectSelect OnObjectSelect;
98 event UpdatePrimFlags OnUpdatePrimFlags;
99 event UpdatePrimTexture OnUpdatePrimTexture;
100 event UpdateVector OnUpdatePrimPosition;
101 event UpdatePrimRotation OnUpdatePrimRotation;
102 event UpdateVector OnUpdatePrimScale;
103 event StatusChange OnChildAgentStatus;
104 event GenericCall2 OnStopMovement;
105 event NewAvatar OnNewAvatar;
106 event GenericCall6 OnRemoveAvatar;
107
108 event UUIDNameRequest OnNameFromUUIDRequest;
109
110 event ParcelPropertiesRequest OnParcelPropertiesRequest;
111 event ParcelDivideRequest OnParcelDivideRequest;
112 event ParcelJoinRequest OnParcelJoinRequest;
113 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
114
115 event EstateOwnerMessageRequest OnEstateOwnerMessage;
116
117 LLVector3 StartPos
118 {
119 get;
120 set;
121 }
122
123 LLUUID AgentId
124 {
125 get;
126 }
127
128 string FirstName
129 {
130 get;
131 }
132
133 string LastName
134 {
135 get;
136 }
137
138 void OutPacket(Packet newPack);
139 void SendWearables(AvatarWearable[] wearables);
140 void SendRegionHandshake(RegionInfo regionInfo);
141 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
142 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
143 void SendLayerData(float[] map);
144 void SendLayerData(int px, int py, float[] map);
145 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
146 void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
147 AgentCircuitData RequestClientInfo();
148 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, System.Net.IPAddress newRegionIP, ushort newRegionPort);
149 void SendMapBlock(List<MapBlockData> mapBlocks);
150 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
151 void SendRegionTeleport(ulong regionHandle, byte simAccess, string ipAddress, ushort ipPort, uint locationID, uint flags);
152 void SendTeleportCancel();
153 void SendTeleportLocationStart();
154 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
155
156 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
157 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
158
159 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
160 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags);
161 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags);
162 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
163 }
164}