aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestClient.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-30 00:40:19 +0100
committerJustin Clark-Casey (justincc)2012-03-30 00:42:55 +0100
commit59157d9d63c0e038ca0a619bfae1be3ed6f77677 (patch)
tree76e7ba7de91aedad887a6ac0633598d53ce30df3 /OpenSim/Tests/Common/Mock/TestClient.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-59157d9d63c0e038ca0a619bfae1be3ed6f77677.zip
opensim-SC_OLD-59157d9d63c0e038ca0a619bfae1be3ed6f77677.tar.gz
opensim-SC_OLD-59157d9d63c0e038ca0a619bfae1be3ed6f77677.tar.bz2
opensim-SC_OLD-59157d9d63c0e038ca0a619bfae1be3ed6f77677.tar.xz
Add simple login test with online friends. Add IFriendsModule.GrantRights() for granting rights via a module call.
Rename IFriendsModule.GetFriendPerms() -> GetRightsGrantedByFriend() to be more self-documenting and consistent with friends module terminology. Add some method doc.
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestClient.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs36
1 files changed, 23 insertions, 13 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index d6e7200..cb9840e 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -347,15 +347,9 @@ namespace OpenSim.Tests.Common.Mock
347 get { return m_agentId; } 347 get { return m_agentId; }
348 } 348 }
349 349
350 public UUID SessionId 350 public UUID SessionId { get; set; }
351 {
352 get { return UUID.Zero; }
353 }
354 351
355 public UUID SecureSessionId 352 public UUID SecureSessionId { get; set; }
356 {
357 get { return UUID.Zero; }
358 }
359 353
360 public virtual string FirstName 354 public virtual string FirstName
361 { 355 {
@@ -379,11 +373,9 @@ namespace OpenSim.Tests.Common.Mock
379 get { return true; } 373 get { return true; }
380 set { } 374 set { }
381 } 375 }
382 public bool IsLoggingOut 376
383 { 377 public bool IsLoggingOut { get; set; }
384 get { return false; } 378
385 set { }
386 }
387 public UUID ActiveGroupId 379 public UUID ActiveGroupId
388 { 380 {
389 get { return UUID.Zero; } 381 get { return UUID.Zero; }
@@ -449,6 +441,8 @@ namespace OpenSim.Tests.Common.Mock
449 m_lastName = agentData.lastname; 441 m_lastName = agentData.lastname;
450 m_circuitCode = agentData.circuitcode; 442 m_circuitCode = agentData.circuitcode;
451 m_scene = scene; 443 m_scene = scene;
444 SessionId = agentData.SessionID;
445 SecureSessionId = agentData.SecureSessionID;
452 CapsSeedUrl = agentData.CapsPath; 446 CapsSeedUrl = agentData.CapsPath;
453 447
454 ReceivedOfflineNotifications = new List<UUID>(); 448 ReceivedOfflineNotifications = new List<UUID>();
@@ -900,8 +894,24 @@ namespace OpenSim.Tests.Common.Mock
900 { 894 {
901 } 895 }
902 896
897 /// <summary>
898 /// This is a TestClient only method to do shutdown tasks that are normally carried out by LLUDPServer.RemoveClient()
899 /// </summary>
900 public void Logout()
901 {
902 // We must set this here so that the presence is removed from the PresenceService by the PresenceDetector
903 IsLoggingOut = true;
904
905 Close();
906 }
907
903 public void Close() 908 public void Close()
904 { 909 {
910 // Fire the callback for this connection closing
911 // This is necesary to get the presence detector to notice that a client has logged out.
912 if (OnConnectionClosed != null)
913 OnConnectionClosed(this);
914
905 m_scene.RemoveClient(AgentId, true); 915 m_scene.RemoveClient(AgentId, true);
906 } 916 }
907 917