/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs

http://github.com/aurora-sim/Aurora-Sim · C# · 201 lines · 32 code · 17 blank · 152 comment · 0 complexity · a277916bdb2ad426ac2bfd423c3df0ec MD5 · raw file

  1. /*
  2. * Copyright (c) Contributors, http://aurora-sim.org/, 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 Aurora-Sim 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 OpenMetaverse;
  28. using Aurora.Framework;
  29. using OpenSim.Region.Framework.Scenes;
  30. using GridRegion = OpenSim.Services.Interfaces.GridRegion;
  31. namespace OpenSim.Region.Framework.Interfaces
  32. {
  33. public interface IEntityTransferModule
  34. {
  35. /// <summary>
  36. /// Teleports the given agent to the given region at the given position/rotation
  37. /// </summary>
  38. /// <param name = "agent">The agent to teleport</param>
  39. /// <param name = "regionHandle">The region handle of the region you are teleporting to</param>
  40. /// <param name = "position">The position in the new region you are teleporting into</param>
  41. /// <param name = "lookAt">The rotation you will have once you enter the region</param>
  42. /// <param name = "teleportFlags">The flags (TeleportFlags class) that are being sent along with this teleport</param>
  43. void Teleport(IScenePresence agent, ulong regionHandle, Vector3 position,
  44. Vector3 lookAt, uint teleportFlags);
  45. /// <summary>
  46. /// Teleports the given agent to their home, and if it is not available, a welcome region
  47. /// </summary>
  48. /// <param name = "id">The UUID of the client to teleport home</param>
  49. /// <param name = "client">The client to teleport hom</param>
  50. bool TeleportHome(UUID id, IClientAPI client);
  51. // <summary>
  52. /// Crosses the given agent to the given neighboring region.
  53. /// </summary>
  54. /// <param name = "agent">The agent to cross</param>
  55. /// <param name = "isFlying">Whether the agent is currently flying</param>
  56. /// <param name = "neighborRegion">The neighboring region to cross the agent into</param>
  57. void Cross(IScenePresence agent, bool isFlying, GridRegion neighborRegion);
  58. /// <summary>
  59. /// Crosses the given object to the given neighboring region.
  60. /// </summary>
  61. /// <param name = "sog">The agent to cross</param>
  62. /// <param name = "position">The position to put the object in the neighboring region</param>
  63. /// <param name = "neighborRegion">The neighboring region to cross the agent into</param>
  64. /// <returns>
  65. /// True if the object was added to the neighbor region, false if not
  66. /// </returns>
  67. bool CrossGroupToNewRegion(SceneObjectGroup sog, Vector3 position, GridRegion neighborRegion);
  68. /// <summary>
  69. /// Cancel the given teleport for the given agent in the current region (the region the agent started in)
  70. /// </summary>
  71. /// <param name = "AgentID">The agent whose teleport will be canceled</param>
  72. /// <param name = "RegionHandle">The region that the agent first asked to be teleported from</param>
  73. void CancelTeleport(UUID AgentID, ulong RegionHandle);
  74. /// <summary>
  75. /// Teleports the given client to the given region at position/rotation
  76. /// </summary>
  77. /// <param name = "client">The agent to cross</param>
  78. /// <param name = "regionHandle">The region handle of the region the client is teleporting to</param>
  79. /// <param name = "position">The position in the new region you are teleporting into</param>
  80. /// <param name = "lookAt">The rotation you will have once you enter the region</param>
  81. /// <param name = "teleportFlags">The flags (TeleportFlags class) that are being sent along with this teleport</param>
  82. void RequestTeleportLocation(IClientAPI client, ulong regionHandle, Vector3 position, Vector3 lookAt,
  83. uint teleportFlags);
  84. /// <summary>
  85. /// Teleports the given client to the given region at position/rotation
  86. /// </summary>
  87. /// <param name = "client">The agent to cross</param>
  88. /// <param name = "reg">The region the agent is teleporting to</param>
  89. /// <param name = "position">The position in the new region you are teleporting into</param>
  90. /// <param name = "lookAt">The rotation you will have once you enter the region</param>
  91. /// <param name = "teleportFlags">The flags (TeleportFlags class) that are being sent along with this teleport</param>
  92. void RequestTeleportLocation(IClientAPI client, GridRegion reg, Vector3 position, Vector3 lookAt,
  93. uint teleportFlags);
  94. /// <summary>
  95. /// Teleports the given client to the given region at position/rotation
  96. /// </summary>
  97. /// <param name = "client">The agent to cross</param>
  98. /// <param name = "RegionName">The name of the region the client is teleporting to</param>
  99. /// <param name = "position">The position in the new region you are teleporting into</param>
  100. /// <param name = "lookAt">The rotation you will have once you enter the region</param>
  101. /// <param name = "teleportFlags">The flags (TeleportFlags class) that are being sent along with this teleport</param>
  102. void RequestTeleportLocation(IClientAPI iClientAPI, string RegionName, Vector3 pos, Vector3 lookat,
  103. uint teleportFlags);
  104. /// <summary>
  105. /// A new object (attachment) has come in from the SimulationHandlers, add it to the scene if we are able to
  106. /// </summary>
  107. /// <param name = "regionID">The UUID of the region this object will be added to</param>
  108. /// <param name = "userID">The user who will have this object attached to them</param>
  109. /// <param name = "itemID">The itemID to attach to the user</param>
  110. /// <returns>
  111. /// True if the object was added, false if not
  112. /// </returns>
  113. bool IncomingCreateObject(UUID regionID, UUID userID, UUID itemID);
  114. /// <summary>
  115. /// A new object has come in from the SimulationHandlers, add it to the scene if we are able to
  116. /// </summary>
  117. /// <param name = "regionID">The UUID of the region this object will be added to</param>
  118. /// <param name = "sog">The object to add</param>
  119. /// <returns>
  120. /// True if the object was added, false if not
  121. /// </returns>
  122. bool IncomingCreateObject(UUID regionID, ISceneObject sog);
  123. /// <summary>
  124. /// A new user wants to enter the given region, return whether they are allowed to enter the region or not
  125. /// </summary>
  126. /// <param name = "scene">The region to update the agent</param>
  127. /// <param name = "agent">The agent information</param>
  128. /// <param name = "teleportFlags">The flags on the agent's teleport</param>
  129. /// <param name = "UDPPort">The port to tell the client to connect to</param>
  130. /// <param name = "reason">The reason the agent cannot enter the region</param>
  131. /// <returns>
  132. /// True if the user can enter, false if not
  133. /// </returns>
  134. bool NewUserConnection(IScene scene, AgentCircuitData agent, uint teleportFlags, out int UDPPort,
  135. out string reason);
  136. /// <summary>
  137. /// New data has come in about one of our child agents, update them with the new information
  138. /// </summary>
  139. /// <param name = "scene">The region to update the agent</param>
  140. /// <param name = "cAgentData">The agent information to update</param>
  141. /// <returns>
  142. /// True if the user was updated, false if not
  143. /// </returns>
  144. bool IncomingChildAgentDataUpdate(IScene scene, AgentData cAgentData);
  145. /// <summary>
  146. /// New data has come in about one of our child agents, update them with the new information
  147. /// </summary>
  148. /// <param name = "scene">The region to update the agent</param>
  149. /// <param name = "cAgentData">The agent information to update</param>
  150. /// <returns>
  151. /// True if the user was updated, false if not
  152. /// </returns>
  153. bool IncomingChildAgentDataUpdate(IScene scene, AgentPosition cAgentData);
  154. /// <summary>
  155. /// Get information about the given client from the given region
  156. /// </summary>
  157. /// <param name = "scene">The region to get the agent information from</param>
  158. /// <param name = "id">The id of the agent</param>
  159. /// <param name = "agentIsLeaving">Whether the agent will be leaving the sim or not</param>
  160. /// <param name = "agent">The information about the agent</param>
  161. /// <param name = "circuitData">The information about the agent</param>
  162. /// <returns>
  163. /// True if the user was found, false if not
  164. /// </returns>
  165. bool IncomingRetrieveRootAgent(IScene scene, UUID id, bool agentIsLeaving, out AgentData agent,
  166. out AgentCircuitData circuitData);
  167. /// <summary>
  168. /// Close the given agent in the given scene
  169. /// </summary>
  170. /// <param name = "scene">The region to close the agent in</param>
  171. /// <param name = "agentID">The agent to close</param>
  172. /// <returns>
  173. /// True if the user was closed, false if not
  174. /// </returns>
  175. bool IncomingCloseAgent(IScene scene, UUID agentID);
  176. /// <summary>
  177. /// Turn a former root child into a child agent (for when the agent leaves)
  178. /// </summary>
  179. /// <param name = "sp"></param>
  180. /// <param name = "finalDestination"></param>
  181. /// <param name = "markAgentAsLeaving"></param>
  182. void MakeChildAgent(IScenePresence sp, GridRegion finalDestination, bool markAgentAsLeaving);
  183. }
  184. }