IClientAPI.cs 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450
  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(IClientAPI 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 ISceneEntity RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
  45. public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, List<KeyValuePair<UUID, uint>> rezlist );
  46. public delegate void ObjectAttach(
  47. IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
  48. public delegate void ModifyTerrain(UUID user,
  49. float height, float seconds, byte size, byte action, float north, float west, float south, float east,
  50. UUID agentId);
  51. public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
  52. public delegate void SetAppearance(IClientAPI remoteClient, Primitive.TextureEntry textureEntry, byte[] visualParams);
  53. public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
  54. public delegate void StopAnim(IClientAPI remoteClient, UUID animID);
  55. public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
  56. public delegate void DelinkObjects(List<uint> primIds, IClientAPI client);
  57. public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
  58. public delegate void RequestMapName(IClientAPI remoteClient, string mapName, uint flags);
  59. public delegate void TeleportLocationRequest(
  60. IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
  61. public delegate void TeleportLandmarkRequest(
  62. IClientAPI remoteClient, AssetLandmark lm);
  63. public delegate void TeleportCancel(IClientAPI remoteClient);
  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 GenericCall1(IClientAPI remoteClient);
  69. public delegate void GenericCall2();
  70. // really don't want to be passing packets in these events, so this is very temporary.
  71. public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
  72. public delegate void DeRezObject(
  73. IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID);
  74. public delegate void GenericCall5(IClientAPI remoteClient, bool status);
  75. public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
  76. public delegate void UpdateShape(UUID agentID, uint localID, UpdateShapeArgs shapeBlock);
  77. public delegate void ObjectExtraParams(UUID agentID, uint localID, ushort type, bool inUse, byte[] data);
  78. public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
  79. public delegate void ObjectRequest(uint localID, IClientAPI remoteClient);
  80. public delegate void RequestObjectPropertiesFamily(
  81. IClientAPI remoteClient, UUID AgentID, uint RequestFlags, UUID TaskID);
  82. public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
  83. public delegate void ObjectDrop(uint localID, IClientAPI remoteClient);
  84. public delegate void UpdatePrimFlags(
  85. uint localID, bool UsePhysics, bool IsTemporary, bool IsPhantom, IClientAPI remoteClient);
  86. public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
  87. public delegate void UpdateVector(uint localID, Vector3 pos, IClientAPI remoteClient);
  88. public delegate void UpdatePrimRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
  89. public delegate void UpdatePrimSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
  90. public delegate void UpdatePrimSingleRotationPosition(uint localID, Quaternion rot, Vector3 pos, IClientAPI remoteClient);
  91. public delegate void UpdatePrimGroupRotation(uint localID, Vector3 pos, Quaternion rot, IClientAPI remoteClient);
  92. public delegate void ObjectDuplicate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID);
  93. public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
  94. UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
  95. bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters,
  96. bool CopyRotates);
  97. public delegate void StatusChange(bool status);
  98. public delegate void NewAvatar(IClientAPI remoteClient, UUID agentID, bool status);
  99. public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData);
  100. public delegate void AgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset);
  101. public delegate void AgentSit(IClientAPI remoteClient, UUID agentID);
  102. public delegate void LandUndo(IClientAPI remoteClient);
  103. public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery);
  104. public delegate void GrabObject(
  105. uint localID, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  106. public delegate void DeGrabObject(
  107. uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  108. public delegate void MoveObject(
  109. UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
  110. public delegate void SpinStart(UUID objectID, IClientAPI remoteClient);
  111. public delegate void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient);
  112. public delegate void SpinStop(UUID objectID, IClientAPI remoteClient);
  113. public delegate void ParcelAccessListRequest(
  114. UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
  115. public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags,
  116. int landLocalID, UUID transactionID, int sequenceID,
  117. int sections, List<LandAccessEntry> entries,
  118. IClientAPI remote_client);
  119. public delegate void ParcelPropertiesRequest(
  120. int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
  121. public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
  122. public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
  123. public delegate void ParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client);
  124. public delegate void ParcelSelectObjects(int land_local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
  125. public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
  126. public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
  127. public delegate void ParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client);
  128. public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
  129. public delegate void ParcelReturnObjectsRequest(
  130. int local_id, uint return_type, UUID[] agent_ids, UUID[] selected_ids, IClientAPI remote_client);
  131. public delegate void ParcelDeedToGroup(int local_id, UUID group_id, IClientAPI remote_client);
  132. public delegate void EstateOwnerMessageRequest(
  133. UUID AgentID, UUID SessionID, UUID TransactionID, UUID Invoice, byte[] Method, byte[][] Parameters,
  134. IClientAPI remote_client);
  135. public delegate void RegionInfoRequest(IClientAPI remote_client);
  136. public delegate void EstateCovenantRequest(IClientAPI remote_client);
  137. public delegate void UUIDNameRequest(UUID id, IClientAPI remote_client);
  138. public delegate void AddNewPrim(
  139. UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart,
  140. UUID RayTargetID,
  141. byte RayEndIsIntersection);
  142. public delegate void RequestGodlikePowers(
  143. UUID AgentID, UUID SessionID, UUID token, bool GodLike, IClientAPI remote_client);
  144. public delegate void GodKickUser(
  145. UUID GodAgentID, UUID GodSessionID, UUID AgentID, uint kickflags, byte[] reason);
  146. public delegate void CreateInventoryFolder(
  147. IClientAPI remoteClient, UUID folderID, ushort folderType, string folderName, UUID parentID);
  148. public delegate void UpdateInventoryFolder(
  149. IClientAPI remoteClient, UUID folderID, ushort type, string name, UUID parentID);
  150. public delegate void MoveInventoryFolder(
  151. IClientAPI remoteClient, UUID folderID, UUID parentID);
  152. public delegate void CreateNewInventoryItem(
  153. IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name,
  154. sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate);
  155. public delegate void LinkInventoryItem(
  156. IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name,
  157. sbyte invType, sbyte type, UUID olditemID);
  158. public delegate void FetchInventoryDescendents(
  159. IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
  160. public delegate void PurgeInventoryDescendents(
  161. IClientAPI remoteClient, UUID folderID);
  162. public delegate void FetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID);
  163. public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
  164. /* public delegate void UpdateInventoryItem(
  165. IClientAPI remoteClient, UUID transactionID, UUID itemID, string name, string description,
  166. uint nextOwnerMask);*/
  167. public delegate void UpdateInventoryItem(
  168. IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd);
  169. public delegate void CopyInventoryItem(
  170. IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID, UUID newFolderID,
  171. string newName);
  172. public delegate void MoveInventoryItem(
  173. IClientAPI remoteClient, List<InventoryItemBase> items);
  174. public delegate void RemoveInventoryItem(
  175. IClientAPI remoteClient, List<UUID> itemIDs);
  176. public delegate void RemoveInventoryFolder(
  177. IClientAPI remoteClient, List<UUID> folderIDs);
  178. public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest);
  179. public delegate void AbortXfer(IClientAPI remoteClient, ulong xferID);
  180. public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, UUID transactionID, uint localID);
  181. public delegate void UpdateTaskInventory(
  182. IClientAPI remoteClient, UUID transactionID, TaskInventoryItem item, uint localID);
  183. public delegate void MoveTaskInventory(IClientAPI remoteClient, UUID folderID, uint localID, UUID itemID);
  184. public delegate void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID);
  185. public delegate void UDPAssetUploadRequest(
  186. IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal,
  187. bool tempFile);
  188. public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
  189. public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
  190. public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
  191. public delegate void FriendActionDelegate(
  192. IClientAPI remoteClient, UUID transactionID, List<UUID> callingCardFolders);
  193. public delegate void FriendshipTermination(IClientAPI remoteClient, UUID ExID);
  194. public delegate void MoneyTransferRequest(
  195. UUID sourceID, UUID destID, int amount, int transactionType, string description);
  196. public delegate void ParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
  197. bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice,
  198. bool authenticated);
  199. // We keep all this information for fraud purposes in the future.
  200. public delegate void MoneyBalanceRequest(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID TransactionID);
  201. public delegate void ObjectPermissions(
  202. IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set);
  203. public delegate void EconomyDataRequest(UUID agentID);
  204. public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
  205. public delegate void ScriptAnswer(IClientAPI remoteClient, UUID objectID, UUID itemID, int answer);
  206. public delegate void RequestPayPrice(IClientAPI remoteClient, UUID objectID);
  207. public delegate void ObjectSaleInfo(
  208. IClientAPI remoteClient, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice);
  209. public delegate void ObjectBuy(
  210. IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID groupID, UUID categoryID, uint localID,
  211. byte saleType, int salePrice);
  212. public delegate void BuyObjectInventory(
  213. IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID objectID, UUID itemID, UUID folderID);
  214. public delegate void ForceReleaseControls(IClientAPI remoteClient, UUID agentID);
  215. public delegate void GodLandStatRequest(
  216. int parcelID, uint reportType, uint requestflags, string filter, IClientAPI remoteClient);
  217. //Estate Requests
  218. public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, UUID invoice);
  219. public delegate void SetEstateFlagsRequest(
  220. bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
  221. int matureLevel, bool restrictPushObject, bool allowParcelChanges);
  222. public delegate void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID side);
  223. public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, UUID side);
  224. public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal
  225. );
  226. public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient);
  227. public delegate void SetRegionTerrainSettings(
  228. float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool estateSun, bool fixedSun,
  229. float sunHour, bool globalSun, bool estateFixed, float estateSunHour);
  230. public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
  231. public delegate void EstateManageTelehub(IClientAPI client, UUID invoice, UUID senderID, string cmd, UInt32 param1);
  232. public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName);
  233. public delegate void BakeTerrain(IClientAPI remoteClient);
  234. public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot);
  235. public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, UUID newCovenantID);
  236. public delegate void UpdateEstateAccessDeltaRequest(
  237. IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user);
  238. public delegate void SimulatorBlueBoxMessageRequest(
  239. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
  240. public delegate void EstateBlueBoxMessageRequest(
  241. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
  242. public delegate void EstateDebugRegionRequest(
  243. IClientAPI remoteClient, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics);
  244. public delegate void EstateTeleportOneUserHomeRequest(
  245. IClientAPI remoteClient, UUID invoice, UUID senderID, UUID prey);
  246. public delegate void EstateTeleportAllUsersHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID);
  247. public delegate void RegionHandleRequest(IClientAPI remoteClient, UUID regionID);
  248. public delegate void ParcelInfoRequest(IClientAPI remoteClient, UUID parcelID);
  249. public delegate void ScriptReset(IClientAPI remoteClient, UUID objectID, UUID itemID);
  250. public delegate void GetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID);
  251. public delegate void SetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID, bool running);
  252. public delegate void ActivateGesture(IClientAPI client, UUID gestureid, UUID assetId);
  253. public delegate void DeactivateGesture(IClientAPI client, UUID gestureid);
  254. public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY);
  255. public delegate void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs);
  256. public delegate void DirPlacesQuery(
  257. IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName,
  258. int queryStart);
  259. public delegate void DirFindQuery(
  260. IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart);
  261. public delegate void DirLandQuery(
  262. IClientAPI remoteClient, UUID queryID, uint queryFlags, uint searchType, int price, int area, int queryStart);
  263. public delegate void DirPopularQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags);
  264. public delegate void DirClassifiedQuery(
  265. IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, uint category, int queryStart);
  266. public delegate void EventInfoRequest(IClientAPI remoteClient, uint eventID);
  267. public delegate void ParcelSetOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime);
  268. public delegate void MapItemRequest(
  269. IClientAPI remoteClient, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle);
  270. public delegate void OfferCallingCard(IClientAPI remoteClient, UUID destID, UUID transactionID);
  271. public delegate void AcceptCallingCard(IClientAPI remoteClient, UUID transactionID, UUID folderID);
  272. public delegate void DeclineCallingCard(IClientAPI remoteClient, UUID transactionID);
  273. public delegate void SoundTrigger(
  274. UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle, float radius);
  275. public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client);
  276. public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client);
  277. public delegate void ClassifiedInfoRequest(UUID classifiedID, IClientAPI client);
  278. 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);
  279. public delegate void ClassifiedDelete(UUID classifiedID, IClientAPI client);
  280. public delegate void EventNotificationAddRequest(uint EventID, IClientAPI client);
  281. public delegate void EventNotificationRemoveRequest(uint EventID, IClientAPI client);
  282. public delegate void EventGodDelete(uint eventID, UUID queryID, string queryText, uint queryFlags, int queryStart, IClientAPI client);
  283. public delegate void ParcelDwellRequest(int localID, IClientAPI client);
  284. public delegate void UserInfoRequest(IClientAPI client);
  285. public delegate void UpdateUserInfo(bool imViaEmail, bool visible, IClientAPI client);
  286. public delegate void RetrieveInstantMessages(IClientAPI client);
  287. public delegate void PickDelete(IClientAPI client, UUID pickID);
  288. public delegate void PickGodDelete(IClientAPI client, UUID agentID, UUID pickID, UUID queryID);
  289. public delegate void PickInfoUpdate(IClientAPI client, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled);
  290. public delegate void AvatarNotesUpdate(IClientAPI client, UUID targetID, string notes);
  291. public delegate void MuteListRequest(IClientAPI client, uint muteCRC);
  292. public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
  293. public delegate void GrantUserFriendRights(IClientAPI client, UUID target, int rights);
  294. public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
  295. public delegate void AgentFOV(IClientAPI client, float verticalAngle);
  296. public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int Flags,UUID AgentID);
  297. public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID);
  298. public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
  299. public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target);
  300. public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target);
  301. public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
  302. public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
  303. public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string Summary, UUID reporter);
  304. public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY);
  305. public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter);
  306. public delegate void SaveStateHandler(IClientAPI client,UUID agentID);
  307. public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID);
  308. public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
  309. public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
  310. public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID);
  311. public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID);
  312. public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
  313. public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
  314. public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
  315. public delegate void SendPostcard(IClientAPI client);
  316. #endregion
  317. public struct DirPlacesReplyData
  318. {
  319. public UUID parcelID;
  320. public string name;
  321. public bool forSale;
  322. public bool auction;
  323. public float dwell;
  324. public uint Status;
  325. }
  326. public struct DirPeopleReplyData
  327. {
  328. public UUID agentID;
  329. public string firstName;
  330. public string lastName;
  331. public string group;
  332. public bool online;
  333. public int reputation;
  334. }
  335. public struct DirEventsReplyData
  336. {
  337. public UUID ownerID;
  338. public string name;
  339. public uint eventID;
  340. public string date;
  341. public uint unixTime;
  342. public uint eventFlags;
  343. public uint Status;
  344. }
  345. public struct DirGroupsReplyData
  346. {
  347. public UUID groupID;
  348. public string groupName;
  349. public int members;
  350. public float searchOrder;
  351. }
  352. public struct DirClassifiedReplyData
  353. {
  354. public UUID classifiedID;
  355. public string name;
  356. public byte classifiedFlags;
  357. public uint creationDate;
  358. public uint expirationDate;
  359. public int price;
  360. public uint Status;
  361. }
  362. public struct DirLandReplyData
  363. {
  364. public UUID parcelID;
  365. public string name;
  366. public bool auction;
  367. public bool forSale;
  368. public int salePrice;
  369. public int actualArea;
  370. }
  371. public struct DirPopularReplyData
  372. {
  373. public UUID parcelID;
  374. public string name;
  375. public float dwell;
  376. }
  377. public class IEntityUpdate
  378. {
  379. private ISceneEntity m_entity;
  380. private uint m_flags;
  381. private int m_updateTime;
  382. public ISceneEntity Entity
  383. {
  384. get { return m_entity; }
  385. }
  386. public uint Flags
  387. {
  388. get { return m_flags; }
  389. }
  390. public int UpdateTime
  391. {
  392. get { return m_updateTime; }
  393. }
  394. public virtual void Update(IEntityUpdate update)
  395. {
  396. m_flags |= update.Flags;
  397. // Use the older of the updates as the updateTime
  398. if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0)
  399. m_updateTime = update.UpdateTime;
  400. }
  401. public IEntityUpdate(ISceneEntity entity, uint flags)
  402. {
  403. m_entity = entity;
  404. m_flags = flags;
  405. m_updateTime = Util.EnvironmentTickCount();
  406. }
  407. public IEntityUpdate(ISceneEntity entity, uint flags, Int32 updateTime)
  408. {
  409. m_entity = entity;
  410. m_flags = flags;
  411. m_updateTime = updateTime;
  412. }
  413. }
  414. public class EntityUpdate : IEntityUpdate
  415. {
  416. private float m_timeDilation;
  417. public float TimeDilation
  418. {
  419. get { return m_timeDilation; }
  420. }
  421. public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation)
  422. : base(entity, (uint)flags)
  423. {
  424. // Flags = flags;
  425. m_timeDilation = timedilation;
  426. }
  427. public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime)
  428. : base(entity,(uint)flags,updateTime)
  429. {
  430. m_timeDilation = timedilation;
  431. }
  432. }
  433. public class PlacesReplyData
  434. {
  435. public UUID OwnerID;
  436. public string Name;
  437. public string Desc;
  438. public int ActualArea;
  439. public int BillableArea;
  440. public byte Flags;
  441. public uint GlobalX;
  442. public uint GlobalY;
  443. public uint GlobalZ;
  444. public string SimName;
  445. public UUID SnapshotID;
  446. public uint Dwell;
  447. public int Price;
  448. }
  449. /// <summary>
  450. /// Specifies the fields that have been changed when sending a prim or
  451. /// avatar update
  452. /// </summary>
  453. [Flags]
  454. public enum PrimUpdateFlags : uint
  455. {
  456. None = 0,
  457. AttachmentPoint = 1 << 0,
  458. Material = 1 << 1,
  459. ClickAction = 1 << 2,
  460. Scale = 1 << 3,
  461. ParentID = 1 << 4,
  462. PrimFlags = 1 << 5,
  463. PrimData = 1 << 6,
  464. MediaURL = 1 << 7,
  465. ScratchPad = 1 << 8,
  466. Textures = 1 << 9,
  467. TextureAnim = 1 << 10,
  468. NameValue = 1 << 11,
  469. Position = 1 << 12,
  470. Rotation = 1 << 13,
  471. Velocity = 1 << 14,
  472. Acceleration = 1 << 15,
  473. AngularVelocity = 1 << 16,
  474. CollisionPlane = 1 << 17,
  475. Text = 1 << 18,
  476. Particles = 1 << 19,
  477. ExtraData = 1 << 20,
  478. Sound = 1 << 21,
  479. Joint = 1 << 22,
  480. FullUpdate = UInt32.MaxValue
  481. }
  482. public static class PrimUpdateFlagsExtensions
  483. {
  484. public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag)
  485. {
  486. return (updateFlags & flag) == flag;
  487. }
  488. }
  489. public interface IClientAPI
  490. {
  491. Vector3 StartPos { get; set; }
  492. UUID AgentId { get; }
  493. /// <summary>
  494. /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
  495. /// is connected).
  496. /// </summary>
  497. ISceneAgent SceneAgent { get; set; }
  498. UUID SessionId { get; }
  499. UUID SecureSessionId { get; }
  500. UUID ActiveGroupId { get; }
  501. string ActiveGroupName { get; }
  502. ulong ActiveGroupPowers { get; }
  503. ulong GetGroupPowers(UUID groupID);
  504. bool IsGroupMember(UUID GroupID);
  505. string FirstName { get; }
  506. string LastName { get; }
  507. IScene Scene { get; }
  508. // [Obsolete("LLClientView Specific - Replace with ???")]
  509. int NextAnimationSequenceNumber { get; }
  510. /// <summary>
  511. /// Returns the full name of the agent/avatar represented by this client
  512. /// </summary>
  513. string Name { get; }
  514. /// <summary>
  515. /// True if the client is active (sending and receiving new UDP messages). False if the client is being closed.
  516. /// </summary>
  517. bool IsActive { get; set; }
  518. /// <summary>
  519. /// Set if the client is closing due to a logout request
  520. /// </summary>
  521. /// <remarks>
  522. /// Do not use this flag if you want to know if the client is closing, since it will not be set in other
  523. /// circumstances (e.g. if a child agent is closed or the agent is kicked off the simulator). Use IsActive
  524. /// instead with a IClientAPI.SceneAgent.IsChildAgent check if necessary.
  525. ///
  526. /// Only set for root agents.
  527. /// </remarks>
  528. bool IsLoggingOut { get; set; }
  529. bool SendLogoutPacketWhenClosing { set; }
  530. // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
  531. uint CircuitCode { get; }
  532. IPEndPoint RemoteEndPoint { get; }
  533. event GenericMessage OnGenericMessage;
  534. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  535. event ImprovedInstantMessage OnInstantMessage;
  536. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
  537. event ChatMessage OnChatFromClient;
  538. // [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
  539. event TextureRequest OnRequestTexture;
  540. // [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
  541. event RezObject OnRezObject;
  542. // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
  543. event ModifyTerrain OnModifyTerrain;
  544. event BakeTerrain OnBakeTerrain;
  545. event EstateChangeInfo OnEstateChangeInfo;
  546. event EstateManageTelehub OnEstateManageTelehub;
  547. // [Obsolete("LLClientView Specific.")]
  548. event SetAppearance OnSetAppearance;
  549. // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
  550. event AvatarNowWearing OnAvatarNowWearing;
  551. event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  552. event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
  553. event UUIDNameRequest OnDetachAttachmentIntoInv;
  554. event ObjectAttach OnObjectAttach;
  555. event ObjectDeselect OnObjectDetach;
  556. event ObjectDrop OnObjectDrop;
  557. event StartAnim OnStartAnim;
  558. event StopAnim OnStopAnim;
  559. event LinkObjects OnLinkObjects;
  560. event DelinkObjects OnDelinkObjects;
  561. event RequestMapBlocks OnRequestMapBlocks;
  562. event RequestMapName OnMapNameRequest;
  563. event TeleportLocationRequest OnTeleportLocationRequest;
  564. event DisconnectUser OnDisconnectUser;
  565. event RequestAvatarProperties OnRequestAvatarProperties;
  566. event SetAlwaysRun OnSetAlwaysRun;
  567. event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  568. event TeleportCancel OnTeleportCancel;
  569. event DeRezObject OnDeRezObject;
  570. event Action<IClientAPI> OnRegionHandShakeReply;
  571. event GenericCall1 OnRequestWearables;
  572. event Action<IClientAPI, bool> OnCompleteMovementToRegion;
  573. event UpdateAgent OnPreAgentUpdate;
  574. event UpdateAgent OnAgentUpdate;
  575. event AgentRequestSit OnAgentRequestSit;
  576. event AgentSit OnAgentSit;
  577. event AvatarPickerRequest OnAvatarPickerRequest;
  578. event Action<IClientAPI> OnRequestAvatarsData;
  579. event AddNewPrim OnAddPrim;
  580. event FetchInventory OnAgentDataUpdateRequest;
  581. event TeleportLocationRequest OnSetStartLocationRequest;
  582. event RequestGodlikePowers OnRequestGodlikePowers;
  583. event GodKickUser OnGodKickUser;
  584. event ObjectDuplicate OnObjectDuplicate;
  585. event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  586. event GrabObject OnGrabObject;
  587. event DeGrabObject OnDeGrabObject;
  588. event MoveObject OnGrabUpdate;
  589. event SpinStart OnSpinStart;
  590. event SpinObject OnSpinUpdate;
  591. event SpinStop OnSpinStop;
  592. event UpdateShape OnUpdatePrimShape;
  593. event ObjectExtraParams OnUpdateExtraParams;
  594. event ObjectRequest OnObjectRequest;
  595. event ObjectSelect OnObjectSelect;
  596. event ObjectDeselect OnObjectDeselect;
  597. event GenericCall7 OnObjectDescription;
  598. event GenericCall7 OnObjectName;
  599. event GenericCall7 OnObjectClickAction;
  600. event GenericCall7 OnObjectMaterial;
  601. event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  602. event UpdatePrimFlags OnUpdatePrimFlags;
  603. event UpdatePrimTexture OnUpdatePrimTexture;
  604. event UpdateVector OnUpdatePrimGroupPosition;
  605. event UpdateVector OnUpdatePrimSinglePosition;
  606. event UpdatePrimRotation OnUpdatePrimGroupRotation;
  607. event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  608. event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
  609. event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  610. event UpdateVector OnUpdatePrimScale;
  611. event UpdateVector OnUpdatePrimGroupScale;
  612. event StatusChange OnChildAgentStatus;
  613. event GenericCall2 OnStopMovement;
  614. event Action<UUID> OnRemoveAvatar;
  615. event ObjectPermissions OnObjectPermissions;
  616. event CreateNewInventoryItem OnCreateNewInventoryItem;
  617. event LinkInventoryItem OnLinkInventoryItem;
  618. event CreateInventoryFolder OnCreateNewInventoryFolder;
  619. event UpdateInventoryFolder OnUpdateInventoryFolder;
  620. event MoveInventoryFolder OnMoveInventoryFolder;
  621. event FetchInventoryDescendents OnFetchInventoryDescendents;
  622. event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  623. event FetchInventory OnFetchInventory;
  624. event RequestTaskInventory OnRequestTaskInventory;
  625. event UpdateInventoryItem OnUpdateInventoryItem;
  626. event CopyInventoryItem OnCopyInventoryItem;
  627. event MoveInventoryItem OnMoveInventoryItem;
  628. event RemoveInventoryFolder OnRemoveInventoryFolder;
  629. event RemoveInventoryItem OnRemoveInventoryItem;
  630. event UDPAssetUploadRequest OnAssetUploadRequest;
  631. event XferReceive OnXferReceive;
  632. event RequestXfer OnRequestXfer;
  633. event ConfirmXfer OnConfirmXfer;
  634. event AbortXfer OnAbortXfer;
  635. event RezScript OnRezScript;
  636. event UpdateTaskInventory OnUpdateTaskInventory;
  637. event MoveTaskInventory OnMoveTaskItem;
  638. event RemoveTaskInventory OnRemoveTaskItem;
  639. event RequestAsset OnRequestAsset;
  640. event UUIDNameRequest OnNameFromUUIDRequest;
  641. event ParcelAccessListRequest OnParcelAccessListRequest;
  642. event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  643. event ParcelPropertiesRequest OnParcelPropertiesRequest;
  644. event ParcelDivideRequest OnParcelDivideRequest;
  645. event ParcelJoinRequest OnParcelJoinRequest;
  646. event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  647. event ParcelSelectObjects OnParcelSelectObjects;
  648. event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  649. event ParcelAbandonRequest OnParcelAbandonRequest;
  650. event ParcelGodForceOwner OnParcelGodForceOwner;
  651. event ParcelReclaim OnParcelReclaim;
  652. event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  653. event ParcelDeedToGroup OnParcelDeedToGroup;
  654. event RegionInfoRequest OnRegionInfoRequest;
  655. event EstateCovenantRequest OnEstateCovenantRequest;
  656. event FriendActionDelegate OnApproveFriendRequest;
  657. event FriendActionDelegate OnDenyFriendRequest;
  658. event FriendshipTermination OnTerminateFriendship;
  659. // Financial packets
  660. event MoneyTransferRequest OnMoneyTransferRequest;
  661. event EconomyDataRequest OnEconomyDataRequest;
  662. event MoneyBalanceRequest OnMoneyBalanceRequest;
  663. event UpdateAvatarProperties OnUpdateAvatarProperties;
  664. event ParcelBuy OnParcelBuy;
  665. event RequestPayPrice OnRequestPayPrice;
  666. event ObjectSaleInfo OnObjectSaleInfo;
  667. event ObjectBuy OnObjectBuy;
  668. event BuyObjectInventory OnBuyObjectInventory;
  669. event RequestTerrain OnRequestTerrain;
  670. event RequestTerrain OnUploadTerrain;
  671. event ObjectIncludeInSearch OnObjectIncludeInSearch;
  672. event UUIDNameRequest OnTeleportHomeRequest;
  673. event ScriptAnswer OnScriptAnswer;
  674. event AgentSit OnUndo;
  675. event AgentSit OnRedo;
  676. event LandUndo OnLandUndo;
  677. event ForceReleaseControls OnForceReleaseControls;
  678. event GodLandStatRequest OnLandStatRequest;
  679. event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  680. event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  681. event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  682. event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  683. event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  684. event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  685. event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  686. event EstateRestartSimRequest OnEstateRestartSimRequest;
  687. event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  688. event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  689. event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  690. event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  691. event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  692. event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  693. event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
  694. event UUIDNameRequest OnUUIDGroupNameRequest;
  695. event RegionHandleRequest OnRegionHandleRequest;
  696. event ParcelInfoRequest OnParcelInfoRequest;
  697. event RequestObjectPropertiesFamily OnObjectGroupRequest;
  698. event ScriptReset OnScriptReset;
  699. event GetScriptRunning OnGetScriptRunning;
  700. event SetScriptRunning OnSetScriptRunning;
  701. event Action<Vector3, bool, bool> OnAutoPilotGo;
  702. event TerrainUnacked OnUnackedTerrain;
  703. event ActivateGesture OnActivateGesture;
  704. event DeactivateGesture OnDeactivateGesture;
  705. event ObjectOwner OnObjectOwner;
  706. event DirPlacesQuery OnDirPlacesQuery;
  707. event DirFindQuery OnDirFindQuery;
  708. event DirLandQuery OnDirLandQuery;
  709. event DirPopularQuery OnDirPopularQuery;
  710. event DirClassifiedQuery OnDirClassifiedQuery;
  711. event EventInfoRequest OnEventInfoRequest;
  712. event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
  713. event MapItemRequest OnMapItemRequest;
  714. event OfferCallingCard OnOfferCallingCard;
  715. event AcceptCallingCard OnAcceptCallingCard;
  716. event DeclineCallingCard OnDeclineCallingCard;
  717. event SoundTrigger OnSoundTrigger;
  718. event StartLure OnStartLure;
  719. event TeleportLureRequest OnTeleportLureRequest;
  720. event NetworkStats OnNetworkStatsUpdate;
  721. event ClassifiedInfoRequest OnClassifiedInfoRequest;
  722. event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
  723. event ClassifiedDelete OnClassifiedDelete;
  724. event ClassifiedDelete OnClassifiedGodDelete;
  725. event EventNotificationAddRequest OnEventNotificationAddRequest;
  726. event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
  727. event EventGodDelete OnEventGodDelete;
  728. event ParcelDwellRequest OnParcelDwellRequest;
  729. event UserInfoRequest OnUserInfoRequest;
  730. event UpdateUserInfo OnUpdateUserInfo;
  731. event RetrieveInstantMessages OnRetrieveInstantMessages;
  732. event PickDelete OnPickDelete;
  733. event PickGodDelete OnPickGodDelete;
  734. event PickInfoUpdate OnPickInfoUpdate;
  735. event AvatarNotesUpdate OnAvatarNotesUpdate;
  736. event AvatarInterestUpdate OnAvatarInterestUpdate;
  737. event GrantUserFriendRights OnGrantUserRights;
  738. event MuteListRequest OnMuteListRequest;
  739. event PlacesQuery OnPlacesQuery;
  740. event FindAgentUpdate OnFindAgent;
  741. event TrackAgentUpdate OnTrackAgent;
  742. event NewUserReport OnUserReport;
  743. event SaveStateHandler OnSaveState;
  744. event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
  745. event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
  746. event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
  747. event FreezeUserUpdate OnParcelFreezeUser;
  748. event EjectUserUpdate OnParcelEjectUser;
  749. event ParcelBuyPass OnParcelBuyPass;
  750. event ParcelGodMark OnParcelGodMark;
  751. event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
  752. event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
  753. event SimWideDeletesDelegate OnSimWideDeletes;
  754. event SendPostcard OnSendPostcard;
  755. event MuteListEntryUpdate OnUpdateMuteListEntry;
  756. event MuteListEntryRemove OnRemoveMuteListEntry;
  757. event GodlikeMessage onGodlikeMessage;
  758. event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
  759. /// <summary>
  760. /// Set the debug level at which packet output should be printed to console.
  761. /// </summary>
  762. int DebugPacketLevel { get; set; }
  763. void InPacket(object NewPack);
  764. void ProcessInPacket(Packet NewPack);
  765. /// <summary>
  766. /// Close this client
  767. /// </summary>
  768. void Close();
  769. /// <summary>
  770. /// Close this client
  771. /// </summary>
  772. /// <param name='force'>
  773. /// If true, attempts the close without checking active status. You do not want to try this except as a last
  774. /// ditch attempt where Active == false but the ScenePresence still exists.
  775. /// </param>
  776. void Close(bool force);
  777. void Kick(string message);
  778. /// <summary>
  779. /// Start processing for this client.
  780. /// </summary>
  781. void Start();
  782. void Stop();
  783. // void ActivateGesture(UUID assetId, UUID gestureId);
  784. /// <summary>
  785. /// Tell this client what items it should be wearing now
  786. /// </summary>
  787. void SendWearables(AvatarWearable[] wearables, int serial);
  788. /// <summary>
  789. /// Send information about the given agent's appearance to another client.
  790. /// </summary>
  791. /// <param name="agentID">The id of the agent associated with the appearance</param>
  792. /// <param name="visualParams"></param>
  793. /// <param name="textureEntry"></param>
  794. void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
  795. void SendStartPingCheck(byte seq);
  796. /// <summary>
  797. /// Tell the client that an object has been deleted
  798. /// </summary>
  799. /// <param name="regionHandle"></param>
  800. /// <param name="localID"></param>
  801. void SendKillObject(ulong regionHandle, List<uint> localID);
  802. void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
  803. void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
  804. void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source,
  805. byte audible);
  806. void SendInstantMessage(GridInstantMessage im);
  807. void SendGenericMessage(string method, List<string> message);
  808. void SendGenericMessage(string method, List<byte[]> message);
  809. void SendLayerData(float[] map);
  810. void SendLayerData(int px, int py, float[] map);
  811. void SendWindData(Vector2[] windSpeeds);
  812. void SendCloudData(float[] cloudCover);
  813. /// <summary>
  814. /// Sent when an agent completes its movement into a region.
  815. /// </summary>
  816. /// <remarks>
  817. /// This packet marks completion of the arrival of a root avatar in a region, whether through login, region
  818. /// crossing or direct teleport.
  819. /// </remarks>
  820. void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
  821. void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
  822. /// <summary>
  823. /// Return circuit information for this client.
  824. /// </summary>
  825. /// <returns></returns>
  826. AgentCircuitData RequestClientInfo();
  827. void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint,
  828. string capsURL);
  829. void SendMapBlock(List<MapBlockData> mapBlocks, uint flag);
  830. void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags);
  831. void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
  832. uint flags, string capsURL);
  833. void SendTeleportFailed(string reason);
  834. void SendTeleportStart(uint flags);
  835. void SendTeleportProgress(uint flags, string message);
  836. void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
  837. void SendPayPrice(UUID objectID, int[] payPrice);
  838. void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
  839. void SetChildAgentThrottle(byte[] throttle);
  840. void SendAvatarDataImmediate(ISceneEntity avatar);
  841. /// <summary>
  842. /// Send a positional, velocity, etc. update to the viewer for a given entity.
  843. /// </summary>
  844. /// <param name="entity"></param>
  845. /// <param name="updateFlags"></param>
  846. void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags);
  847. void ReprioritizeUpdates();
  848. void FlushPrimUpdates();
  849. void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
  850. List<InventoryFolderBase> folders, int version, bool fetchFolders,
  851. bool fetchItems);
  852. void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item);
  853. /// <summary>
  854. /// Tell the client that we have created the item it requested.
  855. /// </summary>
  856. /// <param name="Item"></param>
  857. void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId);
  858. void SendRemoveInventoryItem(UUID itemID);
  859. void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
  860. void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
  861. void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint);
  862. /// <summary>
  863. /// Used by the server to inform the client of new inventory items and folders.
  864. /// </summary>
  865. ///
  866. /// If the node is a folder then the contents will be transferred
  867. /// (including all descendent folders) as well as the folder itself.
  868. ///
  869. /// <param name="node"></param>
  870. void SendBulkUpdateInventory(InventoryNodeBase node);
  871. void SendXferPacket(ulong xferID, uint packet, byte[] data);
  872. void SendAbortXferPacket(ulong xferID);
  873. void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
  874. int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
  875. float PriceObjectScaleFactor,
  876. int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent,
  877. int PricePublicObjectDecay,
  878. int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice,
  879. float TeleportPriceExponent);
  880. void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
  881. void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers,
  882. string groupname, string grouptitle);
  883. void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID);
  884. void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags);
  885. void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position,
  886. float gain);
  887. void SendAttachedSoundGainChange(UUID objectID, float gain);
  888. void SendNameReply(UUID profileId, string firstname, string lastname);
  889. void SendAlertMessage(string message);
  890. void SendAgentAlertMessage(string message, bool modal);
  891. void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
  892. /// <summary>
  893. /// Open a dialog box on the client.
  894. /// </summary>
  895. /// <param name="objectname"></param>
  896. /// <param name="objectID"></param>
  897. /// <param name="ownerID">/param>
  898. /// <param name="ownerFirstName"></param>
  899. /// <param name="ownerLastName"></param>
  900. /// <param name="msg"></param>
  901. /// <param name="textureID"></param>
  902. /// <param name="ch"></param>
  903. /// <param name="buttonlabels"></param>
  904. void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
  905. string[] buttonlabels);
  906. bool AddMoney(int debit);
  907. /// <summary>
  908. /// Update the client as to where the sun is currently located.
  909. /// </summary>
  910. /// <param name="sunPos"></param>
  911. /// <param name="sunVel"></param>
  912. /// <param name="CurrentTime">Seconds since Unix Epoch 01/01/1970 00:00:00</param>
  913. /// <param name="SecondsPerSunCycle"></param>
  914. /// <param name="SecondsPerYear"></param>
  915. /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param>
  916. void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear,
  917. float OrbitalPosition);
  918. void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
  919. void SendViewerTime(int phase);
  920. UUID GetDefaultAnimation(string name);
  921. void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout,
  922. uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
  923. void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
  924. void SendHealth(float health);
  925. void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID);
  926. void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID);
  927. void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
  928. void SendEstateCovenantInformation(UUID covenant);
  929. void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags,
  930. uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner);
  931. /// <summary>
  932. /// Send land properties to the client.
  933. /// </summary>
  934. /// <param name="sequence_id"></param>
  935. /// <param name="snap_selection"></param>
  936. /// <param name="request_result"></param>
  937. /// <param name="lo"></param></param>
  938. /// <param name="parcelObjectCapacity">/param>
  939. /// <param name="simObjectCapacity"></param>
  940. /// <param name="regionFlags"></param>
  941. void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo,
  942. float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity,
  943. uint regionFlags);
  944. void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID);
  945. void SendForceClientSelectObjects(List<uint> objectIDs);
  946. void SendCameraConstraint(Vector4 ConstraintPlane);
  947. void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount);
  948. void SendLandParcelOverlay(byte[] data, int sequence_id);
  949. #region Parcel Methods
  950. void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time);
  951. void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
  952. byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
  953. byte mediaLoop);
  954. #endregion
  955. void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID);
  956. void SendConfirmXfer(ulong xferID, uint PacketID);
  957. void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName);
  958. void SendInitiateDownload(string simFileName, string clientFileName);
  959. /// <summary>
  960. /// Send the first part of a texture. For sufficiently small textures, this may be the only packet.
  961. /// </summary>
  962. /// <param name="numParts"></param>
  963. /// <param name="ImageUUID"></param>
  964. /// <param name="ImageSize"></param>
  965. /// <param name="ImageData"></param>
  966. /// <param name="imageCodec"></param>
  967. void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
  968. /// <summary>
  969. /// Send the next packet for a series of packets making up a single texture,
  970. /// as established by SendImageFirstPart()
  971. /// </summary>
  972. /// <param name="partNumber"></param>
  973. /// <param name="imageUuid"></param>
  974. /// <param name="imageData"></param>
  975. void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData);
  976. /// <summary>
  977. /// Tell the client that the requested texture cannot be found
  978. /// </summary>
  979. void SendImageNotFound(UUID imageid);
  980. void SendShutdownConnectionNotice();
  981. /// <summary>
  982. /// Send statistical information about the sim to the client.
  983. /// </summary>
  984. /// <param name="stats"></param>
  985. void SendSimStats(SimStats stats);
  986. void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags);
  987. void SendObjectPropertiesReply(ISceneEntity Entity);
  988. void SendAgentOffline(UUID[] agentIDs);
  989. void SendAgentOnline(UUID[] agentIDs);
  990. void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
  991. Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook);
  992. void SendAdminResponse(UUID Token, uint AdminLevel);
  993. void SendGroupMembership(GroupMembershipData[] GroupMembership);
  994. void SendGroupNameReply(UUID groupLLUID, string GroupName);
  995. void SendJoinGroupReply(UUID groupID, bool success);
  996. void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success);
  997. void SendLeaveGroupReply(UUID groupID, bool success);
  998. void SendCreateGroupReply(UUID groupID, bool success, string message);
  999. void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
  1000. void SendScriptRunningReply(UUID objectID, UUID itemID, bool running);
  1001. void SendAsset(AssetRequestToClient req);
  1002. void SendTexture(AssetBase TextureAsset);
  1003. byte[] GetThrottlesPacked(float multiplier);
  1004. event ViewerEffectEventHandler OnViewerEffect;
  1005. event Action<IClientAPI> OnLogout;
  1006. event Action<IClientAPI> OnConnectionClosed;
  1007. void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message);
  1008. void SendLogoutPacket();
  1009. // WARNING WARNING WARNING
  1010. //
  1011. // The two following methods are EXCLUSIVELY for the load balancer.
  1012. // they cause a MASSIVE performance hit!
  1013. //
  1014. ClientInfo GetClientInfo();
  1015. void SetClientInfo(ClientInfo info);
  1016. void SetClientOption(string option, string value);
  1017. string GetClientOption(string option);
  1018. void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters);
  1019. void SendClearFollowCamProperties(UUID objectID);
  1020. void SendRegionHandle(UUID regoinID, ulong handle);
  1021. void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
  1022. void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
  1023. void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data);
  1024. void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data);
  1025. void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data);
  1026. void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data);
  1027. void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data);
  1028. void SendDirLandReply(UUID queryID, DirLandReplyData[] data);
  1029. void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data);
  1030. void SendEventInfoReply(EventData info);
  1031. void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags);
  1032. void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data);
  1033. void SendOfferCallingCard(UUID srcID, UUID transactionID);
  1034. void SendAcceptCallingCard(UUID transactionID);
  1035. void SendDeclineCallingCard(UUID transactionID);
  1036. void SendTerminateFriend(UUID exFriendID);
  1037. void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name);
  1038. 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);
  1039. void SendAgentDropGroup(UUID groupID);
  1040. void RefreshGroupMembership();
  1041. void SendAvatarNotesReply(UUID targetID, string text);
  1042. void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks);
  1043. 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);
  1044. void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds);
  1045. void SendParcelDwellReply(int localID, UUID parcelID, float dwell);
  1046. void SendUserInfoReply(bool imViaEmail, bool visible, string email);
  1047. void SendUseCachedMuteList();
  1048. void SendMuteListUpdate(string filename);
  1049. void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals);
  1050. void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes);
  1051. bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
  1052. void SendRebakeAvatarTextures(UUID textureID);
  1053. void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages);
  1054. void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt);
  1055. void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier);
  1056. void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
  1057. void SendChangeUserRights(UUID agentID, UUID friendID, int rights);
  1058. void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId);
  1059. void StopFlying(ISceneEntity presence);
  1060. void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data);
  1061. }
  1062. }