IClientAPI.cs 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  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. using System;
  28. using System.Collections.Generic;
  29. using System.Net;
  30. using libsecondlife;
  31. using libsecondlife.Packets;
  32. namespace OpenSim.Framework
  33. {
  34. #region Client API Delegate definitions
  35. public delegate void ViewerEffectEventHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args);
  36. public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
  37. public delegate void TextureRequest(Object sender, TextureRequestArgs e);
  38. public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
  39. public delegate void ImprovedInstantMessage(IClientAPI remoteclient,
  40. LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp,
  41. string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID,
  42. LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down...
  43. // especially if we're ever going to implement groups, presence, estate message dialogs...
  44. public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
  45. LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
  46. uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
  47. bool RezSelected, bool RemoveItem, LLUUID fromTaskID);
  48. public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
  49. uint ItemFlags, uint NextOwnerMask);
  50. public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot);
  51. public delegate void ModifyTerrain(
  52. float height, float seconds, byte size, byte action, float north, float west, float south, float east,
  53. IClientAPI remoteClient);
  54. public delegate void SetAppearance(byte[] texture, List<byte> visualParamList);
  55. public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID);
  56. public delegate void StopAnim(IClientAPI remoteClient, LLUUID animID);
  57. public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
  58. public delegate void DelinkObjects(List<uint> primIds);
  59. public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
  60. public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
  61. public delegate void TeleportLocationRequest(
  62. IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
  63. public delegate void TeleportLandmarkRequest(
  64. IClientAPI remoteClient, ulong regionHandle, LLVector3 position);
  65. public delegate void DisconnectUser();
  66. public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
  67. public delegate void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData ProfileData);
  68. public delegate void SetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun);
  69. public delegate void GenericCall2();
  70. // really don't want to be passing packets in these events, so this is very temporary.
  71. public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
  72. public delegate void GenericCall5(IClientAPI remoteClient, bool status);
  73. public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
  74. public delegate void UpdateShape(LLUUID agentID, uint localID, UpdateShapeArgs shapeBlock);
  75. public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
  76. public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
  77. public delegate void RequestObjectPropertiesFamily(
  78. IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
  79. public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
  80. public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
  81. public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
  82. public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
  83. public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  84. public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
  85. public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
  86. public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID);
  87. public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID,
  88. LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart,
  89. bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates);
  90. public delegate void StatusChange(bool status);
  91. public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
  92. public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData);
  93. public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset);
  94. public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
  95. public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery
  96. );
  97. public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
  98. public delegate void ParcelAccessListRequest(
  99. LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
  100. public delegate void ParcelAccessListUpdateRequest(
  101. LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
  102. IClientAPI remote_client);
  103. public delegate void ParcelPropertiesRequest(
  104. int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
  105. public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
  106. public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
  107. public delegate void ParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client);
  108. public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client);
  109. public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
  110. public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
  111. public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
  112. public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, LLUUID[] agent_ids, LLUUID[] selected_ids, IClientAPI remote_client);
  113. public delegate void EstateOwnerMessageRequest(LLUUID AgentID, LLUUID SessionID, LLUUID TransactionID, LLUUID Invoice, byte[] Method, byte[][] Parameters, IClientAPI remote_client);
  114. public delegate void RegionInfoRequest(IClientAPI remote_client);
  115. public delegate void EstateCovenantRequest(IClientAPI remote_client);
  116. public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
  117. public delegate void AddNewPrim(
  118. LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
  119. byte RayEndIsIntersection);
  120. public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client);
  121. public delegate void GodKickUser(
  122. LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason);
  123. public delegate void CreateInventoryFolder(
  124. IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
  125. public delegate void UpdateInventoryFolder(
  126. IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
  127. public delegate void MoveInventoryFolder(
  128. IClientAPI remoteClient, LLUUID folderID, LLUUID parentID);
  129. public delegate void CreateNewInventoryItem(
  130. IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
  131. sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
  132. public delegate void FetchInventoryDescendents(
  133. IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
  134. public delegate void PurgeInventoryDescendents(
  135. IClientAPI remoteClient, LLUUID folderID);
  136. public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
  137. public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
  138. /* public delegate void UpdateInventoryItem(
  139. IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
  140. uint nextOwnerMask);*/
  141. public delegate void UpdateInventoryItem(
  142. IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, InventoryItemBase itemUpd);
  143. public delegate void CopyInventoryItem(
  144. IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
  145. string newName);
  146. public delegate void MoveInventoryItem(
  147. IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName);
  148. public delegate void RemoveInventoryItem(
  149. IClientAPI remoteClient, LLUUID itemID);
  150. public delegate void RemoveInventoryFolder(
  151. IClientAPI remoteClient, LLUUID folderID);
  152. public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest);
  153. public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID);
  154. public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem item, uint localID);
  155. public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID);
  156. public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
  157. public delegate void UDPAssetUploadRequest(
  158. IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal,
  159. bool tempFile);
  160. public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
  161. public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
  162. public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
  163. public delegate void FriendActionDelegate(IClientAPI remoteClient, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders);
  164. public delegate void FriendshipTermination(IClientAPI remoteClient, LLUUID agentID, LLUUID ExID);
  165. public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
  166. public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description);
  167. public delegate void ParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned,
  168. bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated);
  169. // We keep all this information for fraud purposes in the future.
  170. public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID);
  171. public delegate void ObjectPermissions(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set);
  172. public delegate void EconomyDataRequest(LLUUID agentID);
  173. public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
  174. public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer);
  175. public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID);
  176. public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID);
  177. public delegate void GodLandStatRequest(int parcelID, uint reportType, uint requestflags, string filter, IClientAPI remoteClient);
  178. //Estate Requests
  179. public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice);
  180. public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges);
  181. public delegate void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, LLUUID side);
  182. public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, LLUUID side);
  183. public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal);
  184. public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient);
  185. public delegate void SetRegionTerrainSettings(float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool fixedSun, float sunHour);
  186. public delegate void BakeTerrain(IClientAPI remoteClient );
  187. public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot);
  188. public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, LLUUID newCovenantID);
  189. public delegate void UpdateEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user);
  190. public delegate void SimulatorBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message);
  191. public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message);
  192. public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics);
  193. public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID prey);
  194. public delegate void ScriptReset(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID);
  195. public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID);
  196. public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running);
  197. #endregion
  198. public interface IClientAPI
  199. {
  200. LLVector3 StartPos { get; set; }
  201. LLUUID AgentId { get; }
  202. LLUUID SessionId { get; }
  203. LLUUID SecureSessionId { get; }
  204. LLUUID ActiveGroupId { get; }
  205. string ActiveGroupName { get; }
  206. ulong ActiveGroupPowers { get; }
  207. string FirstName { get; }
  208. string LastName { get; }
  209. // [Obsolete("LLClientView Specific - Replace with ???")]
  210. int NextAnimationSequenceNumber { get; }
  211. /// <summary>
  212. /// Returns the full name of the agent/avatar represented by this client
  213. /// </summary>
  214. /// <param name="newPack"></param>
  215. /// <param name="packType"></param>
  216. string Name { get; }
  217. bool IsActive
  218. {
  219. get;
  220. set;
  221. }
  222. // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
  223. uint CircuitCode { get; }
  224. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  225. event ImprovedInstantMessage OnInstantMessage;
  226. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
  227. event ChatFromViewer OnChatFromViewer;
  228. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  229. event TextureRequest OnRequestTexture;
  230. // [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
  231. event RezObject OnRezObject;
  232. // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
  233. event ModifyTerrain OnModifyTerrain;
  234. event BakeTerrain OnBakeTerrain;
  235. // [Obsolete("LLClientView Specific.")]
  236. event SetAppearance OnSetAppearance;
  237. // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
  238. event AvatarNowWearing OnAvatarNowWearing;
  239. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  240. event UUIDNameRequest OnDetachAttachmentIntoInv;
  241. event ObjectAttach OnObjectAttach;
  242. event ObjectDeselect OnObjectDetach;
  243. event StartAnim OnStartAnim;
  244. event StopAnim OnStopAnim;
  245. event LinkObjects OnLinkObjects;
  246. event DelinkObjects OnDelinkObjects;
  247. event RequestMapBlocks OnRequestMapBlocks;
  248. event RequestMapName OnMapNameRequest;
  249. event TeleportLocationRequest OnTeleportLocationRequest;
  250. event DisconnectUser OnDisconnectUser;
  251. event RequestAvatarProperties OnRequestAvatarProperties;
  252. event SetAlwaysRun OnSetAlwaysRun;
  253. event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  254. event GenericCall4 OnDeRezObject;
  255. event Action<IClientAPI> OnRegionHandShakeReply;
  256. event GenericCall2 OnRequestWearables;
  257. event GenericCall2 OnCompleteMovementToRegion;
  258. event UpdateAgent OnAgentUpdate;
  259. event AgentRequestSit OnAgentRequestSit;
  260. event AgentSit OnAgentSit;
  261. event AvatarPickerRequest OnAvatarPickerRequest;
  262. event Action<IClientAPI> OnRequestAvatarsData;
  263. event AddNewPrim OnAddPrim;
  264. event FetchInventory OnAgentDataUpdateRequest;
  265. event FetchInventory OnUserInfoRequest;
  266. event TeleportLocationRequest OnSetStartLocationRequest;
  267. event RequestGodlikePowers OnRequestGodlikePowers;
  268. event GodKickUser OnGodKickUser;
  269. event ObjectDuplicate OnObjectDuplicate;
  270. event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  271. event UpdateVector OnGrabObject;
  272. event ObjectSelect OnDeGrabObject;
  273. event MoveObject OnGrabUpdate;
  274. event UpdateShape OnUpdatePrimShape;
  275. event ObjectExtraParams OnUpdateExtraParams;
  276. event ObjectSelect OnObjectSelect;
  277. event ObjectDeselect OnObjectDeselect;
  278. event GenericCall7 OnObjectDescription;
  279. event GenericCall7 OnObjectName;
  280. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  281. event UpdatePrimFlags OnUpdatePrimFlags;
  282. event UpdatePrimTexture OnUpdatePrimTexture;
  283. event UpdateVector OnUpdatePrimGroupPosition;
  284. event UpdateVector OnUpdatePrimSinglePosition;
  285. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  286. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  287. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  288. event UpdateVector OnUpdatePrimScale;
  289. event UpdateVector OnUpdatePrimGroupScale;
  290. event StatusChange OnChildAgentStatus;
  291. event GenericCall2 OnStopMovement;
  292. event Action<LLUUID> OnRemoveAvatar;
  293. event ObjectPermissions OnObjectPermissions;
  294. event CreateNewInventoryItem OnCreateNewInventoryItem;
  295. event CreateInventoryFolder OnCreateNewInventoryFolder;
  296. event UpdateInventoryFolder OnUpdateInventoryFolder;
  297. event MoveInventoryFolder OnMoveInventoryFolder;
  298. event FetchInventoryDescendents OnFetchInventoryDescendents;
  299. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  300. event FetchInventory OnFetchInventory;
  301. event RequestTaskInventory OnRequestTaskInventory;
  302. event UpdateInventoryItem OnUpdateInventoryItem;
  303. event CopyInventoryItem OnCopyInventoryItem;
  304. event MoveInventoryItem OnMoveInventoryItem;
  305. event RemoveInventoryFolder OnRemoveInventoryFolder;
  306. event RemoveInventoryItem OnRemoveInventoryItem;
  307. event UDPAssetUploadRequest OnAssetUploadRequest;
  308. event XferReceive OnXferReceive;
  309. event RequestXfer OnRequestXfer;
  310. event ConfirmXfer OnConfirmXfer;
  311. event RezScript OnRezScript;
  312. event UpdateTaskInventory OnUpdateTaskInventory;
  313. event MoveTaskInventory OnMoveTaskItem;
  314. event RemoveTaskInventory OnRemoveTaskItem;
  315. event RequestAsset OnRequestAsset;
  316. event UUIDNameRequest OnNameFromUUIDRequest;
  317. event ParcelAccessListRequest OnParcelAccessListRequest;
  318. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  319. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  320. event ParcelDivideRequest OnParcelDivideRequest;
  321. event ParcelJoinRequest OnParcelJoinRequest;
  322. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  323. event ParcelSelectObjects OnParcelSelectObjects;
  324. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  325. event ParcelAbandonRequest OnParcelAbandonRequest;
  326. event ParcelReclaim OnParcelReclaim;
  327. event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  328. event RegionInfoRequest OnRegionInfoRequest;
  329. event EstateCovenantRequest OnEstateCovenantRequest;
  330. event FriendActionDelegate OnApproveFriendRequest;
  331. event FriendActionDelegate OnDenyFriendRequest;
  332. event FriendshipTermination OnTerminateFriendship;
  333. event PacketStats OnPacketStats;
  334. // Financial packets
  335. event MoneyTransferRequest OnMoneyTransferRequest;
  336. event EconomyDataRequest OnEconomyDataRequest;
  337. event MoneyBalanceRequest OnMoneyBalanceRequest;
  338. event UpdateAvatarProperties OnUpdateAvatarProperties;
  339. event ParcelBuy OnParcelBuy;
  340. event RequestPayPrice OnRequestPayPrice;
  341. event ObjectIncludeInSearch OnObjectIncludeInSearch;
  342. event UUIDNameRequest OnTeleportHomeRequest;
  343. event ScriptAnswer OnScriptAnswer;
  344. event AgentSit OnUndo;
  345. event ForceReleaseControls OnForceReleaseControls;
  346. event GodLandStatRequest OnLandStatRequest;
  347. event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  348. event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  349. event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  350. event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  351. event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  352. event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  353. event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  354. event EstateRestartSimRequest OnEstateRestartSimRequest;
  355. event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  356. event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  357. event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  358. event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  359. event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  360. event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  361. event UUIDNameRequest OnUUIDGroupNameRequest;
  362. event RequestObjectPropertiesFamily OnObjectGroupRequest;
  363. event ScriptReset OnScriptReset;
  364. event GetScriptRunning OnGetScriptRunning;
  365. event SetScriptRunning OnSetScriptRunning;
  366. event UpdateVector OnAutoPilotGo;
  367. // [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
  368. void OutPacket(Packet newPack, ThrottleOutPacketType packType);
  369. void SendWearables(AvatarWearable[] wearables, int serial);
  370. void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
  371. void SendStartPingCheck(byte seq);
  372. void SendKillObject(ulong regionHandle, uint localID);
  373. void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId);
  374. void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
  375. void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible);
  376. void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible);
  377. void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  378. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
  379. void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  380. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp,
  381. byte[] binaryBucket);
  382. void SendLayerData(float[] map);
  383. void SendLayerData(int px, int py, float[] map);
  384. void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
  385. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  386. AgentCircuitData RequestClientInfo();
  387. void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  388. string capsURL);
  389. void SendMapBlock(List<MapBlockData> mapBlocks, uint flag);
  390. void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
  391. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  392. uint flags, string capsURL);
  393. void SendTeleportFailed(string reason);
  394. void SendTeleportLocationStart();
  395. void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
  396. void SendPayPrice(LLUUID objectID, int[] payPrice);
  397. void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID,
  398. LLVector3 Pos, byte[] textureEntry, uint parentID);
  399. void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  400. LLVector3 velocity, LLQuaternion rotation);
  401. void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
  402. void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
  403. void SetChildAgentThrottle(byte[] throttle);
  404. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  405. LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel,
  406. uint flags,
  407. LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
  408. byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius);
  409. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  410. LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel,
  411. uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  412. uint parentID, byte[] particleSystem, byte clickAction);
  413. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  414. LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId);
  415. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
  416. LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
  417. void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
  418. List<InventoryFolderBase> folders, bool fetchFolders,
  419. bool fetchItems);
  420. void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
  421. /// <summary>
  422. /// Tell the client that we have created the item it requested.
  423. /// </summary>
  424. /// <param name="Item"></param>
  425. void SendInventoryItemCreateUpdate(InventoryItemBase Item);
  426. void SendRemoveInventoryItem(LLUUID itemID);
  427. void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
  428. void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
  429. /// <summary>
  430. /// Used by the server to inform the client of a new inventory item. Used when transferring items
  431. /// between avatars, possibly among other things.
  432. /// </summary>
  433. /// <param name="item"></param>
  434. void SendBulkUpdateInventory(InventoryItemBase item);
  435. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  436. void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
  437. int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
  438. int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
  439. int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent);
  440. void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
  441. void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle);
  442. void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
  443. void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
  444. void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain);
  445. void SendAttachedSoundGainChange(LLUUID objectID, float gain);
  446. void SendNameReply(LLUUID profileId, string firstname, string lastname);
  447. void SendAlertMessage(string message);
  448. void SendAgentAlertMessage(string message, bool modal);
  449. void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
  450. void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels);
  451. bool AddMoney(int debit);
  452. void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition);
  453. void SendViewerTime(int phase);
  454. LLUUID GetDefaultAnimation(string name);
  455. void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
  456. uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
  457. void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question);
  458. void SendHealth(float health);
  459. void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID);
  460. void SendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID);
  461. void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
  462. void SendEstateCovenantInformation();
  463. void SendDetailedEstateData(LLUUID invoice,string estateName, uint estateID);
  464. void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags);
  465. void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID);
  466. void SendForceClientSelectObjects(List<uint> objectIDs);
  467. void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount);
  468. void SendLandParcelOverlay(byte[] data, int sequence_id);
  469. #region Parcel Methods
  470. void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time);
  471. void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID,
  472. byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
  473. byte mediaLoop);
  474. #endregion
  475. void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID);
  476. void SendConfirmXfer(ulong xferID, uint PacketID);
  477. void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName);
  478. void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
  479. void SendShutdownConnectionNotice();
  480. void SendSimStats(Packet pack);
  481. void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
  482. uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
  483. uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
  484. LLUUID LastOwnerID, string ObjectName, string Description);
  485. void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
  486. LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
  487. LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
  488. string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
  489. uint BaseMask);
  490. void SendAgentOffline(LLUUID[] agentIDs);
  491. void SendAgentOnline(LLUUID[] agentIDs);
  492. void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot,
  493. LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook);
  494. void SendAdminResponse(LLUUID Token, uint AdminLevel);
  495. void SendGroupMembership(GroupData[] GroupMembership);
  496. void SendGroupNameReply(LLUUID groupLLUID, string GroupName);
  497. void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
  498. void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running);
  499. void SendAsset(AssetRequestToClient req);
  500. void SendTexture(AssetBase TextureAsset);
  501. byte[] GetThrottlesPacked(float multiplier);
  502. void SetDebug(int newDebug);
  503. void InPacket(Packet NewPack);
  504. void Close(bool ShutdownCircuit);
  505. void Kick(string message);
  506. void Stop();
  507. event ViewerEffectEventHandler OnViewerEffect;
  508. event Action<IClientAPI> OnLogout;
  509. event Action<IClientAPI> OnConnectionClosed;
  510. void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message);
  511. void SendLogoutPacket();
  512. ClientInfo GetClientInfo();
  513. void SetClientInfo(ClientInfo info);
  514. void Terminate();
  515. }
  516. }