IClientAPI.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  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. using System;
  29. using System.Collections.Generic;
  30. using System.Net;
  31. using libsecondlife;
  32. using libsecondlife.Packets;
  33. namespace OpenSim.Framework
  34. {
  35. // Base Args Interface
  36. public interface IEventArgs
  37. {
  38. IScene Scene { get; set; }
  39. IClientAPI Sender { get; set; }
  40. }
  41. public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock);
  42. public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
  43. public enum ChatTypeEnum
  44. {
  45. Whisper = 0,
  46. Say = 1,
  47. Shout = 2,
  48. // 3 is an obsolete version of Say
  49. StartTyping = 4,
  50. StopTyping = 5,
  51. Broadcast = 0xFF
  52. }
  53. public enum ThrottleOutPacketType : int
  54. {
  55. Resend = 0,
  56. Land = 1,
  57. Wind = 2,
  58. Cloud = 3,
  59. Task = 4,
  60. Texture = 5,
  61. Asset = 6,
  62. Unknown = 7, // Also doubles as 'do not throttle'
  63. Back = 8
  64. }
  65. /// <summary>
  66. /// ChatFromViewer Arguments
  67. /// </summary>
  68. public class ChatFromViewerArgs : EventArgs, IEventArgs
  69. {
  70. protected string m_message;
  71. protected ChatTypeEnum m_type;
  72. protected int m_channel;
  73. protected LLVector3 m_position;
  74. protected string m_from;
  75. protected IClientAPI m_sender;
  76. protected IScene m_scene;
  77. /// <summary>
  78. /// The message sent by the user
  79. /// </summary>
  80. public string Message
  81. {
  82. get { return m_message; }
  83. set { m_message = value; }
  84. }
  85. /// <summary>
  86. /// The type of message, eg say, shout, broadcast.
  87. /// </summary>
  88. public ChatTypeEnum Type
  89. {
  90. get { return m_type; }
  91. set { m_type = value; }
  92. }
  93. /// <summary>
  94. /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero.
  95. /// </summary>
  96. public int Channel
  97. {
  98. get { return m_channel; }
  99. set { m_channel = value; }
  100. }
  101. /// <summary>
  102. /// The position of the sender at the time of the message broadcast.
  103. /// </summary>
  104. public LLVector3 Position
  105. {
  106. get { return m_position; }
  107. set { m_position = value; }
  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. /// <summary>
  118. /// The client responsible for sending the message, or null.
  119. /// </summary>
  120. public IClientAPI Sender
  121. {
  122. get { return m_sender; }
  123. set { m_sender = value; }
  124. }
  125. /// <summary>
  126. ///
  127. /// </summary>
  128. public IScene Scene
  129. {
  130. get { return m_scene; }
  131. set { m_scene = value; }
  132. }
  133. public ChatFromViewerArgs()
  134. {
  135. m_position = new LLVector3();
  136. }
  137. }
  138. public class TextureRequestArgs : EventArgs
  139. {
  140. protected LLUUID m_requestedAssetID;
  141. private sbyte m_discardLevel;
  142. private uint m_packetNumber;
  143. private float m_priority;
  144. public float Priority
  145. {
  146. get { return m_priority; }
  147. set { m_priority = value; }
  148. }
  149. /// <summary>
  150. ///
  151. /// </summary>
  152. public uint PacketNumber
  153. {
  154. get { return m_packetNumber; }
  155. set { m_packetNumber = value; }
  156. }
  157. /// <summary>
  158. ///
  159. /// </summary>
  160. public sbyte DiscardLevel
  161. {
  162. get { return m_discardLevel; }
  163. set { m_discardLevel = value; }
  164. }
  165. /// <summary>
  166. ///
  167. /// </summary>
  168. public LLUUID RequestedAssetID
  169. {
  170. get { return m_requestedAssetID; }
  171. set { m_requestedAssetID = value; }
  172. }
  173. }
  174. public class AvatarWearingArgs : EventArgs
  175. {
  176. private List<Wearable> m_nowWearing = new List<Wearable>();
  177. /// <summary>
  178. ///
  179. /// </summary>
  180. public List<Wearable> NowWearing
  181. {
  182. get { return m_nowWearing; }
  183. set { m_nowWearing = value; }
  184. }
  185. public class Wearable
  186. {
  187. public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
  188. public byte Type = 0;
  189. public Wearable(LLUUID itemId, byte type)
  190. {
  191. ItemID = itemId;
  192. Type = type;
  193. }
  194. }
  195. }
  196. public delegate void TextureRequest(Object sender, TextureRequestArgs e);
  197. public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
  198. public delegate void ImprovedInstantMessage(IClientAPI remoteclient,
  199. LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp,
  200. string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID,
  201. LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down...
  202. // especially if we're ever going to implement groups, presence, estate message dialogs...
  203. public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
  204. LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
  205. uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
  206. bool RezSelected, bool RemoveItem, LLUUID fromTaskID );
  207. public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
  208. uint ItemFlags, uint NextOwnerMask);
  209. public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot);
  210. public delegate void ModifyTerrain(
  211. float height, float seconds, byte size, byte action, float north, float west, float south, float east,
  212. IClientAPI remoteClient);
  213. public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
  214. public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq);
  215. public delegate void StopAnim(IClientAPI remoteClient, LLUUID animID);
  216. public delegate void LinkObjects(uint parent, List<uint> children);
  217. public delegate void DelinkObjects(List<uint> primIds);
  218. public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
  219. public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
  220. public delegate void TeleportLocationRequest(
  221. IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
  222. public delegate void DisconnectUser();
  223. public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
  224. public delegate void SetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun);
  225. public delegate void GenericCall2();
  226. // really don't want to be passing packets in these events, so this is very temporary.
  227. public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
  228. public delegate void GenericCall5(IClientAPI remoteClient, bool status);
  229. public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
  230. public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
  231. public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
  232. public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
  233. public delegate void RequestObjectPropertiesFamily(
  234. IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
  235. public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
  236. public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
  237. public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
  238. public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
  239. public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  240. public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  241. public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
  242. public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID);
  243. public delegate void StatusChange(bool status);
  244. public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
  245. public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdatePacket agentData);
  246. public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset);
  247. public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
  248. public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery
  249. );
  250. public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
  251. public delegate void ParcelAccessListRequest(
  252. LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
  253. public delegate void ParcelAccessListUpdateRequest(
  254. LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
  255. IClientAPI remote_client);
  256. public delegate void ParcelPropertiesRequest(
  257. int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
  258. public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
  259. public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
  260. public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
  261. public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client);
  262. public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
  263. public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
  264. public delegate void RegionInfoRequest(IClientAPI remote_client, LLUUID sessionID);
  265. public delegate void EstateCovenantRequest(IClientAPI remote_client, LLUUID sessionID);
  266. public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
  267. public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection);
  268. public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
  269. public delegate void GodKickUser(
  270. LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason);
  271. public delegate void CreateInventoryFolder(
  272. IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
  273. public delegate void UpdateInventoryFolder(
  274. IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
  275. public delegate void MoveInventoryFolder(
  276. IClientAPI remoteClient, LLUUID folderID, LLUUID parentID);
  277. public delegate void CreateNewInventoryItem(
  278. IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
  279. sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
  280. public delegate void FetchInventoryDescendents(
  281. IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
  282. public delegate void PurgeInventoryDescendents(
  283. IClientAPI remoteClient, LLUUID folderID);
  284. public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
  285. public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
  286. public delegate void UpdateInventoryItem(
  287. IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
  288. uint nextOwnerMask);
  289. public delegate void CopyInventoryItem(
  290. IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
  291. string newName);
  292. public delegate void MoveInventoryItem(
  293. IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName);
  294. public delegate void RemoveInventoryItem(
  295. IClientAPI remoteClient, LLUUID itemID);
  296. public delegate void RemoveInventoryFolder(
  297. IClientAPI remoteClient, LLUUID folderID);
  298. public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
  299. public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
  300. public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
  301. public delegate void UDPAssetUploadRequest(
  302. IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal,
  303. bool tempFile);
  304. public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
  305. public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
  306. public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
  307. public delegate void FriendActionDelegate(IClientAPI remoteClient,LLUUID agentID,LLUUID transactionID,List<LLUUID> callingCardFolders);
  308. public delegate void FriendshipTermination(IClientAPI remoteClient,LLUUID agentID, LLUUID ExID);
  309. public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
  310. public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description);
  311. // We keep all this information for fraud purposes in the future.
  312. public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID);
  313. public delegate void ObjectPermissions(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set);
  314. public interface IClientAPI
  315. {
  316. event ImprovedInstantMessage OnInstantMessage;
  317. event ChatFromViewer OnChatFromViewer;
  318. event TextureRequest OnRequestTexture;
  319. event RezObject OnRezObject;
  320. event ModifyTerrain OnModifyTerrain;
  321. event SetAppearance OnSetAppearance;
  322. event AvatarNowWearing OnAvatarNowWearing;
  323. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  324. event ObjectAttach OnObjectAttach;
  325. event StartAnim OnStartAnim;
  326. event StopAnim OnStopAnim;
  327. event LinkObjects OnLinkObjects;
  328. event DelinkObjects OnDelinkObjects;
  329. event RequestMapBlocks OnRequestMapBlocks;
  330. event RequestMapName OnMapNameRequest;
  331. event TeleportLocationRequest OnTeleportLocationRequest;
  332. event DisconnectUser OnDisconnectUser;
  333. event RequestAvatarProperties OnRequestAvatarProperties;
  334. event SetAlwaysRun OnSetAlwaysRun;
  335. event GenericCall4 OnDeRezObject;
  336. event Action<IClientAPI> OnRegionHandShakeReply;
  337. event GenericCall2 OnRequestWearables;
  338. event GenericCall2 OnCompleteMovementToRegion;
  339. event UpdateAgent OnAgentUpdate;
  340. event AgentRequestSit OnAgentRequestSit;
  341. event AgentSit OnAgentSit;
  342. event AvatarPickerRequest OnAvatarPickerRequest;
  343. event Action<IClientAPI> OnRequestAvatarsData;
  344. event AddNewPrim OnAddPrim;
  345. event FetchInventory OnAgentDataUpdateRequest;
  346. event FetchInventory OnUserInfoRequest;
  347. event TeleportLocationRequest OnSetStartLocationRequest;
  348. event RequestGodlikePowers OnRequestGodlikePowers;
  349. event GodKickUser OnGodKickUser;
  350. event ObjectDuplicate OnObjectDuplicate;
  351. event UpdateVector OnGrabObject;
  352. event ObjectSelect OnDeGrabObject;
  353. event MoveObject OnGrabUpdate;
  354. event UpdateShape OnUpdatePrimShape;
  355. event ObjectExtraParams OnUpdateExtraParams;
  356. event ObjectSelect OnObjectSelect;
  357. event ObjectDeselect OnObjectDeselect;
  358. event GenericCall7 OnObjectDescription;
  359. event GenericCall7 OnObjectName;
  360. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  361. event UpdatePrimFlags OnUpdatePrimFlags;
  362. event UpdatePrimTexture OnUpdatePrimTexture;
  363. event UpdateVector OnUpdatePrimGroupPosition;
  364. event UpdateVector OnUpdatePrimSinglePosition;
  365. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  366. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  367. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  368. event UpdateVector OnUpdatePrimScale;
  369. event StatusChange OnChildAgentStatus;
  370. event GenericCall2 OnStopMovement;
  371. event Action<LLUUID> OnRemoveAvatar;
  372. event ObjectPermissions OnObjectPermissions;
  373. event CreateNewInventoryItem OnCreateNewInventoryItem;
  374. event CreateInventoryFolder OnCreateNewInventoryFolder;
  375. event UpdateInventoryFolder OnUpdateInventoryFolder;
  376. event MoveInventoryFolder OnMoveInventoryFolder;
  377. event FetchInventoryDescendents OnFetchInventoryDescendents;
  378. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  379. event FetchInventory OnFetchInventory;
  380. event RequestTaskInventory OnRequestTaskInventory;
  381. event UpdateInventoryItem OnUpdateInventoryItem;
  382. event CopyInventoryItem OnCopyInventoryItem;
  383. event MoveInventoryItem OnMoveInventoryItem;
  384. event RemoveInventoryFolder OnRemoveInventoryFolder;
  385. event RemoveInventoryItem OnRemoveInventoryItem;
  386. event UDPAssetUploadRequest OnAssetUploadRequest;
  387. event XferReceive OnXferReceive;
  388. event RequestXfer OnRequestXfer;
  389. event ConfirmXfer OnConfirmXfer;
  390. event RezScript OnRezScript;
  391. event UpdateTaskInventory OnUpdateTaskInventory;
  392. event RemoveTaskInventory OnRemoveTaskItem;
  393. event UUIDNameRequest OnNameFromUUIDRequest;
  394. event ParcelAccessListRequest OnParcelAccessListRequest;
  395. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  396. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  397. event ParcelDivideRequest OnParcelDivideRequest;
  398. event ParcelJoinRequest OnParcelJoinRequest;
  399. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  400. event ParcelSelectObjects OnParcelSelectObjects;
  401. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  402. event EstateOwnerMessageRequest OnEstateOwnerMessage;
  403. event RegionInfoRequest OnRegionInfoRequest;
  404. event EstateCovenantRequest OnEstateCovenantRequest;
  405. event FriendActionDelegate OnApproveFriendRequest;
  406. event FriendActionDelegate OnDenyFriendRequest;
  407. event FriendshipTermination OnTerminateFriendship;
  408. event PacketStats OnPacketStats;
  409. // Financial packets
  410. event MoneyTransferRequest OnMoneyTransferRequest;
  411. event MoneyBalanceRequest OnMoneyBalanceRequest;
  412. EndPoint EndPoint
  413. {
  414. set;
  415. get;
  416. }
  417. LLVector3 StartPos { get; set; }
  418. LLUUID AgentId { get; }
  419. LLUUID SessionId { get; }
  420. LLUUID SecureSessionId { get; }
  421. string FirstName { get; }
  422. string LastName { get; }
  423. /// <summary>
  424. /// Returns the full name of the agent/avatar represented by this client
  425. /// </summary>
  426. /// <param name="newPack"></param>
  427. /// <param name="packType"></param>
  428. string Name { get; }
  429. uint CircuitCode { get; }
  430. void OutPacket(Packet newPack, ThrottleOutPacketType packType);
  431. void SendWearables(AvatarWearable[] wearables, int serial);
  432. void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
  433. void SendStartPingCheck(byte seq);
  434. void SendKillObject(ulong regionHandle, uint localID);
  435. void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId);
  436. void SendRegionHandshake(RegionInfo regionInfo);
  437. void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  438. void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  439. void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  440. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
  441. void SendLayerData(float[] map);
  442. void SendLayerData(int px, int py, float[] map);
  443. void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
  444. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  445. AgentCircuitData RequestClientInfo();
  446. void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  447. string capsURL);
  448. void SendMapBlock(List<MapBlockData> mapBlocks);
  449. void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
  450. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  451. uint flags, string capsURL);
  452. void SendTeleportFailed(string reason);
  453. void SendTeleportLocationStart();
  454. void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
  455. void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID,
  456. LLVector3 Pos, byte[] textureEntry, uint parentID);
  457. void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  458. LLVector3 velocity, LLQuaternion rotation);
  459. void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
  460. void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
  461. void SetChildAgentThrottle(byte[] throttle);
  462. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  463. LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  464. uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation);
  465. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  466. LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  467. uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
  468. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  469. LLQuaternion rotation);
  470. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  471. LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
  472. void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
  473. List<InventoryFolderBase> folders, bool fetchFolders,
  474. bool fetchItems);
  475. void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
  476. /// <summary>
  477. /// Tell the client that we have created the item it requested.
  478. /// </summary>
  479. /// <param name="Item"></param>
  480. void SendInventoryItemCreateUpdate(InventoryItemBase Item);
  481. void SendRemoveInventoryItem(LLUUID itemID);
  482. void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
  483. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  484. void SendAvatarPickerReply(AvatarPickerReplyPacket Pack);
  485. void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle);
  486. void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
  487. void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
  488. void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  489. void SendNameReply(LLUUID profileId, string firstname, string lastname);
  490. void SendAlertMessage(string message);
  491. void SendAgentAlertMessage(string message, bool modal);
  492. void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
  493. void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels);
  494. bool AddMoney(int debit);
  495. void SendSunPos(LLVector3 sunPos, LLVector3 sunVel);
  496. void SendViewerTime(int phase);
  497. void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
  498. uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
  499. byte[] GetThrottlesPacked(float multiplier);
  500. bool Claim(EndPoint ep, UseCircuitCodePacket usePacket);
  501. void SetDebug(int newDebug);
  502. void InPacket(Packet NewPack);
  503. void Close(bool ShutdownCircuit);
  504. void Kick(string message);
  505. void Stop();
  506. event ViewerEffectEventHandler OnViewerEffect;
  507. event Action<IClientAPI> OnLogout;
  508. event Action<IClientAPI> OnConnectionClosed;
  509. void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message);
  510. void SendLogoutPacket();
  511. }
  512. }