1
0

IClientAPI.cs 61 KB

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