IClientAPI.cs 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  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(Primitive.TextureEntry textureEntry, byte[] visualParams);
  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 GrantUserFriendRights(IClientAPI client, UUID requester, UUID target, int rights);
  287. public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
  288. public delegate void AgentFOV(IClientAPI client, float verticalAngle);
  289. public delegate double UpdatePriorityHandler(UpdatePriorityData data);
  290. #endregion
  291. public struct DirPlacesReplyData
  292. {
  293. public UUID parcelID;
  294. public string name;
  295. public bool forSale;
  296. public bool auction;
  297. public float dwell;
  298. public uint Status;
  299. }
  300. public struct DirPeopleReplyData
  301. {
  302. public UUID agentID;
  303. public string firstName;
  304. public string lastName;
  305. public string group;
  306. public bool online;
  307. public int reputation;
  308. }
  309. public struct DirEventsReplyData
  310. {
  311. public UUID ownerID;
  312. public string name;
  313. public uint eventID;
  314. public string date;
  315. public uint unixTime;
  316. public uint eventFlags;
  317. public uint Status;
  318. }
  319. public struct DirGroupsReplyData
  320. {
  321. public UUID groupID;
  322. public string groupName;
  323. public int members;
  324. public float searchOrder;
  325. }
  326. public struct DirClassifiedReplyData
  327. {
  328. public UUID classifiedID;
  329. public string name;
  330. public byte classifiedFlags;
  331. public uint creationDate;
  332. public uint expirationDate;
  333. public int price;
  334. public uint Status;
  335. }
  336. public struct DirLandReplyData
  337. {
  338. public UUID parcelID;
  339. public string name;
  340. public bool auction;
  341. public bool forSale;
  342. public int salePrice;
  343. public int actualArea;
  344. }
  345. public struct DirPopularReplyData
  346. {
  347. public UUID parcelID;
  348. public string name;
  349. public float dwell;
  350. }
  351. public struct SendAvatarData
  352. {
  353. public readonly ulong RegionHandle;
  354. public readonly string FirstName;
  355. public readonly string LastName;
  356. public readonly string GroupTitle;
  357. public readonly UUID AvatarID;
  358. public readonly uint AvatarLocalID;
  359. public readonly Vector3 Position;
  360. public readonly byte[] TextureEntry;
  361. public readonly uint ParentID;
  362. public readonly Quaternion Rotation;
  363. public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID,
  364. uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation)
  365. {
  366. RegionHandle = regionHandle;
  367. FirstName = firstName;
  368. LastName = lastName;
  369. GroupTitle = groupTitle;
  370. AvatarID = avatarID;
  371. AvatarLocalID = avatarLocalID;
  372. Position = position;
  373. TextureEntry = textureEntry;
  374. ParentID = parentID;
  375. Rotation = rotation;
  376. }
  377. }
  378. public struct SendAvatarTerseData
  379. {
  380. public readonly ulong RegionHandle;
  381. public readonly ushort TimeDilation;
  382. public readonly uint LocalID;
  383. public readonly Vector3 Position;
  384. public readonly Vector3 Velocity;
  385. public readonly Vector3 Acceleration;
  386. public readonly Quaternion Rotation;
  387. public readonly Vector4 CollisionPlane;
  388. public readonly UUID AgentID;
  389. public readonly byte[] TextureEntry;
  390. public readonly double Priority;
  391. public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity,
  392. Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority)
  393. {
  394. RegionHandle = regionHandle;
  395. TimeDilation = timeDilation;
  396. LocalID = localID;
  397. Position = position;
  398. Velocity = velocity;
  399. Acceleration = acceleration;
  400. Rotation = rotation;
  401. CollisionPlane = collisionPlane;
  402. AgentID = agentid;
  403. TextureEntry = textureEntry;
  404. Priority = priority;
  405. }
  406. }
  407. public struct SendPrimitiveTerseData
  408. {
  409. public readonly ulong RegionHandle;
  410. public readonly ushort TimeDilation;
  411. public readonly uint LocalID;
  412. public readonly Vector3 Position;
  413. public readonly Quaternion Rotation;
  414. public readonly Vector3 Velocity;
  415. public readonly Vector3 Acceleration;
  416. public readonly Vector3 AngularVelocity;
  417. public readonly UUID AssetID;
  418. public readonly UUID OwnerID;
  419. public readonly int AttachPoint;
  420. public readonly byte[] TextureEntry;
  421. public readonly double Priority;
  422. public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
  423. Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity,
  424. UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority)
  425. {
  426. RegionHandle = regionHandle;
  427. TimeDilation = timeDilation;
  428. LocalID = localID;
  429. Position = position;
  430. Rotation = rotation;
  431. Velocity = velocity;
  432. Acceleration = acceleration;
  433. AngularVelocity = rotationalvelocity;
  434. AssetID = assetID;
  435. OwnerID = ownerID;
  436. AttachPoint = attachPoint;
  437. TextureEntry = textureEntry;
  438. Priority = priority;
  439. }
  440. }
  441. public struct SendPrimitiveData
  442. {
  443. private ulong m_regionHandle;
  444. private ushort m_timeDilation;
  445. private uint m_localID;
  446. private PrimitiveBaseShape m_primShape;
  447. private Vector3 m_pos;
  448. private Vector3 m_vel;
  449. private Vector3 m_acc;
  450. private Quaternion m_rotation;
  451. private Vector3 m_rvel;
  452. private PrimFlags m_flags;
  453. private UUID m_objectID;
  454. private UUID m_ownerID;
  455. private string m_text;
  456. private byte[] m_color;
  457. private uint m_parentID;
  458. private byte[] m_particleSystem;
  459. private byte m_clickAction;
  460. private byte m_material;
  461. private byte[] m_textureanim;
  462. private bool m_attachment;
  463. private uint m_AttachPoint;
  464. private UUID m_AssetId;
  465. private UUID m_SoundId;
  466. private double m_SoundVolume;
  467. private byte m_SoundFlags;
  468. private double m_SoundRadius;
  469. private double m_priority;
  470. public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  471. Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
  472. uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
  473. uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) :
  474. this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID,
  475. ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero,
  476. UUID.Zero, 0, 0, 0, priority) { }
  477. public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
  478. Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
  479. uint flags,
  480. UUID objectID, UUID ownerID, string text, byte[] color, uint parentID,
  481. byte[] particleSystem,
  482. byte clickAction, byte material, byte[] textureanim, bool attachment,
  483. uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags,
  484. double SoundRadius, double priority)
  485. {
  486. this.m_regionHandle = regionHandle;
  487. this.m_timeDilation = timeDilation;
  488. this.m_localID = localID;
  489. this.m_primShape = primShape;
  490. this.m_pos = pos;
  491. this.m_vel = vel;
  492. this.m_acc = acc;
  493. this.m_rotation = rotation;
  494. this.m_rvel = rvel;
  495. this.m_flags = (PrimFlags)flags;
  496. this.m_objectID = objectID;
  497. this.m_ownerID = ownerID;
  498. this.m_text = text;
  499. this.m_color = color;
  500. this.m_parentID = parentID;
  501. this.m_particleSystem = particleSystem;
  502. this.m_clickAction = clickAction;
  503. this.m_material = material;
  504. this.m_textureanim = textureanim;
  505. this.m_attachment = attachment;
  506. this.m_AttachPoint = AttachPoint;
  507. this.m_AssetId = AssetId;
  508. this.m_SoundId = SoundId;
  509. this.m_SoundVolume = SoundVolume;
  510. this.m_SoundFlags = SoundFlags;
  511. this.m_SoundRadius = SoundRadius;
  512. this.m_priority = priority;
  513. }
  514. public ulong regionHandle { get { return this.m_regionHandle; } }
  515. public ushort timeDilation { get { return this.m_timeDilation; } }
  516. public uint localID { get { return this.m_localID; } }
  517. public PrimitiveBaseShape primShape { get { return this.m_primShape; } }
  518. public Vector3 pos { get { return this.m_pos; } }
  519. public Vector3 vel { get { return this.m_vel; } }
  520. public Vector3 acc { get { return this.m_acc; } }
  521. public Quaternion rotation { get { return this.m_rotation; } }
  522. public Vector3 rvel { get { return this.m_rvel; } }
  523. public PrimFlags flags { get { return this.m_flags; } }
  524. public UUID objectID { get { return this.m_objectID; } }
  525. public UUID ownerID { get { return this.m_ownerID; } }
  526. public string text { get { return this.m_text; } }
  527. public byte[] color { get { return this.m_color; } }
  528. public uint parentID { get { return this.m_parentID; } }
  529. public byte[] particleSystem { get { return this.m_particleSystem; } }
  530. public byte clickAction { get { return this.m_clickAction; } }
  531. public byte material { get { return this.m_material; } }
  532. public byte[] textureanim { get { return this.m_textureanim; } }
  533. public bool attachment { get { return this.m_attachment; } }
  534. public uint AttachPoint { get { return this.m_AttachPoint; } }
  535. public UUID AssetId { get { return this.m_AssetId; } }
  536. public UUID SoundId { get { return this.m_SoundId; } }
  537. public double SoundVolume { get { return this.m_SoundVolume; } }
  538. public byte SoundFlags { get { return this.m_SoundFlags; } }
  539. public double SoundRadius { get { return this.m_SoundRadius; } }
  540. public double priority { get { return this.m_priority; } }
  541. }
  542. public struct UpdatePriorityData {
  543. private double m_priority;
  544. private uint m_localID;
  545. public UpdatePriorityData(double priority, uint localID) {
  546. this.m_priority = priority;
  547. this.m_localID = localID;
  548. }
  549. public double priority { get { return this.m_priority; } }
  550. public uint localID { get { return this.m_localID; } }
  551. }
  552. [Flags]
  553. public enum StateUpdateTypes
  554. {
  555. None = 0,
  556. AvatarTerse = 1,
  557. PrimitiveTerse = AvatarTerse << 1,
  558. PrimitiveFull = PrimitiveTerse << 1,
  559. All = AvatarTerse | PrimitiveTerse | PrimitiveFull,
  560. }
  561. public interface IClientAPI
  562. {
  563. Vector3 StartPos { get; set; }
  564. UUID AgentId { get; }
  565. UUID SessionId { get; }
  566. UUID SecureSessionId { get; }
  567. UUID ActiveGroupId { get; }
  568. string ActiveGroupName { get; }
  569. ulong ActiveGroupPowers { get; }
  570. ulong GetGroupPowers(UUID groupID);
  571. bool IsGroupMember(UUID GroupID);
  572. string FirstName { get; }
  573. string LastName { get; }
  574. IScene Scene { get; }
  575. // [Obsolete("LLClientView Specific - Replace with ???")]
  576. int NextAnimationSequenceNumber { get; }
  577. /// <summary>
  578. /// Returns the full name of the agent/avatar represented by this client
  579. /// </summary>
  580. string Name { get; }
  581. /// <value>
  582. /// Determines whether the client thread is doing anything or not.
  583. /// </value>
  584. bool IsActive { get; set; }
  585. bool SendLogoutPacketWhenClosing { set; }
  586. // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
  587. uint CircuitCode { get; }
  588. IPEndPoint RemoteEndPoint { get; }
  589. event GenericMessage OnGenericMessage;
  590. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  591. event ImprovedInstantMessage OnInstantMessage;
  592. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
  593. event ChatMessage OnChatFromClient;
  594. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  595. event TextureRequest OnRequestTexture;
  596. // [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
  597. event RezObject OnRezObject;
  598. // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
  599. event ModifyTerrain OnModifyTerrain;
  600. event BakeTerrain OnBakeTerrain;
  601. event EstateChangeInfo OnEstateChangeInfo;
  602. // [Obsolete("LLClientView Specific.")]
  603. event SetAppearance OnSetAppearance;
  604. // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
  605. event AvatarNowWearing OnAvatarNowWearing;
  606. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  607. event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
  608. event UUIDNameRequest OnDetachAttachmentIntoInv;
  609. event ObjectAttach OnObjectAttach;
  610. event ObjectDeselect OnObjectDetach;
  611. event ObjectDrop OnObjectDrop;
  612. event StartAnim OnStartAnim;
  613. event StopAnim OnStopAnim;
  614. event LinkObjects OnLinkObjects;
  615. event DelinkObjects OnDelinkObjects;
  616. event RequestMapBlocks OnRequestMapBlocks;
  617. event RequestMapName OnMapNameRequest;
  618. event TeleportLocationRequest OnTeleportLocationRequest;
  619. event DisconnectUser OnDisconnectUser;
  620. event RequestAvatarProperties OnRequestAvatarProperties;
  621. event SetAlwaysRun OnSetAlwaysRun;
  622. event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  623. event DeRezObject OnDeRezObject;
  624. event Action<IClientAPI> OnRegionHandShakeReply;
  625. event GenericCall2 OnRequestWearables;
  626. event GenericCall2 OnCompleteMovementToRegion;
  627. event UpdateAgent OnAgentUpdate;
  628. event AgentRequestSit OnAgentRequestSit;
  629. event AgentSit OnAgentSit;
  630. event AvatarPickerRequest OnAvatarPickerRequest;
  631. event Action<IClientAPI> OnRequestAvatarsData;
  632. event AddNewPrim OnAddPrim;
  633. event FetchInventory OnAgentDataUpdateRequest;
  634. event TeleportLocationRequest OnSetStartLocationRequest;
  635. event RequestGodlikePowers OnRequestGodlikePowers;
  636. event GodKickUser OnGodKickUser;
  637. event ObjectDuplicate OnObjectDuplicate;
  638. event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  639. event GrabObject OnGrabObject;
  640. event DeGrabObject OnDeGrabObject;
  641. event MoveObject OnGrabUpdate;
  642. event SpinStart OnSpinStart;
  643. event SpinObject OnSpinUpdate;
  644. event SpinStop OnSpinStop;
  645. event UpdateShape OnUpdatePrimShape;
  646. event ObjectExtraParams OnUpdateExtraParams;
  647. event ObjectRequest OnObjectRequest;
  648. event ObjectSelect OnObjectSelect;
  649. event ObjectDeselect OnObjectDeselect;
  650. event GenericCall7 OnObjectDescription;
  651. event GenericCall7 OnObjectName;
  652. event GenericCall7 OnObjectClickAction;
  653. event GenericCall7 OnObjectMaterial;
  654. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  655. event UpdatePrimFlags OnUpdatePrimFlags;
  656. event UpdatePrimTexture OnUpdatePrimTexture;
  657. event UpdateVector OnUpdatePrimGroupPosition;
  658. event UpdateVector OnUpdatePrimSinglePosition;
  659. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  660. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  661. event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
  662. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  663. event UpdateVector OnUpdatePrimScale;
  664. event UpdateVector OnUpdatePrimGroupScale;
  665. event StatusChange OnChildAgentStatus;
  666. event GenericCall2 OnStopMovement;
  667. event Action<UUID> OnRemoveAvatar;
  668. event ObjectPermissions OnObjectPermissions;
  669. event CreateNewInventoryItem OnCreateNewInventoryItem;
  670. event CreateInventoryFolder OnCreateNewInventoryFolder;
  671. event UpdateInventoryFolder OnUpdateInventoryFolder;
  672. event MoveInventoryFolder OnMoveInventoryFolder;
  673. event FetchInventoryDescendents OnFetchInventoryDescendents;
  674. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  675. event FetchInventory OnFetchInventory;
  676. event RequestTaskInventory OnRequestTaskInventory;
  677. event UpdateInventoryItem OnUpdateInventoryItem;
  678. event CopyInventoryItem OnCopyInventoryItem;
  679. event MoveInventoryItem OnMoveInventoryItem;
  680. event RemoveInventoryFolder OnRemoveInventoryFolder;
  681. event RemoveInventoryItem OnRemoveInventoryItem;
  682. event UDPAssetUploadRequest OnAssetUploadRequest;
  683. event XferReceive OnXferReceive;
  684. event RequestXfer OnRequestXfer;
  685. event ConfirmXfer OnConfirmXfer;
  686. event AbortXfer OnAbortXfer;
  687. event RezScript OnRezScript;
  688. event UpdateTaskInventory OnUpdateTaskInventory;
  689. event MoveTaskInventory OnMoveTaskItem;
  690. event RemoveTaskInventory OnRemoveTaskItem;
  691. event RequestAsset OnRequestAsset;
  692. event UUIDNameRequest OnNameFromUUIDRequest;
  693. event ParcelAccessListRequest OnParcelAccessListRequest;
  694. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  695. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  696. event ParcelDivideRequest OnParcelDivideRequest;
  697. event ParcelJoinRequest OnParcelJoinRequest;
  698. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  699. event ParcelSelectObjects OnParcelSelectObjects;
  700. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  701. event ParcelAbandonRequest OnParcelAbandonRequest;
  702. event ParcelGodForceOwner OnParcelGodForceOwner;
  703. event ParcelReclaim OnParcelReclaim;
  704. event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  705. event ParcelDeedToGroup OnParcelDeedToGroup;
  706. event RegionInfoRequest OnRegionInfoRequest;
  707. event EstateCovenantRequest OnEstateCovenantRequest;
  708. event FriendActionDelegate OnApproveFriendRequest;
  709. event FriendActionDelegate OnDenyFriendRequest;
  710. event FriendshipTermination OnTerminateFriendship;
  711. // Financial packets
  712. event MoneyTransferRequest OnMoneyTransferRequest;
  713. event EconomyDataRequest OnEconomyDataRequest;
  714. event MoneyBalanceRequest OnMoneyBalanceRequest;
  715. event UpdateAvatarProperties OnUpdateAvatarProperties;
  716. event ParcelBuy OnParcelBuy;
  717. event RequestPayPrice OnRequestPayPrice;
  718. event ObjectSaleInfo OnObjectSaleInfo;
  719. event ObjectBuy OnObjectBuy;
  720. event BuyObjectInventory OnBuyObjectInventory;
  721. event RequestTerrain OnRequestTerrain;
  722. event RequestTerrain OnUploadTerrain;
  723. event ObjectIncludeInSearch OnObjectIncludeInSearch;
  724. event UUIDNameRequest OnTeleportHomeRequest;
  725. event ScriptAnswer OnScriptAnswer;
  726. event AgentSit OnUndo;
  727. event ForceReleaseControls OnForceReleaseControls;
  728. event GodLandStatRequest OnLandStatRequest;
  729. event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  730. event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  731. event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  732. event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  733. event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  734. event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  735. event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  736. event EstateRestartSimRequest OnEstateRestartSimRequest;
  737. event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  738. event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  739. event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  740. event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  741. event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  742. event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  743. event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
  744. event UUIDNameRequest OnUUIDGroupNameRequest;
  745. event RegionHandleRequest OnRegionHandleRequest;
  746. event ParcelInfoRequest OnParcelInfoRequest;
  747. event RequestObjectPropertiesFamily OnObjectGroupRequest;
  748. event ScriptReset OnScriptReset;
  749. event GetScriptRunning OnGetScriptRunning;
  750. event SetScriptRunning OnSetScriptRunning;
  751. event UpdateVector OnAutoPilotGo;
  752. event TerrainUnacked OnUnackedTerrain;
  753. event ActivateGesture OnActivateGesture;
  754. event DeactivateGesture OnDeactivateGesture;
  755. event ObjectOwner OnObjectOwner;
  756. event DirPlacesQuery OnDirPlacesQuery;
  757. event DirFindQuery OnDirFindQuery;
  758. event DirLandQuery OnDirLandQuery;
  759. event DirPopularQuery OnDirPopularQuery;
  760. event DirClassifiedQuery OnDirClassifiedQuery;
  761. event EventInfoRequest OnEventInfoRequest;
  762. event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
  763. event MapItemRequest OnMapItemRequest;
  764. event OfferCallingCard OnOfferCallingCard;
  765. event AcceptCallingCard OnAcceptCallingCard;
  766. event DeclineCallingCard OnDeclineCallingCard;
  767. event SoundTrigger OnSoundTrigger;
  768. event StartLure OnStartLure;
  769. event TeleportLureRequest OnTeleportLureRequest;
  770. event NetworkStats OnNetworkStatsUpdate;
  771. event ClassifiedInfoRequest OnClassifiedInfoRequest;
  772. event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
  773. event ClassifiedDelete OnClassifiedDelete;
  774. event ClassifiedDelete OnClassifiedGodDelete;
  775. event EventNotificationAddRequest OnEventNotificationAddRequest;
  776. event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
  777. event EventGodDelete OnEventGodDelete;
  778. event ParcelDwellRequest OnParcelDwellRequest;
  779. event UserInfoRequest OnUserInfoRequest;
  780. event UpdateUserInfo OnUpdateUserInfo;
  781. event RetrieveInstantMessages OnRetrieveInstantMessages;
  782. event PickDelete OnPickDelete;
  783. event PickGodDelete OnPickGodDelete;
  784. event PickInfoUpdate OnPickInfoUpdate;
  785. event AvatarNotesUpdate OnAvatarNotesUpdate;
  786. event AvatarInterestUpdate OnAvatarInterestUpdate;
  787. event GrantUserFriendRights OnGrantUserRights;
  788. event MuteListRequest OnMuteListRequest;
  789. event PlacesQuery OnPlacesQuery;
  790. /// <summary>
  791. /// Set the debug level at which packet output should be printed to console.
  792. /// </summary>
  793. void SetDebugPacketLevel(int newDebug);
  794. void InPacket(object NewPack);
  795. void ProcessInPacket(Packet NewPack);
  796. void Close();
  797. void Kick(string message);
  798. /// <summary>
  799. /// Start processing for this client.
  800. /// </summary>
  801. void Start();
  802. void Stop();
  803. // void ActivateGesture(UUID assetId, UUID gestureId);
  804. /// <summary>
  805. /// Tell this client what items it should be wearing now
  806. /// </summary>
  807. void SendWearables(AvatarWearable[] wearables, int serial);
  808. /// <summary>
  809. /// Send information about the given agent's appearance to another client.
  810. /// </summary>
  811. /// <param name="agentID">The id of the agent associated with the appearance</param>
  812. /// <param name="visualParams"></param>
  813. /// <param name="textureEntry"></param>
  814. void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
  815. void SendStartPingCheck(byte seq);
  816. /// <summary>
  817. /// Tell the client that an object has been deleted
  818. /// </summary>
  819. /// <param name="regionHandle"></param>
  820. /// <param name="localID"></param>
  821. void SendKillObject(ulong regionHandle, uint localID);
  822. void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
  823. void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
  824. void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source,
  825. byte audible);
  826. void SendInstantMessage(GridInstantMessage im);
  827. void SendGenericMessage(string method, List<string> message);
  828. void SendLayerData(float[] map);
  829. void SendLayerData(int px, int py, float[] map);
  830. void SendWindData(Vector2[] windSpeeds);
  831. void SendCloudData(float[] cloudCover);
  832. void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
  833. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  834. /// <summary>
  835. /// Return circuit information for this client.
  836. /// </summary>
  837. /// <returns></returns>
  838. AgentCircuitData RequestClientInfo();
  839. void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  840. string capsURL);
  841. void SendMapBlock(List<MapBlockData> mapBlocks, uint flag);
  842. void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags);
  843. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  844. uint flags, string capsURL);
  845. void SendTeleportFailed(string reason);
  846. void SendTeleportLocationStart();
  847. void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
  848. void SendPayPrice(UUID objectID, int[] payPrice);
  849. void SendAvatarData(SendAvatarData data);
  850. void SendAvatarTerseUpdate(SendAvatarTerseData data);
  851. void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
  852. void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
  853. void SetChildAgentThrottle(byte[] throttle);
  854. void SendPrimitiveToClient(SendPrimitiveData data);
  855. void SendPrimTerseUpdate(SendPrimitiveTerseData data);
  856. void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler);
  857. void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
  858. List<InventoryFolderBase> folders, int version, bool fetchFolders,
  859. bool fetchItems);
  860. void FlushPrimUpdates();
  861. void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item);
  862. /// <summary>
  863. /// Tell the client that we have created the item it requested.
  864. /// </summary>
  865. /// <param name="Item"></param>
  866. void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId);
  867. void SendRemoveInventoryItem(UUID itemID);
  868. void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
  869. void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
  870. /// <summary>
  871. /// Used by the server to inform the client of new inventory items and folders.
  872. /// </summary>
  873. ///
  874. /// If the node is a folder then the contents will be transferred
  875. /// (including all descendent folders) as well as the folder itself.
  876. ///
  877. /// <param name="node"></param>
  878. void SendBulkUpdateInventory(InventoryNodeBase node);
  879. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  880. void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
  881. int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
  882. float PriceObjectScaleFactor,
  883. int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent,
  884. int PricePublicObjectDecay,
  885. int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice,
  886. float TeleportPriceExponent);
  887. void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
  888. void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers,
  889. string groupname, string grouptitle);
  890. void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID);
  891. void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags);
  892. void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position,
  893. float gain);
  894. void SendAttachedSoundGainChange(UUID objectID, float gain);
  895. void SendNameReply(UUID profileId, string firstname, string lastname);
  896. void SendAlertMessage(string message);
  897. void SendAgentAlertMessage(string message, bool modal);
  898. void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
  899. void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
  900. string[] buttonlabels);
  901. bool AddMoney(int debit);
  902. /// <summary>
  903. /// Update the client as to where the sun is currently located.
  904. /// </summary>
  905. /// <param name="sunPos"></param>
  906. /// <param name="sunVel"></param>
  907. /// <param name="CurrentTime">Seconds since Unix Epoch 01/01/1970 00:00:00</param>
  908. /// <param name="SecondsPerSunCycle"></param>
  909. /// <param name="SecondsPerYear"></param>
  910. /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param>
  911. void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear,
  912. float OrbitalPosition);
  913. void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
  914. void SendViewerTime(int phase);
  915. UUID GetDefaultAnimation(string name);
  916. void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout,
  917. uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
  918. void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
  919. void SendHealth(float health);
  920. void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID);
  921. void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID);
  922. void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
  923. void SendEstateCovenantInformation(UUID covenant);
  924. void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags,
  925. uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner);
  926. void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData,
  927. float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity,
  928. uint regionFlags);
  929. void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID);
  930. void SendForceClientSelectObjects(List<uint> objectIDs);
  931. void SendCameraConstraint(Vector4 ConstraintPlane);
  932. void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount);
  933. void SendLandParcelOverlay(byte[] data, int sequence_id);
  934. #region Parcel Methods
  935. void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time);
  936. void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
  937. byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
  938. byte mediaLoop);
  939. #endregion
  940. void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID);
  941. void SendConfirmXfer(ulong xferID, uint PacketID);
  942. void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName);
  943. void SendInitiateDownload(string simFileName, string clientFileName);
  944. /// <summary>
  945. /// Send the first part of a texture. For sufficiently small textures, this may be the only packet.
  946. /// </summary>
  947. /// <param name="numParts"></param>
  948. /// <param name="ImageUUID"></param>
  949. /// <param name="ImageSize"></param>
  950. /// <param name="ImageData"></param>
  951. /// <param name="imageCodec"></param>
  952. void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
  953. /// <summary>
  954. /// Send the next packet for a series of packets making up a single texture,
  955. /// as established by SendImageFirstPart()
  956. /// </summary>
  957. /// <param name="partNumber"></param>
  958. /// <param name="imageUuid"></param>
  959. /// <param name="imageData"></param>
  960. void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData);
  961. /// <summary>
  962. /// Tell the client that the requested texture cannot be found
  963. /// </summary>
  964. void SendImageNotFound(UUID imageid);
  965. void SendShutdownConnectionNotice();
  966. /// <summary>
  967. /// Send statistical information about the sim to the client.
  968. /// </summary>
  969. /// <param name="stats"></param>
  970. void SendSimStats(SimStats stats);
  971. void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
  972. uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
  973. uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice,
  974. uint Category,
  975. UUID LastOwnerID, string ObjectName, string Description);
  976. void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID,
  977. UUID FromTaskUUID,
  978. UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
  979. UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle,
  980. string ItemName,
  981. string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask,
  982. uint EveryoneMask,
  983. uint BaseMask, byte saleType, int salePrice);
  984. void SendAgentOffline(UUID[] agentIDs);
  985. void SendAgentOnline(UUID[] agentIDs);
  986. void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
  987. Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook);
  988. void SendAdminResponse(UUID Token, uint AdminLevel);
  989. void SendGroupMembership(GroupMembershipData[] GroupMembership);
  990. void SendGroupNameReply(UUID groupLLUID, string GroupName);
  991. void SendJoinGroupReply(UUID groupID, bool success);
  992. void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success);
  993. void SendLeaveGroupReply(UUID groupID, bool success);
  994. void SendCreateGroupReply(UUID groupID, bool success, string message);
  995. void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
  996. void SendScriptRunningReply(UUID objectID, UUID itemID, bool running);
  997. void SendAsset(AssetRequestToClient req);
  998. void SendTexture(AssetBase TextureAsset);
  999. byte[] GetThrottlesPacked(float multiplier);
  1000. event ViewerEffectEventHandler OnViewerEffect;
  1001. event Action<IClientAPI> OnLogout;
  1002. event Action<IClientAPI> OnConnectionClosed;
  1003. void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message);
  1004. void SendLogoutPacket();
  1005. EndPoint GetClientEP();
  1006. // WARNING WARNING WARNING
  1007. //
  1008. // The two following methods are EXCLUSIVELY for the load balancer.
  1009. // they cause a MASSIVE performance hit!
  1010. //
  1011. ClientInfo GetClientInfo();
  1012. void SetClientInfo(ClientInfo info);
  1013. void SetClientOption(string option, string value);
  1014. string GetClientOption(string option);
  1015. void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters);
  1016. void SendClearFollowCamProperties(UUID objectID);
  1017. void SendRegionHandle(UUID regoinID, ulong handle);
  1018. void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
  1019. void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
  1020. void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data);
  1021. void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data);
  1022. void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data);
  1023. void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data);
  1024. void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data);
  1025. void SendDirLandReply(UUID queryID, DirLandReplyData[] data);
  1026. void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data);
  1027. void SendEventInfoReply(EventData info);
  1028. void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags);
  1029. void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data);
  1030. void SendOfferCallingCard(UUID srcID, UUID transactionID);
  1031. void SendAcceptCallingCard(UUID transactionID);
  1032. void SendDeclineCallingCard(UUID transactionID);
  1033. void SendTerminateFriend(UUID exFriendID);
  1034. void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name);
  1035. 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);
  1036. void SendAgentDropGroup(UUID groupID);
  1037. void RefreshGroupMembership();
  1038. void SendAvatarNotesReply(UUID targetID, string text);
  1039. void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks);
  1040. 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);
  1041. void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds);
  1042. void SendParcelDwellReply(int localID, UUID parcelID, float dwell);
  1043. void SendUserInfoReply(bool imViaEmail, bool visible, string email);
  1044. void SendUseCachedMuteList();
  1045. void SendMuteListUpdate(string filename);
  1046. void KillEndDone();
  1047. bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
  1048. void SendRebakeAvatarTextures(UUID textureID);
  1049. }
  1050. }