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