aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
diff options
context:
space:
mode:
authorMW2007-05-31 14:22:14 +0000
committerMW2007-05-31 14:22:14 +0000
commita575bc38d61ac5cb74f60e0eee503ca7f3e99803 (patch)
tree1ff674910b118bb3939e351eaeff10546d25b0fc /Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
parent(no commit message) (diff)
downloadopensim-SC_OLD-a575bc38d61ac5cb74f60e0eee503ca7f3e99803.zip
opensim-SC_OLD-a575bc38d61ac5cb74f60e0eee503ca7f3e99803.tar.gz
opensim-SC_OLD-a575bc38d61ac5cb74f60e0eee503ca7f3e99803.tar.bz2
opensim-SC_OLD-a575bc38d61ac5cb74f60e0eee503ca7f3e99803.tar.xz
More work on OpenGrid.Framework.Communications
Diffstat (limited to '')
-rw-r--r--Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs53
1 files changed, 33 insertions, 20 deletions
diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
index 32f4718..57049fc 100644
--- a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
+++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
@@ -12,6 +12,7 @@ namespace OpenGrid.Framework.Communications
12 public class TestLocalCommsManager : RegionServerCommsManager 12 public class TestLocalCommsManager : RegionServerCommsManager
13 { 13 {
14 protected Dictionary<uint , RegionInfo> regions = new Dictionary<uint,RegionInfo>(); 14 protected Dictionary<uint , RegionInfo> regions = new Dictionary<uint,RegionInfo>();
15 protected Dictionary<uint, RegionCommsHostBase> regionHosts = new Dictionary<uint, RegionCommsHostBase>();
15 16
16 public TestLocalCommsManager() 17 public TestLocalCommsManager()
17 { 18 {
@@ -21,19 +22,20 @@ namespace OpenGrid.Framework.Communications
21 /// <summary> 22 /// <summary>
22 /// 23 ///
23 /// </summary> 24 /// </summary>
24 /// <returns></returns>
25 public override RegionInfo LoadRegionConfigFromGridServer(LLUUID regionID)
26 {
27 return null;
28 }
29
30 /// <summary>
31 ///
32 /// </summary>
33 /// <param name="regionInfo"></param> 25 /// <param name="regionInfo"></param>
34 /// <returns></returns> 26 /// <returns></returns>
35 public override IRegionCommsHost RegisterRegion(RegionInfo regionInfo) 27 public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo)
36 { 28 {
29 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
30 {
31 this.regions.Add((uint)regionInfo.RegionHandle, regionInfo);
32 RegionCommsHostBase regionHost = new RegionCommsHostBase();
33 this.regionHosts.Add((uint)regionInfo.RegionHandle, regionHost);
34
35 return regionHost;
36 }
37
38 //already in our list of regions so for now lets return null
37 return null; 39 return null;
38 } 40 }
39 41
@@ -59,19 +61,30 @@ namespace OpenGrid.Framework.Communications
59 /// <summary> 61 /// <summary>
60 /// 62 ///
61 /// </summary> 63 /// </summary>
64 /// <param name="regionHandle"></param>
65 /// <param name="loginData"></param>
62 /// <returns></returns> 66 /// <returns></returns>
63 public override bool AvatarCrossingToRegion() 67 public bool AddNewSession(uint regionHandle, Login loginData)
64 { 68 {
65 return false; 69 AgentCircuitData agent = new AgentCircuitData();
66 } 70 agent.AgentID = loginData.Agent;
71 agent.firstname = loginData.First;
72 agent.lastname = loginData.Last;
73 agent.SessionID = loginData.Session;
74 agent.SecureSessionID = loginData.SecureSession;
75 agent.circuitcode = loginData.CircuitCode;
76 agent.BaseFolder = loginData.BaseFolder;
77 agent.InventoryFolder = loginData.InventoryFolder;
78 agent.startpos = new LLVector3(128, 128, 70);
67 79
68 /// <summary> 80 if (this.regionHosts.ContainsKey((uint)regionHandle))
69 /// 81 {
70 /// </summary> 82 this.regionHosts[(uint)regionHandle].TriggerExpectUser(agent);
71 /// <returns></returns> 83 return true;
72 public override IList RequestMapBlocks() 84 }
73 { 85
74 return null; 86 // region not found
87 return false;
75 } 88 }
76 } 89 }
77} 90}