1
0

IClientAPI.cs 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  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 OpenSimulator 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 OpenMetaverse;
  31. using OpenMetaverse.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 ChatMessage(Object sender, OSChatMessage e);
  37. public delegate void GenericMessage(Object sender, string method, List<String> args);
  38. public delegate void TextureRequest(Object sender, TextureRequestArgs e);
  39. public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
  40. public delegate void ImprovedInstantMessage(IClientAPI remoteclient, GridInstantMessage im);
  41. public delegate void RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
  42. UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
  43. bool RezSelected, bool RemoveItem, UUID fromTaskID);
  44. public delegate UUID RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
  45. public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header,
  46. RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects);
  47. public delegate void ObjectAttach(
  48. IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent);
  49. public delegate void ModifyTerrain(UUID user,
  50. float height, float seconds, byte size, byte action, float north, float west, float south, float east,
  51. UUID agentId);
  52. public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
  53. public delegate void SetAppearance(byte[] texture, List<byte> visualParamList);
  54. public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
  55. public delegate void StopAnim(IClientAPI remoteClient, UUID animID);
  56. public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
  57. public delegate void DelinkObjects(List<uint> primIds);
  58. public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
  59. public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
  60. public delegate void TeleportLocationRequest(
  61. IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
  62. public delegate void TeleportLandmarkRequest(
  63. IClientAPI remoteClient, UUID regionID, Vector3 position);
  64. public delegate void DisconnectUser();
  65. public delegate void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID);
  66. public delegate void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData ProfileData);
  67. public delegate void SetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun);
  68. public delegate void GenericCall2();
  69. // really don't want to be passing packets in these events, so this is very temporary.
  70. public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
  71. public delegate void DeRezObject(
  72. IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID);
  73. public delegate void GenericCall5(IClientAPI remoteClient, bool status);
  74. public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
  75. public delegate void UpdateShape(UUID agentID, uint localID, UpdateShapeArgs shapeBlock);
  76. public delegate void ObjectExtraParams(UUID agentID, uint localID, ushort type, bool inUse, byte[] data);
  77. public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
  78. public delegate void ObjectRequest(uint localID, IClientAPI remoteClient);
  79. public delegate void RequestObjectPropertiesFamily(
  80. IClientAPI remoteClient, UUID AgentID, uint RequestFlags, UUID TaskID);
  81. public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
  82. public delegate void ObjectDrop(uint localID, IClientAPI remoteClient);
  83. public delegate void UpdatePrimFlags(
  84. uint localID, bool UsePhysics, bool IsTemporary, bool IsPhantom, IClientAPI remoteClient);
  85. public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
  86. public delegate void UpdateVector(uint localID, Vector3 pos, IClientAPI remoteClient);
  87. public delegate void UpdatePrimRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
  88. public delegate void UpdatePrimSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
  89. public delegate void UpdatePrimSingleRotationPosition(uint localID, Quaternion rot, Vector3 pos, IClientAPI remoteClient);
  90. public delegate void UpdatePrimGroupRotation(uint localID, Vector3 pos, Quaternion rot, IClientAPI remoteClient);
  91. public delegate void ObjectDuplicate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID);
  92. public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
  93. UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
  94. bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters,
  95. bool CopyRotates);
  96. public delegate void StatusChange(bool status);
  97. public delegate void NewAvatar(IClientAPI remoteClient, UUID agentID, bool status);
  98. public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData);
  99. public delegate void AgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset);
  100. public delegate void AgentSit(IClientAPI remoteClient, UUID agentID);
  101. public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery);
  102. public delegate void GrabObject(
  103. uint localID, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  104. public delegate void DeGrabObject(
  105. uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  106. public delegate void MoveObject(
  107. UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  108. public delegate void SpinStart(UUID objectID, IClientAPI remoteClient);
  109. public delegate void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient);
  110. public delegate void SpinStop(UUID objectID, IClientAPI remoteClient);
  111. public delegate void ParcelAccessListRequest(
  112. UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
  113. public delegate void ParcelAccessListUpdateRequest(
  114. UUID agentID, UUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
  115. IClientAPI remote_client);
  116. public delegate void ParcelPropertiesRequest(
  117. int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
  118. public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
  119. public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
  120. public delegate void ParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client);
  121. public delegate void ParcelSelectObjects(int land_local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
  122. public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
  123. public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
  124. public delegate void ParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client);
  125. public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
  126. public delegate void ParcelReturnObjectsRequest(
  127. int local_id, uint return_type, UUID[] agent_ids, UUID[] selected_ids, IClientAPI remote_client);
  128. public delegate void ParcelDeedToGroup(int local_id, UUID group_id, IClientAPI remote_client);
  129. public delegate void EstateOwnerMessageRequest(
  130. UUID AgentID, UUID SessionID, UUID TransactionID, UUID Invoice, byte[] Method, byte[][] Parameters,
  131. IClientAPI remote_client);
  132. public delegate void RegionInfoRequest(IClientAPI remote_client);
  133. public delegate void EstateCovenantRequest(IClientAPI remote_client);
  134. public delegate void UUIDNameRequest(UUID id, IClientAPI remote_client);
  135. public delegate void AddNewPrim(
  136. UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart,
  137. UUID RayTargetID,
  138. byte RayEndIsIntersection);
  139. public delegate void RequestGodlikePowers(
  140. UUID AgentID, UUID SessionID, UUID token, bool GodLike, IClientAPI remote_client);
  141. public delegate void GodKickUser(
  142. UUID GodAgentID, UUID GodSessionID, UUID AgentID, uint kickflags, byte[] reason);
  143. public delegate void CreateInventoryFolder(
  144. IClientAPI remoteClient, UUID folderID, ushort folderType, string folderName, UUID parentID);
  145. public delegate void UpdateInventoryFolder(
  146. IClientAPI remoteClient, UUID folderID, ushort type, string name, UUID parentID);
  147. public delegate void MoveInventoryFolder(
  148. IClientAPI remoteClient, UUID folderID, UUID parentID);
  149. public delegate void CreateNewInventoryItem(
  150. IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name,
  151. sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate);
  152. public delegate void FetchInventoryDescendents(
  153. IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
  154. public delegate void PurgeInventoryDescendents(
  155. IClientAPI remoteClient, UUID folderID);
  156. public delegate void FetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID);
  157. public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
  158. /* public delegate void UpdateInventoryItem(
  159. IClientAPI remoteClient, UUID transactionID, UUID itemID, string name, string description,
  160. uint nextOwnerMask);*/
  161. public delegate void UpdateInventoryItem(
  162. IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd);
  163. public delegate void CopyInventoryItem(
  164. IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID, UUID newFolderID,
  165. string newName);
  166. public delegate void MoveInventoryItem(
  167. IClientAPI remoteClient, List<InventoryItemBase> items);
  168. public delegate void RemoveInventoryItem(
  169. IClientAPI remoteClient, List<UUID> itemIDs);
  170. public delegate void RemoveInventoryFolder(
  171. IClientAPI remoteClient, List<UUID> folderIDs);
  172. public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest);
  173. public delegate void AbortXfer(IClientAPI remoteClient, ulong xferID);
  174. public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, UUID transactionID, uint localID);
  175. public delegate void UpdateTaskInventory(
  176. IClientAPI remoteClient, UUID transactionID, TaskInventoryItem item, uint localID);
  177. public delegate void MoveTaskInventory(IClientAPI remoteClient, UUID folderID, uint localID, UUID itemID);
  178. public delegate void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID);
  179. public delegate void UDPAssetUploadRequest(
  180. IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal,
  181. bool tempFile);
  182. public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
  183. public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
  184. public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
  185. public delegate void FriendActionDelegate(
  186. IClientAPI remoteClient, UUID agentID, UUID transactionID, List<UUID> callingCardFolders);
  187. public delegate void FriendshipTermination(IClientAPI remoteClient, UUID agentID, UUID ExID);
  188. public delegate void MoneyTransferRequest(
  189. UUID sourceID, UUID destID, int amount, int transactionType, string description);
  190. public delegate void ParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
  191. bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice,
  192. bool authenticated);
  193. // We keep all this information for fraud purposes in the future.
  194. public delegate void MoneyBalanceRequest(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID TransactionID);
  195. public delegate void ObjectPermissions(
  196. IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set);
  197. public delegate void EconomyDataRequest(UUID agentID);
  198. public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
  199. public delegate void ScriptAnswer(IClientAPI remoteClient, UUID objectID, UUID itemID, int answer);
  200. public delegate void RequestPayPrice(IClientAPI remoteClient, UUID objectID);
  201. public delegate void ObjectSaleInfo(
  202. IClientAPI remoteClient, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice);
  203. public delegate void ObjectBuy(
  204. IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID groupID, UUID categoryID, uint localID,
  205. byte saleType, int salePrice);
  206. public delegate void BuyObjectInventory(
  207. IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID objectID, UUID itemID, UUID folderID);
  208. public delegate void ForceReleaseControls(IClientAPI remoteClient, UUID agentID);
  209. public delegate void GodLandStatRequest(
  210. int parcelID, uint reportType, uint requestflags, string filter, IClientAPI remoteClient);
  211. //Estate Requests
  212. public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, UUID invoice);
  213. public delegate void SetEstateFlagsRequest(
  214. bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
  215. int matureLevel, bool restrictPushObject, bool allowParcelChanges);
  216. public delegate void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID side);
  217. public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, UUID side);
  218. public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal
  219. );
  220. public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient);
  221. public delegate void SetRegionTerrainSettings(
  222. float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool estateSun, bool fixedSun,
  223. float sunHour, bool globalSun, bool estateFixed, float estateSunHour);
  224. public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
  225. public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName);
  226. public delegate void BakeTerrain(IClientAPI remoteClient);
  227. public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot);
  228. public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, UUID newCovenantID);
  229. public delegate void UpdateEstateAccessDeltaRequest(
  230. IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user);
  231. public delegate void SimulatorBlueBoxMessageRequest(
  232. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
  233. public delegate void EstateBlueBoxMessageRequest(
  234. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
  235. public delegate void EstateDebugRegionRequest(
  236. IClientAPI remoteClient, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics);
  237. public delegate void EstateTeleportOneUserHomeRequest(
  238. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID prey);
  239. public delegate void EstateTeleportAllUsersHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID);
  240. public delegate void RegionHandleRequest(IClientAPI remoteClient, UUID regionID);
  241. public delegate void ParcelInfoRequest(IClientAPI remoteClient, UUID parcelID);
  242. public delegate void ScriptReset(IClientAPI remoteClient, UUID objectID, UUID itemID);
  243. public delegate void GetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID);
  244. public delegate void SetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID, bool running);
  245. public delegate void ActivateGesture(IClientAPI client, UUID gestureid, UUID assetId);
  246. public delegate void DeactivateGesture(IClientAPI client, UUID gestureid);
  247. public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY);
  248. public delegate void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs);
  249. public delegate void DirPlacesQuery(
  250. IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName,
  251. int queryStart);
  252. public delegate void DirFindQuery(
  253. IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart);
  254. public delegate void DirLandQuery(
  255. IClientAPI remoteClient, UUID queryID, uint queryFlags, uint searchType, int price, int area, int queryStart);
  256. public delegate void DirPopularQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags);
  257. public delegate void DirClassifiedQuery(
  258. IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, uint category, int queryStart);
  259. public delegate void EventInfoRequest(IClientAPI remoteClient, uint eventID);
  260. public delegate void ParcelSetOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime);
  261. public delegate void MapItemRequest(
  262. IClientAPI remoteClient, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle);
  263. public delegate void OfferCallingCard(IClientAPI remoteClient, UUID destID, UUID transactionID);
  264. public delegate void AcceptCallingCard(IClientAPI remoteClient, UUID transactionID, UUID folderID);
  265. public delegate void DeclineCallingCard(IClientAPI remoteClient, UUID transactionID);
  266. public delegate void SoundTrigger(
  267. UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle);
  268. public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client);
  269. public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client);
  270. public delegate void ClassifiedInfoRequest(UUID classifiedID, IClientAPI client);
  271. public delegate void ClassifiedInfoUpdate(UUID classifiedID, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, Vector3 globalPos, byte classifiedFlags, int price, IClientAPI client);
  272. public delegate void ClassifiedDelete(UUID classifiedID, IClientAPI client);
  273. public delegate void EventNotificationAddRequest(uint EventID, IClientAPI client);
  274. public delegate void EventNotificationRemoveRequest(uint EventID, IClientAPI client);
  275. public delegate void EventGodDelete(uint eventID, UUID queryID, string queryText, uint queryFlags, int queryStart, IClientAPI client);
  276. public delegate void ParcelDwellRequest(int localID, IClientAPI client);
  277. public delegate void UserInfoRequest(IClientAPI client);
  278. public delegate void UpdateUserInfo(bool imViaEmail, bool visible, IClientAPI client);
  279. public delegate void RetrieveInstantMessages(IClientAPI client);
  280. public delegate void PickDelete(IClientAPI client, UUID pickID);
  281. public delegate void PickGodDelete(IClientAPI client, UUID agentID, UUID pickID, UUID queryID);
  282. public delegate void PickInfoUpdate(IClientAPI client, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled);
  283. public delegate void AvatarNotesUpdate(IClientAPI client, UUID targetID, string notes);
  284. public delegate void MuteListRequest(IClientAPI client, uint muteCRC);
  285. public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
  286. public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
  287. #endregion
  288. public struct DirPlacesReplyData
  289. {
  290. public UUID parcelID;
  291. public string name;
  292. public bool forSale;
  293. public bool auction;
  294. public float dwell;
  295. public uint Status;
  296. }
  297. public struct DirPeopleReplyData
  298. {
  299. public UUID agentID;
  300. public string firstName;
  301. public string lastName;
  302. public string group;
  303. public bool online;
  304. public int reputation;
  305. }
  306. public struct DirEventsReplyData
  307. {
  308. public UUID ownerID;
  309. public string name;
  310. public uint eventID;
  311. public string date;
  312. public uint unixTime;
  313. public uint eventFlags;
  314. public uint Status;
  315. }
  316. public struct DirGroupsReplyData
  317. {
  318. public UUID groupID;
  319. public string groupName;
  320. public int members;
  321. public float searchOrder;
  322. }
  323. public struct DirClassifiedReplyData
  324. {
  325. public UUID classifiedID;
  326. public string name;
  327. public byte classifiedFlags;
  328. public uint creationDate;
  329. public uint expirationDate;
  330. public int price;
  331. public uint Status;
  332. }
  333. public struct DirLandReplyData
  334. {
  335. public UUID parcelID;
  336. public string name;
  337. public bool auction;
  338. public bool forSale;
  339. public int salePrice;
  340. public int actualArea;
  341. }
  342. public struct DirPopularReplyData
  343. {
  344. public UUID parcelID;
  345. public string name;
  346. public float dwell;
  347. }
  348. public interface IClientAPI
  349. {
  350. Vector3 StartPos { get; set; }
  351. UUID AgentId { get; }
  352. UUID SessionId { get; }
  353. UUID SecureSessionId { get; }
  354. UUID ActiveGroupId { get; }
  355. string ActiveGroupName { get; }
  356. ulong ActiveGroupPowers { get; }
  357. ulong GetGroupPowers(UUID groupID);
  358. bool IsGroupMember(UUID GroupID);
  359. string FirstName { get; }
  360. string LastName { get; }
  361. IScene Scene { get; }
  362. // [Obsolete("LLClientView Specific - Replace with ???")]
  363. int NextAnimationSequenceNumber { get; }
  364. /// <summary>
  365. /// Returns the full name of the agent/avatar represented by this client
  366. /// </summary>
  367. string Name { get; }
  368. /// <value>
  369. /// Determines whether the client thread is doing anything or not.
  370. /// </value>
  371. bool IsActive { get; set; }
  372. bool SendLogoutPacketWhenClosing { set; }
  373. // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
  374. uint CircuitCode { get; }
  375. event GenericMessage OnGenericMessage;
  376. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  377. event ImprovedInstantMessage OnInstantMessage;
  378. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
  379. event ChatMessage OnChatFromClient;
  380. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  381. event TextureRequest OnRequestTexture;
  382. // [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
  383. event RezObject OnRezObject;
  384. // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
  385. event ModifyTerrain OnModifyTerrain;
  386. event BakeTerrain OnBakeTerrain;
  387. event EstateChangeInfo OnEstateChangeInfo;
  388. // [Obsolete("LLClientView Specific.")]
  389. event SetAppearance OnSetAppearance;
  390. // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
  391. event AvatarNowWearing OnAvatarNowWearing;
  392. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  393. event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
  394. event UUIDNameRequest OnDetachAttachmentIntoInv;
  395. event ObjectAttach OnObjectAttach;
  396. event ObjectDeselect OnObjectDetach;
  397. event ObjectDrop OnObjectDrop;
  398. event StartAnim OnStartAnim;
  399. event StopAnim OnStopAnim;
  400. event LinkObjects OnLinkObjects;
  401. event DelinkObjects OnDelinkObjects;
  402. event RequestMapBlocks OnRequestMapBlocks;
  403. event RequestMapName OnMapNameRequest;
  404. event TeleportLocationRequest OnTeleportLocationRequest;
  405. event DisconnectUser OnDisconnectUser;
  406. event RequestAvatarProperties OnRequestAvatarProperties;
  407. event SetAlwaysRun OnSetAlwaysRun;
  408. event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  409. event DeRezObject OnDeRezObject;
  410. event Action<IClientAPI> OnRegionHandShakeReply;
  411. event GenericCall2 OnRequestWearables;
  412. event GenericCall2 OnCompleteMovementToRegion;
  413. event UpdateAgent OnAgentUpdate;
  414. event AgentRequestSit OnAgentRequestSit;
  415. event AgentSit OnAgentSit;
  416. event AvatarPickerRequest OnAvatarPickerRequest;
  417. event Action<IClientAPI> OnRequestAvatarsData;
  418. event AddNewPrim OnAddPrim;
  419. event FetchInventory OnAgentDataUpdateRequest;
  420. event TeleportLocationRequest OnSetStartLocationRequest;
  421. event RequestGodlikePowers OnRequestGodlikePowers;
  422. event GodKickUser OnGodKickUser;
  423. event ObjectDuplicate OnObjectDuplicate;
  424. event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  425. event GrabObject OnGrabObject;
  426. event DeGrabObject OnDeGrabObject;
  427. event MoveObject OnGrabUpdate;
  428. event SpinStart OnSpinStart;
  429. event SpinObject OnSpinUpdate;
  430. event SpinStop OnSpinStop;
  431. event UpdateShape OnUpdatePrimShape;
  432. event ObjectExtraParams OnUpdateExtraParams;
  433. event ObjectRequest OnObjectRequest;
  434. event ObjectSelect OnObjectSelect;
  435. event ObjectDeselect OnObjectDeselect;
  436. event GenericCall7 OnObjectDescription;
  437. event GenericCall7 OnObjectName;
  438. event GenericCall7 OnObjectClickAction;
  439. event GenericCall7 OnObjectMaterial;
  440. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  441. event UpdatePrimFlags OnUpdatePrimFlags;
  442. event UpdatePrimTexture OnUpdatePrimTexture;
  443. event UpdateVector OnUpdatePrimGroupPosition;
  444. event UpdateVector OnUpdatePrimSinglePosition;
  445. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  446. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  447. event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
  448. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  449. event UpdateVector OnUpdatePrimScale;
  450. event UpdateVector OnUpdatePrimGroupScale;
  451. event StatusChange OnChildAgentStatus;
  452. event GenericCall2 OnStopMovement;
  453. event Action<UUID> OnRemoveAvatar;
  454. event ObjectPermissions OnObjectPermissions;
  455. event CreateNewInventoryItem OnCreateNewInventoryItem;
  456. event CreateInventoryFolder OnCreateNewInventoryFolder;
  457. event UpdateInventoryFolder OnUpdateInventoryFolder;
  458. event MoveInventoryFolder OnMoveInventoryFolder;
  459. event FetchInventoryDescendents OnFetchInventoryDescendents;
  460. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  461. event FetchInventory OnFetchInventory;
  462. event RequestTaskInventory OnRequestTaskInventory;
  463. event UpdateInventoryItem OnUpdateInventoryItem;
  464. event CopyInventoryItem OnCopyInventoryItem;
  465. event MoveInventoryItem OnMoveInventoryItem;
  466. event RemoveInventoryFolder OnRemoveInventoryFolder;
  467. event RemoveInventoryItem OnRemoveInventoryItem;
  468. event UDPAssetUploadRequest OnAssetUploadRequest;
  469. event XferReceive OnXferReceive;
  470. event RequestXfer OnRequestXfer;
  471. event ConfirmXfer OnConfirmXfer;
  472. event AbortXfer OnAbortXfer;
  473. event RezScript OnRezScript;
  474. event UpdateTaskInventory OnUpdateTaskInventory;
  475. event MoveTaskInventory OnMoveTaskItem;
  476. event RemoveTaskInventory OnRemoveTaskItem;
  477. event RequestAsset OnRequestAsset;
  478. event UUIDNameRequest OnNameFromUUIDRequest;
  479. event ParcelAccessListRequest OnParcelAccessListRequest;
  480. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  481. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  482. event ParcelDivideRequest OnParcelDivideRequest;
  483. event ParcelJoinRequest OnParcelJoinRequest;
  484. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  485. event ParcelSelectObjects OnParcelSelectObjects;
  486. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  487. event ParcelAbandonRequest OnParcelAbandonRequest;
  488. event ParcelGodForceOwner OnParcelGodForceOwner;
  489. event ParcelReclaim OnParcelReclaim;
  490. event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  491. event ParcelDeedToGroup OnParcelDeedToGroup;
  492. event RegionInfoRequest OnRegionInfoRequest;
  493. event EstateCovenantRequest OnEstateCovenantRequest;
  494. event FriendActionDelegate OnApproveFriendRequest;
  495. event FriendActionDelegate OnDenyFriendRequest;
  496. event FriendshipTermination OnTerminateFriendship;
  497. // Financial packets
  498. event MoneyTransferRequest OnMoneyTransferRequest;
  499. event EconomyDataRequest OnEconomyDataRequest;
  500. event MoneyBalanceRequest OnMoneyBalanceRequest;
  501. event UpdateAvatarProperties OnUpdateAvatarProperties;
  502. event ParcelBuy OnParcelBuy;
  503. event RequestPayPrice OnRequestPayPrice;
  504. event ObjectSaleInfo OnObjectSaleInfo;
  505. event ObjectBuy OnObjectBuy;
  506. event BuyObjectInventory OnBuyObjectInventory;
  507. event RequestTerrain OnRequestTerrain;
  508. event RequestTerrain OnUploadTerrain;
  509. event ObjectIncludeInSearch OnObjectIncludeInSearch;
  510. event UUIDNameRequest OnTeleportHomeRequest;
  511. event ScriptAnswer OnScriptAnswer;
  512. event AgentSit OnUndo;
  513. event ForceReleaseControls OnForceReleaseControls;
  514. event GodLandStatRequest OnLandStatRequest;
  515. event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  516. event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  517. event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  518. event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  519. event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  520. event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  521. event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  522. event EstateRestartSimRequest OnEstateRestartSimRequest;
  523. event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  524. event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  525. event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  526. event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  527. event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  528. event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  529. event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
  530. event UUIDNameRequest OnUUIDGroupNameRequest;
  531. event RegionHandleRequest OnRegionHandleRequest;
  532. event ParcelInfoRequest OnParcelInfoRequest;
  533. event RequestObjectPropertiesFamily OnObjectGroupRequest;
  534. event ScriptReset OnScriptReset;
  535. event GetScriptRunning OnGetScriptRunning;
  536. event SetScriptRunning OnSetScriptRunning;
  537. event UpdateVector OnAutoPilotGo;
  538. event TerrainUnacked OnUnackedTerrain;
  539. event ActivateGesture OnActivateGesture;
  540. event DeactivateGesture OnDeactivateGesture;
  541. event ObjectOwner OnObjectOwner;
  542. event DirPlacesQuery OnDirPlacesQuery;
  543. event DirFindQuery OnDirFindQuery;
  544. event DirLandQuery OnDirLandQuery;
  545. event DirPopularQuery OnDirPopularQuery;
  546. event DirClassifiedQuery OnDirClassifiedQuery;
  547. event EventInfoRequest OnEventInfoRequest;
  548. event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
  549. event MapItemRequest OnMapItemRequest;
  550. event OfferCallingCard OnOfferCallingCard;
  551. event AcceptCallingCard OnAcceptCallingCard;
  552. event DeclineCallingCard OnDeclineCallingCard;
  553. event SoundTrigger OnSoundTrigger;
  554. event StartLure OnStartLure;
  555. event TeleportLureRequest OnTeleportLureRequest;
  556. event NetworkStats OnNetworkStatsUpdate;
  557. event ClassifiedInfoRequest OnClassifiedInfoRequest;
  558. event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
  559. event ClassifiedDelete OnClassifiedDelete;
  560. event ClassifiedDelete OnClassifiedGodDelete;
  561. event EventNotificationAddRequest OnEventNotificationAddRequest;
  562. event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
  563. event EventGodDelete OnEventGodDelete;
  564. event ParcelDwellRequest OnParcelDwellRequest;
  565. event UserInfoRequest OnUserInfoRequest;
  566. event UpdateUserInfo OnUpdateUserInfo;
  567. event RetrieveInstantMessages OnRetrieveInstantMessages;
  568. event PickDelete OnPickDelete;
  569. event PickGodDelete OnPickGodDelete;
  570. event PickInfoUpdate OnPickInfoUpdate;
  571. event AvatarNotesUpdate OnAvatarNotesUpdate;
  572. event MuteListRequest OnMuteListRequest;
  573. event PlacesQuery OnPlacesQuery;
  574. /// <summary>
  575. /// Set the debug level at which packet output should be printed to console.
  576. /// </summary>
  577. void SetDebugPacketLevel(int newDebug);
  578. void InPacket(object NewPack);
  579. void ProcessInPacket(Packet NewPack);
  580. void Close(bool ShutdownCircuit);
  581. void Kick(string message);
  582. /// <summary>
  583. /// Start processing for this client.
  584. /// </summary>
  585. void Start();
  586. void Stop();
  587. // void ActivateGesture(UUID assetId, UUID gestureId);
  588. /// <summary>
  589. /// Tell this client what items it should be wearing now
  590. /// </summary>
  591. void SendWearables(AvatarWearable[] wearables, int serial);
  592. /// <summary>
  593. /// Send information about the given agent's appearance to another client.
  594. /// </summary>
  595. /// <param name="agentID">The id of the agent associated with the appearance</param>
  596. /// <param name="visualParams"></param>
  597. /// <param name="textureEntry"></param>
  598. void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
  599. void SendStartPingCheck(byte seq);
  600. /// <summary>
  601. /// Tell the client that an object has been deleted
  602. /// </summary>
  603. /// <param name="regionHandle"></param>
  604. /// <param name="localID"></param>
  605. void SendKillObject(ulong regionHandle, uint localID);
  606. void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
  607. void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
  608. void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source,
  609. byte audible);
  610. void SendInstantMessage(GridInstantMessage im);
  611. void SendGenericMessage(string method, List<string> message);
  612. void SendLayerData(float[] map);
  613. void SendLayerData(int px, int py, float[] map);
  614. void SendWindData(Vector2[] windSpeeds);
  615. void SendCloudData(float[] cloudCover);
  616. void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
  617. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  618. /// <summary>
  619. /// Return circuit information for this client.
  620. /// </summary>
  621. /// <returns></returns>
  622. AgentCircuitData RequestClientInfo();
  623. void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  624. string capsURL);
  625. void SendMapBlock(List<MapBlockData> mapBlocks, uint flag);
  626. void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags);
  627. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  628. uint flags, string capsURL);
  629. void SendTeleportFailed(string reason);
  630. void SendTeleportLocationStart();
  631. void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
  632. void SendPayPrice(UUID objectID, int[] payPrice);
  633. void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
  634. uint avatarLocalID,
  635. Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation);
  636. void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
  637. Vector3 velocity, Quaternion rotation, UUID agentid);
  638. void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
  639. void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
  640. void SetChildAgentThrottle(byte[] throttle);
  641. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  642. Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
  643. uint flags,
  644. UUID objectID, UUID ownerID, string text, byte[] color, uint parentID,
  645. byte[] particleSystem,
  646. byte clickAction, byte material, byte[] textureanim, bool attachment,
  647. uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags,
  648. double SoundRadius);
  649. void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  650. Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
  651. uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
  652. uint parentID, byte[] particleSystem, byte clickAction, byte material);
  653. void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
  654. Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state,
  655. UUID AssetId, UUID owner, int attachPoint);
  656. void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
  657. List<InventoryFolderBase> folders, bool fetchFolders,
  658. bool fetchItems);
  659. void FlushPrimUpdates();
  660. void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item);
  661. /// <summary>
  662. /// Tell the client that we have created the item it requested.
  663. /// </summary>
  664. /// <param name="Item"></param>
  665. void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId);
  666. void SendRemoveInventoryItem(UUID itemID);
  667. void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
  668. void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
  669. /// <summary>
  670. /// Used by the server to inform the client of new inventory items and folders.
  671. /// </summary>
  672. ///
  673. /// If the node is a folder then the contents will be transferred
  674. /// (including all descendent folders) as well as the folder itself.
  675. ///
  676. /// <param name="node"></param>
  677. void SendBulkUpdateInventory(InventoryNodeBase node);
  678. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  679. void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
  680. int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
  681. float PriceObjectScaleFactor,
  682. int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent,
  683. int PricePublicObjectDecay,
  684. int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice,
  685. float TeleportPriceExponent);
  686. void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
  687. void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers,
  688. string groupname, string grouptitle);
  689. void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID);
  690. void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags);
  691. void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position,
  692. float gain);
  693. void SendAttachedSoundGainChange(UUID objectID, float gain);
  694. void SendNameReply(UUID profileId, string firstname, string lastname);
  695. void SendAlertMessage(string message);
  696. void SendAgentAlertMessage(string message, bool modal);
  697. void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
  698. void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
  699. string[] buttonlabels);
  700. bool AddMoney(int debit);
  701. /// <summary>
  702. /// Update the client as to where the sun is currently located.
  703. /// </summary>
  704. /// <param name="sunPos"></param>
  705. /// <param name="sunVel"></param>
  706. /// <param name="CurrentTime">Seconds since Unix Epoch 01/01/1970 00:00:00</param>
  707. /// <param name="SecondsPerSunCycle"></param>
  708. /// <param name="SecondsPerYear"></param>
  709. /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param>
  710. void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear,
  711. float OrbitalPosition);
  712. void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
  713. void SendViewerTime(int phase);
  714. UUID GetDefaultAnimation(string name);
  715. void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout,
  716. uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
  717. void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
  718. void SendHealth(float health);
  719. void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID);
  720. void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID);
  721. void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
  722. void SendEstateCovenantInformation(UUID covenant);
  723. void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags,
  724. uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner);
  725. void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData,
  726. float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity,
  727. uint regionFlags);
  728. void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID);
  729. void SendForceClientSelectObjects(List<uint> objectIDs);
  730. void SendCameraConstraint(Vector4 ConstraintPlane);
  731. void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount);
  732. void SendLandParcelOverlay(byte[] data, int sequence_id);
  733. #region Parcel Methods
  734. void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time);
  735. void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
  736. byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
  737. byte mediaLoop);
  738. #endregion
  739. void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID);
  740. void SendConfirmXfer(ulong xferID, uint PacketID);
  741. void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName);
  742. void SendInitiateDownload(string simFileName, string clientFileName);
  743. /// <summary>
  744. /// Send the first part of a texture. For sufficiently small textures, this may be the only packet.
  745. /// </summary>
  746. /// <param name="numParts"></param>
  747. /// <param name="ImageUUID"></param>
  748. /// <param name="ImageSize"></param>
  749. /// <param name="ImageData"></param>
  750. /// <param name="imageCodec"></param>
  751. void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
  752. /// <summary>
  753. /// Send the next packet for a series of packets making up a single texture,
  754. /// as established by SendImageFirstPart()
  755. /// </summary>
  756. /// <param name="partNumber"></param>
  757. /// <param name="imageUuid"></param>
  758. /// <param name="imageData"></param>
  759. void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData);
  760. /// <summary>
  761. /// Tell the client that the requested texture cannot be found
  762. /// </summary>
  763. void SendImageNotFound(UUID imageid);
  764. void SendShutdownConnectionNotice();
  765. /// <summary>
  766. /// Send statistical information about the sim to the client.
  767. /// </summary>
  768. /// <param name="stats"></param>
  769. void SendSimStats(SimStats stats);
  770. void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
  771. uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
  772. uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice,
  773. uint Category,
  774. UUID LastOwnerID, string ObjectName, string Description);
  775. void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID,
  776. UUID FromTaskUUID,
  777. UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
  778. UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle,
  779. string ItemName,
  780. string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask,
  781. uint EveryoneMask,
  782. uint BaseMask, byte saleType, int salePrice);
  783. void SendAgentOffline(UUID[] agentIDs);
  784. void SendAgentOnline(UUID[] agentIDs);
  785. void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
  786. Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook);
  787. void SendAdminResponse(UUID Token, uint AdminLevel);
  788. void SendGroupMembership(GroupMembershipData[] GroupMembership);
  789. void SendGroupNameReply(UUID groupLLUID, string GroupName);
  790. void SendJoinGroupReply(UUID groupID, bool success);
  791. void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success);
  792. void SendLeaveGroupReply(UUID groupID, bool success);
  793. void SendCreateGroupReply(UUID groupID, bool success, string message);
  794. void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
  795. void SendScriptRunningReply(UUID objectID, UUID itemID, bool running);
  796. void SendAsset(AssetRequestToClient req);
  797. void SendTexture(AssetBase TextureAsset);
  798. byte[] GetThrottlesPacked(float multiplier);
  799. event ViewerEffectEventHandler OnViewerEffect;
  800. event Action<IClientAPI> OnLogout;
  801. event Action<IClientAPI> OnConnectionClosed;
  802. void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message);
  803. void SendLogoutPacket();
  804. EndPoint GetClientEP();
  805. // WARNING WARNING WARNING
  806. //
  807. // The two following methods are EXCLUSIVELY for the load balancer.
  808. // they cause a MASSIVE performance hit!
  809. //
  810. ClientInfo GetClientInfo();
  811. void SetClientInfo(ClientInfo info);
  812. void SetClientOption(string option, string value);
  813. string GetClientOption(string option);
  814. void Terminate();
  815. void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters);
  816. void SendClearFollowCamProperties(UUID objectID);
  817. void SendRegionHandle(UUID regoinID, ulong handle);
  818. void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
  819. void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
  820. void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data);
  821. void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data);
  822. void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data);
  823. void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data);
  824. void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data);
  825. void SendDirLandReply(UUID queryID, DirLandReplyData[] data);
  826. void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data);
  827. void SendEventInfoReply(EventData info);
  828. void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags);
  829. void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data);
  830. void SendOfferCallingCard(UUID srcID, UUID transactionID);
  831. void SendAcceptCallingCard(UUID transactionID);
  832. void SendDeclineCallingCard(UUID transactionID);
  833. void SendTerminateFriend(UUID exFriendID);
  834. void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name);
  835. void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price);
  836. void SendAgentDropGroup(UUID groupID);
  837. void RefreshGroupMembership();
  838. void SendAvatarNotesReply(UUID targetID, string text);
  839. void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks);
  840. void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled);
  841. void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds);
  842. void SendParcelDwellReply(int localID, UUID parcelID, float dwell);
  843. void SendUserInfoReply(bool imViaEmail, bool visible, string email);
  844. void SendUseCachedMuteList();
  845. void SendMuteListUpdate(string filename);
  846. void KillEndDone();
  847. bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
  848. }
  849. }