aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs')
-rw-r--r--Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs53
1 files changed, 52 insertions, 1 deletions
diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs b/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs
index 0024d14..3d74e2f 100644
--- a/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs
+++ b/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs
@@ -5,15 +5,66 @@ using OpenSim.Framework.Types;
5using OpenGrid.Framework.Communications; 5using OpenGrid.Framework.Communications;
6namespace OpenGrid.Framework.Communications.OGS1 6namespace OpenGrid.Framework.Communications.OGS1
7{ 7{
8 public class OGSInterSimComms : IInterRegionCommunications 8 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
9 public delegate bool ExpectArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
10
11 public sealed class InterRegionSingleton
9 { 12 {
13 static readonly InterRegionSingleton instance = new InterRegionSingleton();
14
15 public event InformRegionChild OnChildAgent;
16 public event ExpectArrival OnArrival;
17
18 static InterRegionSingleton()
19 {
20 }
21
22 InterRegionSingleton()
23 {
24 }
25
26 public static InterRegionSingleton Instance
27 {
28 get
29 {
30 return instance;
31 }
32 }
33
10 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 34 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
11 { 35 {
36 if (OnChildAgent != null)
37 {
38 return OnChildAgent(regionHandle, agentData);
39 }
12 return false; 40 return false;
13 } 41 }
42
14 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) 43 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
15 { 44 {
45 if (OnArrival != null)
46 {
47 return OnArrival(regionHandle, agentID, position);
48 }
16 return false; 49 return false;
17 } 50 }
18 } 51 }
52
53 public class OGS1InterRegionRemoting : MarshalByRefObject
54 {
55
56 public OGS1InterRegionRemoting()
57 {
58 }
59
60 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
61 {
62 return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData);
63 }
64
65 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
66 {
67 return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position);
68 }
69 }
19} 70}