IClientAPI.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  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 ReceiveRexClientScriptCmd(IClientAPI remoteClient,LLUUID agentID,List<string> vParams); // rex
  310. public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
  311. public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description);
  312. // We keep all this information for fraud purposes in the future.
  313. public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID);
  314. public delegate void ObjectPermissions(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set);
  315. //Attachments
  316. public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID,
  317. uint itemFlags, byte attachPoint);
  318. public delegate void ObjectAttach(IClientAPI remoteClient, uint localID, LLQuaternion rotation, byte attachPoint);
  319. public delegate void ObjectDetach(IClientAPI remoteClient, uint localID);
  320. // REX
  321. public delegate void UpdateAssetMediaURL(IClientAPI remoteClient, LLUUID itemID, string mediaUrl);
  322. // REX
  323. public delegate void ObjectClickAction(IClientAPI remoteClient, uint objectLocalId, byte clickAction);
  324. public delegate void TriggerSound(IClientAPI remoteClient, LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  325. public delegate void ObjectPermissions(
  326. IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID,
  327. List<ObjectPermissionsPacket.ObjectDataBlock> permChanges);
  328. public interface IClientAPI
  329. {
  330. event ImprovedInstantMessage OnInstantMessage;
  331. event ChatFromViewer OnChatFromViewer;
  332. event TextureRequest OnRequestTexture;
  333. event RezObject OnRezObject;
  334. event ModifyTerrain OnModifyTerrain;
  335. event SetAppearance OnSetAppearance;
  336. event AvatarNowWearing OnAvatarNowWearing;
  337. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  338. event ObjectAttach OnObjectAttach;
  339. event StartAnim OnStartAnim;
  340. event StopAnim OnStopAnim;
  341. event LinkObjects OnLinkObjects;
  342. event DelinkObjects OnDelinkObjects;
  343. event RequestMapBlocks OnRequestMapBlocks;
  344. event RequestMapName OnMapNameRequest;
  345. event TeleportLocationRequest OnTeleportLocationRequest;
  346. event DisconnectUser OnDisconnectUser;
  347. event RequestAvatarProperties OnRequestAvatarProperties;
  348. event SetAlwaysRun OnSetAlwaysRun;
  349. event GenericCall4 OnDeRezObject;
  350. event Action<IClientAPI> OnRegionHandShakeReply;
  351. event GenericCall2 OnRequestWearables;
  352. event GenericCall2 OnCompleteMovementToRegion;
  353. event UpdateAgent OnAgentUpdate;
  354. event AgentRequestSit OnAgentRequestSit;
  355. event AgentSit OnAgentSit;
  356. event AvatarPickerRequest OnAvatarPickerRequest;
  357. event Action<IClientAPI> OnRequestAvatarsData;
  358. event AddNewPrim OnAddPrim;
  359. event FetchInventory OnAgentDataUpdateRequest;
  360. event FetchInventory OnUserInfoRequest;
  361. event TeleportLocationRequest OnSetStartLocationRequest;
  362. event RequestGodlikePowers OnRequestGodlikePowers;
  363. event GodKickUser OnGodKickUser;
  364. event ObjectDuplicate OnObjectDuplicate;
  365. event UpdateVector OnGrabObject;
  366. event ObjectSelect OnDeGrabObject;
  367. event MoveObject OnGrabUpdate;
  368. event UpdateShape OnUpdatePrimShape;
  369. event ObjectExtraParams OnUpdateExtraParams;
  370. event ObjectSelect OnObjectSelect;
  371. event ObjectDeselect OnObjectDeselect;
  372. event GenericCall7 OnObjectDescription;
  373. event GenericCall7 OnObjectName;
  374. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  375. event UpdatePrimFlags OnUpdatePrimFlags;
  376. event UpdatePrimTexture OnUpdatePrimTexture;
  377. event UpdateVector OnUpdatePrimGroupPosition;
  378. event UpdateVector OnUpdatePrimSinglePosition;
  379. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  380. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  381. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  382. event UpdateVector OnUpdatePrimScale;
  383. event StatusChange OnChildAgentStatus;
  384. event GenericCall2 OnStopMovement;
  385. event Action<LLUUID> OnRemoveAvatar;
  386. event ObjectPermissions OnObjectPermissions;
  387. event CreateNewInventoryItem OnCreateNewInventoryItem;
  388. event CreateInventoryFolder OnCreateNewInventoryFolder;
  389. event UpdateInventoryFolder OnUpdateInventoryFolder;
  390. event MoveInventoryFolder OnMoveInventoryFolder;
  391. event FetchInventoryDescendents OnFetchInventoryDescendents;
  392. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  393. event FetchInventory OnFetchInventory;
  394. event RequestTaskInventory OnRequestTaskInventory;
  395. event UpdateInventoryItem OnUpdateInventoryItem;
  396. event CopyInventoryItem OnCopyInventoryItem;
  397. event MoveInventoryItem OnMoveInventoryItem;
  398. event RemoveInventoryFolder OnRemoveInventoryFolder;
  399. event RemoveInventoryItem OnRemoveInventoryItem;
  400. event UDPAssetUploadRequest OnAssetUploadRequest;
  401. event XferReceive OnXferReceive;
  402. event RequestXfer OnRequestXfer;
  403. event ConfirmXfer OnConfirmXfer;
  404. event RezScript OnRezScript;
  405. event UpdateTaskInventory OnUpdateTaskInventory;
  406. event RemoveTaskInventory OnRemoveTaskItem;
  407. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  408. event ObjectAttach OnObjectAttach;
  409. event ObjectDetach OnObjectDetach;
  410. event UUIDNameRequest OnNameFromUUIDRequest;
  411. event ParcelAccessListRequest OnParcelAccessListRequest;
  412. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  413. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  414. event ParcelDivideRequest OnParcelDivideRequest;
  415. event ParcelJoinRequest OnParcelJoinRequest;
  416. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  417. event ParcelSelectObjects OnParcelSelectObjects;
  418. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  419. event EstateOwnerMessageRequest OnEstateOwnerMessage;
  420. event RegionInfoRequest OnRegionInfoRequest;
  421. event EstateCovenantRequest OnEstateCovenantRequest;
  422. event FriendActionDelegate OnApproveFriendRequest;
  423. event FriendActionDelegate OnDenyFriendRequest;
  424. event FriendshipTermination OnTerminateFriendship;
  425. event PacketStats OnPacketStats;
  426. // Financial packets
  427. event MoneyTransferRequest OnMoneyTransferRequest;
  428. event MoneyBalanceRequest OnMoneyBalanceRequest;
  429. event ReceiveRexClientScriptCmd OnReceiveRexClientScriptCmd; // rex
  430. event ObjectClickAction OnObjectClickAction; // rex
  431. event UpdateAssetMediaURL OnUpdateAssetMediaURL; // rex
  432. event TriggerSound OnTriggerSound;
  433. LLVector3 StartPos { get; set; }
  434. LLUUID AgentId { get; }
  435. LLUUID SessionId { get; }
  436. LLUUID SecureSessionId { get; }
  437. string FirstName { get; }
  438. string LastName { get; }
  439. /// <summary>
  440. /// Returns the full name of the agent/avatar represented by this client
  441. /// </summary>
  442. /// <param name="newPack"></param>
  443. /// <param name="packType"></param>
  444. string Name { get; }
  445. uint CircuitCode { get; }
  446. void OutPacket(Packet newPack, ThrottleOutPacketType packType);
  447. void SendWearables(AvatarWearable[] wearables, int serial);
  448. void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
  449. void SendRexAppearance(LLUUID agentID, string avatarAddress); // rex
  450. void SendRexScriptCommand(string vUnit,string vCommand, string vCmdParams); // rex
  451. void SendStartPingCheck(byte seq);
  452. void SendKillObject(ulong regionHandle, uint localID);
  453. void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId);
  454. void SendRegionHandshake(RegionInfo regionInfo);
  455. void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  456. void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
  457. void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  458. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
  459. void SendLayerData(float[] map);
  460. void SendLayerData(int px, int py, float[] map);
  461. void SendMediaURL(LLUUID assetId, string mediaURL); //rex
  462. void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
  463. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  464. AgentCircuitData RequestClientInfo();
  465. void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  466. string capsURL);
  467. void SendMapBlock(List<MapBlockData> mapBlocks);
  468. void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
  469. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  470. uint flags, string capsURL);
  471. void SendTeleportFailed(string reason);
  472. void SendTeleportLocationStart();
  473. void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
  474. void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID,
  475. LLVector3 Pos, byte[] textureEntry, uint parentID);
  476. void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  477. LLVector3 velocity, LLQuaternion rotation);
  478. void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
  479. void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
  480. void SetChildAgentThrottle(byte[] throttle);
  481. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  482. LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  483. uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation);
  484. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  485. LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  486. uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
  487. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  488. LLQuaternion rotation);
  489. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  490. LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
  491. void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
  492. List<InventoryFolderBase> folders, bool fetchFolders,
  493. bool fetchItems);
  494. void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
  495. /// <summary>
  496. /// Tell the client that we have created the item it requested.
  497. /// </summary>
  498. /// <param name="Item"></param>
  499. void SendInventoryItemCreateUpdate(InventoryItemBase Item);
  500. void SendRemoveInventoryItem(LLUUID itemID);
  501. void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
  502. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  503. void SendAvatarPickerReply(AvatarPickerReplyPacket Pack);
  504. void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle);
  505. void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
  506. void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
  507. void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  508. void SendNameReply(LLUUID profileId, string firstname, string lastname);
  509. void SendAlertMessage(string message);
  510. void SendAgentAlertMessage(string message, bool modal);
  511. void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
  512. void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels);
  513. bool AddMoney(int debit);
  514. void SendSunPos(LLVector3 sunPos, LLVector3 sunVel);
  515. void SendViewerTime(int phase);
  516. void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
  517. uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
  518. byte[] GetThrottlesPacked(float multiplier);
  519. void SendScriptTeleportRequest(string objectName, string simName, LLVector3 simPosition, LLVector3 lookAt);
  520. void SetDebug(int newDebug);
  521. void InPacket(Packet NewPack);
  522. void Close(bool ShutdownCircuit);
  523. void Kick(string message);
  524. void Stop();
  525. event ViewerEffectEventHandler OnViewerEffect;
  526. event Action<IClientAPI> OnLogout;
  527. event Action<IClientAPI> OnConnectionClosed;
  528. void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message);
  529. void SendLogoutPacket();
  530. }
  531. }