IClientAPI.cs 64 KB

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