diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-14 21:19:04 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-14 21:19:04 -0400 |
commit | 2f61fb0243e8e6b4da6e2ca1847faaba3ccee3d9 (patch) | |
tree | 392dce7037cb7df3524adaccd3b8ce487812bf16 /OpenSim/Region/Framework | |
parent | * Put the StandaloneTeleportTest in a new thread and call Thread.Join() insid... (diff) | |
download | opensim-SC-2f61fb0243e8e6b4da6e2ca1847faaba3ccee3d9.zip opensim-SC-2f61fb0243e8e6b4da6e2ca1847faaba3ccee3d9.tar.gz opensim-SC-2f61fb0243e8e6b4da6e2ca1847faaba3ccee3d9.tar.bz2 opensim-SC-2f61fb0243e8e6b4da6e2ca1847faaba3ccee3d9.tar.xz |
* minor : comments
* also re-trigger panda
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 72 |
1 files changed, 69 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 0140faa..c1e39a9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -48,6 +48,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
48 | 48 | ||
49 | public delegate void RemoveKnownRegionsFromAvatarList(UUID avatarID, List<ulong> regionlst); | 49 | public delegate void RemoveKnownRegionsFromAvatarList(UUID avatarID, List<ulong> regionlst); |
50 | 50 | ||
51 | /// <summary> | ||
52 | /// Class that Region communications runs through | ||
53 | /// </summary> | ||
51 | public class SceneCommunicationService //one instance per region | 54 | public class SceneCommunicationService //one instance per region |
52 | { | 55 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 56 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -60,15 +63,46 @@ namespace OpenSim.Region.Framework.Scenes | |||
60 | 63 | ||
61 | protected List<UUID> m_agentsInTransit; | 64 | protected List<UUID> m_agentsInTransit; |
62 | 65 | ||
66 | /// <summary> | ||
67 | /// An agent is crossing into this region | ||
68 | /// </summary> | ||
63 | public event AgentCrossing OnAvatarCrossingIntoRegion; | 69 | public event AgentCrossing OnAvatarCrossingIntoRegion; |
70 | |||
71 | /// <summary> | ||
72 | /// A user will arrive shortly, set up appropriate credentials so it can connect | ||
73 | /// </summary> | ||
64 | public event ExpectUserDelegate OnExpectUser; | 74 | public event ExpectUserDelegate OnExpectUser; |
75 | |||
76 | /// <summary> | ||
77 | /// A Prim will arrive shortly | ||
78 | /// </summary> | ||
65 | public event ExpectPrimDelegate OnExpectPrim; | 79 | public event ExpectPrimDelegate OnExpectPrim; |
66 | public event CloseAgentConnection OnCloseAgentConnection; | 80 | public event CloseAgentConnection OnCloseAgentConnection; |
81 | |||
82 | /// <summary> | ||
83 | /// A new prim has arrived | ||
84 | /// </summary> | ||
67 | public event PrimCrossing OnPrimCrossingIntoRegion; | 85 | public event PrimCrossing OnPrimCrossingIntoRegion; |
86 | |||
87 | /// <summary> | ||
88 | /// A New Region is up and available | ||
89 | /// </summary> | ||
68 | public event RegionUp OnRegionUp; | 90 | public event RegionUp OnRegionUp; |
91 | |||
92 | /// <summary> | ||
93 | /// We have a child agent for this avatar and we're getting a status update about it | ||
94 | /// </summary> | ||
69 | public event ChildAgentUpdate OnChildAgentUpdate; | 95 | public event ChildAgentUpdate OnChildAgentUpdate; |
70 | //public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; | 96 | //public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; |
97 | |||
98 | /// <summary> | ||
99 | /// Time to log one of our users off. Grid Service sends this mostly | ||
100 | /// </summary> | ||
71 | public event LogOffUser OnLogOffUser; | 101 | public event LogOffUser OnLogOffUser; |
102 | |||
103 | /// <summary> | ||
104 | /// A region wants land data from us! | ||
105 | /// </summary> | ||
72 | public event GetLandData OnGetLandData; | 106 | public event GetLandData OnGetLandData; |
73 | 107 | ||
74 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; | 108 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; |
@@ -123,11 +157,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
123 | } | 157 | } |
124 | } | 158 | } |
125 | 159 | ||
160 | /// <summary> | ||
161 | /// Returns a region with the name closest to string provided | ||
162 | /// </summary> | ||
163 | /// <param name="name">Partial Region Name for matching</param> | ||
164 | /// <returns>Region Information for the region</returns> | ||
126 | public RegionInfo RequestClosestRegion(string name) | 165 | public RegionInfo RequestClosestRegion(string name) |
127 | { | 166 | { |
128 | return m_commsProvider.GridService.RequestClosestRegion(name); | 167 | return m_commsProvider.GridService.RequestClosestRegion(name); |
129 | } | 168 | } |
130 | 169 | ||
170 | /// <summary> | ||
171 | /// This region is shutting down, de-register all events! | ||
172 | /// De-Register region from Grid! | ||
173 | /// </summary> | ||
131 | public void Close() | 174 | public void Close() |
132 | { | 175 | { |
133 | if (regionCommsHost != null) | 176 | if (regionCommsHost != null) |
@@ -159,10 +202,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
159 | #region CommsManager Event handlers | 202 | #region CommsManager Event handlers |
160 | 203 | ||
161 | /// <summary> | 204 | /// <summary> |
162 | /// | 205 | /// A New User will arrive shortly, Informs the scene that there's a new user on the way |
163 | /// </summary> | 206 | /// </summary> |
164 | /// <param name="regionHandle"></param> | 207 | /// <param name="agent">Data we need to ensure that the agent can connect</param> |
165 | /// <param name="agent"></param> | ||
166 | /// | 208 | /// |
167 | protected void NewUserConnection(AgentCircuitData agent) | 209 | protected void NewUserConnection(AgentCircuitData agent) |
168 | { | 210 | { |
@@ -174,6 +216,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
174 | } | 216 | } |
175 | } | 217 | } |
176 | 218 | ||
219 | /// <summary> | ||
220 | /// The Grid has requested us to log-off the user | ||
221 | /// </summary> | ||
222 | /// <param name="AgentID">Unique ID of agent to log-off</param> | ||
223 | /// <param name="RegionSecret">The secret string that the region establishes with the grid when registering</param> | ||
224 | /// <param name="message">The message to send to the user that tells them why they were logged off</param> | ||
177 | protected void GridLogOffUser(UUID AgentID, UUID RegionSecret, string message) | 225 | protected void GridLogOffUser(UUID AgentID, UUID RegionSecret, string message) |
178 | { | 226 | { |
179 | handlerLogOffUser = OnLogOffUser; | 227 | handlerLogOffUser = OnLogOffUser; |
@@ -183,6 +231,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
183 | } | 231 | } |
184 | } | 232 | } |
185 | 233 | ||
234 | /// <summary> | ||
235 | /// A New Region is now available. Inform the scene that there is a new region available. | ||
236 | /// </summary> | ||
237 | /// <param name="region">Information about the new region that is available</param> | ||
238 | /// <returns>True if the event was handled</returns> | ||
186 | protected bool newRegionUp(RegionInfo region) | 239 | protected bool newRegionUp(RegionInfo region) |
187 | { | 240 | { |
188 | handlerRegionUp = OnRegionUp; | 241 | handlerRegionUp = OnRegionUp; |
@@ -194,6 +247,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
194 | return true; | 247 | return true; |
195 | } | 248 | } |
196 | 249 | ||
250 | /// <summary> | ||
251 | /// Inform the scene that we've got an update about a child agent that we have | ||
252 | /// </summary> | ||
253 | /// <param name="cAgentData"></param> | ||
254 | /// <returns></returns> | ||
197 | protected bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData) | 255 | protected bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData) |
198 | { | 256 | { |
199 | handlerChildAgentUpdate = OnChildAgentUpdate; | 257 | handlerChildAgentUpdate = OnChildAgentUpdate; |
@@ -204,6 +262,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
204 | return true; | 262 | return true; |
205 | } | 263 | } |
206 | 264 | ||
265 | |||
207 | protected void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) | 266 | protected void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) |
208 | { | 267 | { |
209 | handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion; | 268 | handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion; |
@@ -213,6 +272,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
213 | } | 272 | } |
214 | } | 273 | } |
215 | 274 | ||
275 | /// <summary> | ||
276 | /// We have a new prim from a neighbor | ||
277 | /// </summary> | ||
278 | /// <param name="primID">unique ID for the primative</param> | ||
279 | /// <param name="objXMLData">XML2 encoded data of the primative</param> | ||
280 | /// <param name="XMLMethod">An Int that represents the version of the XMLMethod</param> | ||
281 | /// <returns>True if the prim was accepted, false if it was not</returns> | ||
216 | protected bool IncomingPrimCrossing(UUID primID, String objXMLData, int XMLMethod) | 282 | protected bool IncomingPrimCrossing(UUID primID, String objXMLData, int XMLMethod) |
217 | { | 283 | { |
218 | handlerExpectPrim = OnExpectPrim; | 284 | handlerExpectPrim = OnExpectPrim; |