IClientAPI.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  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,
  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 ModifyTerrain(
  208. float height, float seconds, byte size, byte action, float north, float west, float south, float east,
  209. IClientAPI remoteClient);
  210. public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
  211. public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq);
  212. public delegate void StopAnim(IClientAPI remoteClient, LLUUID animID);
  213. public delegate void LinkObjects(uint parent, List<uint> children);
  214. public delegate void DelinkObjects(List<uint> primIds);
  215. public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
  216. public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
  217. public delegate void TeleportLocationRequest(
  218. IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
  219. public delegate void DisconnectUser();
  220. public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
  221. public delegate void SetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun);
  222. public delegate void GenericCall2();
  223. // really don't want to be passing packets in these events, so this is very temporary.
  224. public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
  225. public delegate void GenericCall5(IClientAPI remoteClient, bool status);
  226. public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
  227. public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
  228. public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
  229. public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
  230. public delegate void RequestObjectPropertiesFamily(
  231. IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
  232. public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
  233. public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
  234. public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
  235. public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
  236. public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  237. public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  238. public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
  239. public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID);
  240. public delegate void StatusChange(bool status);
  241. public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
  242. public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdatePacket agentData);
  243. public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset);
  244. public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
  245. public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery
  246. );
  247. public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
  248. public delegate void ParcelAccessListRequest(
  249. LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
  250. public delegate void ParcelAccessListUpdateRequest(
  251. LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
  252. IClientAPI remote_client);
  253. public delegate void ParcelPropertiesRequest(
  254. int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
  255. public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
  256. public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
  257. public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
  258. public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client);
  259. public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
  260. public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
  261. public delegate void RegionInfoRequest(IClientAPI remote_client, LLUUID sessionID);
  262. public delegate void EstateCovenantRequest(IClientAPI remote_client, LLUUID sessionID);
  263. public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
  264. public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection);
  265. public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
  266. public delegate void GodKickUser(
  267. LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason);
  268. public delegate void CreateInventoryFolder(
  269. IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
  270. public delegate void UpdateInventoryFolder(
  271. IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
  272. public delegate void MoveInventoryFolder(
  273. IClientAPI remoteClient, LLUUID folderID, LLUUID parentID);
  274. public delegate void CreateNewInventoryItem(
  275. IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
  276. sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
  277. public delegate void FetchInventoryDescendents(
  278. IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
  279. public delegate void PurgeInventoryDescendents(
  280. IClientAPI remoteClient, LLUUID folderID);
  281. public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
  282. public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
  283. public delegate void UpdateInventoryItem(
  284. IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
  285. uint nextOwnerMask);
  286. public delegate void CopyInventoryItem(
  287. IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
  288. string newName);
  289. public delegate void MoveInventoryItem(
  290. IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName);
  291. public delegate void RemoveInventoryItem(
  292. IClientAPI remoteClient, LLUUID itemID); // rex
  293. public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
  294. public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
  295. public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
  296. public delegate void UDPAssetUploadRequest(
  297. IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal,
  298. bool tempFile);
  299. public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
  300. public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
  301. public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
  302. public delegate void FriendActionDelegate(IClientAPI remoteClient,LLUUID agentID,LLUUID transactionID,List<LLUUID> callingCardFolders);
  303. public delegate void FriendshipTermination(IClientAPI remoteClient,LLUUID agentID, LLUUID ExID);
  304. public delegate void ReceiveRexClientScriptCmd(IClientAPI remoteClient,LLUUID agentID,List<string> vParams); // rex
  305. //Attachments
  306. public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID,
  307. uint itemFlags, byte attachPoint);
  308. public delegate void ObjectAttach(IClientAPI remoteClient, uint localID, LLQuaternion rotation, byte attachPoint);
  309. public delegate void ObjectDetach(IClientAPI remoteClient, uint localID);
  310. // REX
  311. public delegate void UpdateAssetMediaURL(IClientAPI remoteClient, LLUUID itemID, string mediaUrl);
  312. // REX
  313. public delegate void ObjectClickAction(IClientAPI remoteClient, uint objectLocalId, byte clickAction);
  314. public delegate void TriggerSound(IClientAPI remoteClient, LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  315. public delegate void ObjectPermissions(
  316. IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID,
  317. List<ObjectPermissionsPacket.ObjectDataBlock> permChanges);
  318. public interface IClientAPI
  319. {
  320. event ImprovedInstantMessage OnInstantMessage;
  321. event ChatFromViewer OnChatFromViewer;
  322. event TextureRequest OnRequestTexture;
  323. event RezObject OnRezObject;
  324. event ModifyTerrain OnModifyTerrain;
  325. event SetAppearance OnSetAppearance;
  326. event AvatarNowWearing OnAvatarNowWearing;
  327. event StartAnim OnStartAnim;
  328. event StopAnim OnStopAnim;
  329. event LinkObjects OnLinkObjects;
  330. event DelinkObjects OnDelinkObjects;
  331. event RequestMapBlocks OnRequestMapBlocks;
  332. event RequestMapName OnMapNameRequest;
  333. event TeleportLocationRequest OnTeleportLocationRequest;
  334. event DisconnectUser OnDisconnectUser;
  335. event RequestAvatarProperties OnRequestAvatarProperties;
  336. event SetAlwaysRun OnSetAlwaysRun;
  337. event GenericCall4 OnDeRezObject;
  338. event Action<IClientAPI> OnRegionHandShakeReply;
  339. event GenericCall2 OnRequestWearables;
  340. event GenericCall2 OnCompleteMovementToRegion;
  341. event UpdateAgent OnAgentUpdate;
  342. event AgentRequestSit OnAgentRequestSit;
  343. event AgentSit OnAgentSit;
  344. event AvatarPickerRequest OnAvatarPickerRequest;
  345. event Action<IClientAPI> OnRequestAvatarsData;
  346. event AddNewPrim OnAddPrim;
  347. event RequestGodlikePowers OnRequestGodlikePowers;
  348. event GodKickUser OnGodKickUser;
  349. event ObjectDuplicate OnObjectDuplicate;
  350. event UpdateVector OnGrabObject;
  351. event ObjectSelect OnDeGrabObject;
  352. event MoveObject OnGrabUpdate;
  353. event UpdateShape OnUpdatePrimShape;
  354. event ObjectExtraParams OnUpdateExtraParams;
  355. event ObjectSelect OnObjectSelect;
  356. event ObjectDeselect OnObjectDeselect;
  357. event GenericCall7 OnObjectDescription;
  358. event GenericCall7 OnObjectName;
  359. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  360. event UpdatePrimFlags OnUpdatePrimFlags;
  361. event UpdatePrimTexture OnUpdatePrimTexture;
  362. event UpdateVector OnUpdatePrimGroupPosition;
  363. event UpdateVector OnUpdatePrimSinglePosition;
  364. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  365. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  366. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  367. event UpdateVector OnUpdatePrimScale;
  368. event StatusChange OnChildAgentStatus;
  369. event GenericCall2 OnStopMovement;
  370. event Action<LLUUID> OnRemoveAvatar;
  371. event ObjectPermissions OnObjectPermissions;
  372. event CreateNewInventoryItem OnCreateNewInventoryItem;
  373. event CreateInventoryFolder OnCreateNewInventoryFolder;
  374. event UpdateInventoryFolder OnUpdateInventoryFolder;
  375. event MoveInventoryFolder OnMoveInventoryFolder;
  376. event FetchInventoryDescendents OnFetchInventoryDescendents;
  377. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  378. event FetchInventory OnFetchInventory;
  379. event RequestTaskInventory OnRequestTaskInventory;
  380. event UpdateInventoryItem OnUpdateInventoryItem;
  381. event CopyInventoryItem OnCopyInventoryItem;
  382. event MoveInventoryItem OnMoveInventoryItem;
  383. event RemoveInventoryItem OnRemoveInventoryItem; // rex
  384. event UDPAssetUploadRequest OnAssetUploadRequest;
  385. event XferReceive OnXferReceive;
  386. event RequestXfer OnRequestXfer;
  387. event ConfirmXfer OnConfirmXfer;
  388. event RezScript OnRezScript;
  389. event UpdateTaskInventory OnUpdateTaskInventory;
  390. event RemoveTaskInventory OnRemoveTaskItem;
  391. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  392. event ObjectAttach OnObjectAttach;
  393. event ObjectDetach OnObjectDetach;
  394. event UUIDNameRequest OnNameFromUUIDRequest;
  395. event ParcelAccessListRequest OnParcelAccessListRequest;
  396. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  397. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  398. event ParcelDivideRequest OnParcelDivideRequest;
  399. event ParcelJoinRequest OnParcelJoinRequest;
  400. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  401. event ParcelSelectObjects OnParcelSelectObjects;
  402. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  403. event EstateOwnerMessageRequest OnEstateOwnerMessage;
  404. event RegionInfoRequest OnRegionInfoRequest;
  405. event EstateCovenantRequest OnEstateCovenantRequest;
  406. event FriendActionDelegate OnApproveFriendRequest;
  407. event FriendActionDelegate OnDenyFriendRequest;
  408. event FriendshipTermination OnTerminateFriendship;
  409. event ReceiveRexClientScriptCmd OnReceiveRexClientScriptCmd; // rex
  410. event ObjectClickAction OnObjectClickAction; // rex
  411. event UpdateAssetMediaURL OnUpdateAssetMediaURL; // rex
  412. event TriggerSound OnTriggerSound;
  413. LLVector3 StartPos { get; set; }
  414. LLUUID AgentId { get; }
  415. LLUUID SessionId { get; }
  416. LLUUID SecureSessionId { get; }
  417. string FirstName { get; }
  418. string LastName { get; }
  419. /// <summary>
  420. /// Returns the full name of the agent/avatar represented by this client
  421. /// </summary>
  422. /// <param name="newPack"></param>
  423. /// <param name="packType"></param>
  424. string Name { get; }
  425. uint CircuitCode { get; }
  426. void OutPacket(Packet newPack, ThrottleOutPacketType packType);
  427. void SendWearables(AvatarWearable[] wearables, int serial);
  428. void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
  429. void SendRexAppearance(LLUUID agentID, string avatarAddress); // rex
  430. void SendRexScriptCommand(string vUnit,string vCommand, string vCmdParams); // rex
  431. void SendStartPingCheck(byte seq);
  432. void SendKillObject(ulong regionHandle, uint localID);
  433. void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId);
  434. void SendRegionHandshake(RegionInfo regionInfo);
  435. void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  436. void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  437. void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  438. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
  439. void SendLayerData(float[] map);
  440. void SendLayerData(int px, int py, float[] map);
  441. void SendMediaURL(LLUUID assetId, string mediaURL); //rex
  442. void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
  443. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  444. AgentCircuitData RequestClientInfo();
  445. void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  446. string capsURL);
  447. void SendMapBlock(List<MapBlockData> mapBlocks);
  448. void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
  449. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  450. uint flags, string capsURL);
  451. void SendTeleportFailed();
  452. void SendTeleportLocationStart();
  453. void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
  454. void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID,
  455. LLVector3 Pos, byte[] textureEntry, uint parentID);
  456. void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  457. LLVector3 velocity, LLQuaternion rotation);
  458. void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
  459. void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
  460. void SetChildAgentThrottle(byte[] throttle);
  461. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  462. LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  463. uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
  464. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  465. LLQuaternion rotation);
  466. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  467. LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
  468. void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
  469. List<InventoryFolderBase> folders, bool fetchFolders,
  470. bool fetchItems);
  471. void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
  472. /// <summary>
  473. /// Tell the client that we have created the item it requested.
  474. /// </summary>
  475. /// <param name="Item"></param>
  476. void SendInventoryItemCreateUpdate(InventoryItemBase Item);
  477. void SendRemoveInventoryItem(LLUUID itemID);
  478. void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
  479. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  480. void SendAvatarPickerReply(AvatarPickerReplyPacket Pack);
  481. void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
  482. void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
  483. void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  484. void SendNameReply(LLUUID profileId, string firstname, string lastname);
  485. void SendAlertMessage(string message);
  486. void SendAgentAlertMessage(string message, bool modal);
  487. void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
  488. void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels);
  489. bool AddMoney(int debit);
  490. void SendSunPos(LLVector3 sunPos, LLVector3 sunVel);
  491. void SendViewerTime(int phase);
  492. void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
  493. uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
  494. void SendScriptTeleportRequest(string objectName, string simName, LLVector3 simPosition, LLVector3 lookAt);
  495. void SetDebug(int newDebug);
  496. void InPacket(Packet NewPack);
  497. void Close(bool ShutdownCircuit);
  498. void Kick(string message);
  499. void Stop();
  500. event ViewerEffectEventHandler OnViewerEffect;
  501. event Action<IClientAPI> OnLogout;
  502. event Action<IClientAPI> OnConnectionClosed;
  503. void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message);
  504. void SendLogoutPacket();
  505. }
  506. }