diff options
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestClient.cs')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 81a5cf7..6a7cb0a 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -329,7 +329,7 @@ namespace OpenSim.Tests.Common.Mock | |||
329 | /// </value> | 329 | /// </value> |
330 | private UUID m_agentId; | 330 | private UUID m_agentId; |
331 | 331 | ||
332 | public ISceneAgent SceneAgent { get { throw new NotImplementedException(); } } | 332 | public ISceneAgent SceneAgent { get; set; } |
333 | 333 | ||
334 | /// <value> | 334 | /// <value> |
335 | /// The last caps seed url that this client was given. | 335 | /// The last caps seed url that this client was given. |
@@ -349,15 +349,9 @@ namespace OpenSim.Tests.Common.Mock | |||
349 | get { return m_agentId; } | 349 | get { return m_agentId; } |
350 | } | 350 | } |
351 | 351 | ||
352 | public UUID SessionId | 352 | public UUID SessionId { get; set; } |
353 | { | ||
354 | get { return UUID.Zero; } | ||
355 | } | ||
356 | 353 | ||
357 | public UUID SecureSessionId | 354 | public UUID SecureSessionId { get; set; } |
358 | { | ||
359 | get { return UUID.Zero; } | ||
360 | } | ||
361 | 355 | ||
362 | public virtual string FirstName | 356 | public virtual string FirstName |
363 | { | 357 | { |
@@ -381,11 +375,9 @@ namespace OpenSim.Tests.Common.Mock | |||
381 | get { return true; } | 375 | get { return true; } |
382 | set { } | 376 | set { } |
383 | } | 377 | } |
384 | public bool IsLoggingOut | 378 | |
385 | { | 379 | public bool IsLoggingOut { get; set; } |
386 | get { return false; } | 380 | |
387 | set { } | ||
388 | } | ||
389 | public UUID ActiveGroupId | 381 | public UUID ActiveGroupId |
390 | { | 382 | { |
391 | get { return UUID.Zero; } | 383 | get { return UUID.Zero; } |
@@ -451,6 +443,8 @@ namespace OpenSim.Tests.Common.Mock | |||
451 | m_lastName = agentData.lastname; | 443 | m_lastName = agentData.lastname; |
452 | m_circuitCode = agentData.circuitcode; | 444 | m_circuitCode = agentData.circuitcode; |
453 | m_scene = scene; | 445 | m_scene = scene; |
446 | SessionId = agentData.SessionID; | ||
447 | SecureSessionId = agentData.SecureSessionID; | ||
454 | CapsSeedUrl = agentData.CapsPath; | 448 | CapsSeedUrl = agentData.CapsPath; |
455 | 449 | ||
456 | ReceivedOfflineNotifications = new List<UUID>(); | 450 | ReceivedOfflineNotifications = new List<UUID>(); |
@@ -902,12 +896,29 @@ namespace OpenSim.Tests.Common.Mock | |||
902 | { | 896 | { |
903 | } | 897 | } |
904 | 898 | ||
905 | public void Close() | 899 | /// <summary> |
900 | /// This is a TestClient only method to do shutdown tasks that are normally carried out by LLUDPServer.RemoveClient() | ||
901 | /// </summary> | ||
902 | public void Logout() | ||
903 | { | ||
904 | // We must set this here so that the presence is removed from the PresenceService by the PresenceDetector | ||
905 | IsLoggingOut = true; | ||
906 | |||
907 | Close(); | ||
908 | } | ||
909 | |||
910 | public void Close(bool c) | ||
906 | { | 911 | { |
907 | Close(true); | 912 | Close(); |
908 | } | 913 | } |
909 | public void Close(bool sendStop) | 914 | |
915 | public void Close() | ||
910 | { | 916 | { |
917 | // Fire the callback for this connection closing | ||
918 | // This is necesary to get the presence detector to notice that a client has logged out. | ||
919 | if (OnConnectionClosed != null) | ||
920 | OnConnectionClosed(this); | ||
921 | |||
911 | m_scene.RemoveClient(AgentId, true); | 922 | m_scene.RemoveClient(AgentId, true); |
912 | } | 923 | } |
913 | 924 | ||