diff options
author | Adam Frisby | 2008-04-30 21:16:36 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-30 21:16:36 +0000 |
commit | f5c312bc3c2567449c7268a54a08a54119f58d53 (patch) | |
tree | 424668a4bbec6873ebc5b8256f3671db102f5e9c /OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs | |
parent | * Adds the AuthbuyerID field to sqlite and makes use of it. (diff) | |
download | opensim-SC-f5c312bc3c2567449c7268a54a08a54119f58d53.zip opensim-SC-f5c312bc3c2567449c7268a54a08a54119f58d53.tar.gz opensim-SC-f5c312bc3c2567449c7268a54a08a54119f58d53.tar.bz2 opensim-SC-f5c312bc3c2567449c7268a54a08a54119f58d53.tar.xz |
* Refactored Environment/Modules directory - modules now reside in their own directory with any associated module-specific classes.
* Each module directory is currently inside one of the following category folders: Agent (Anything relating to do with Client<->Server communications.), Avatar (Anything to do with the avatar or presence inworld), Framework (Classes modules can use), Grid (Grid traffic, new OGS2 grid comms), Scripting (Scripting functions, etc), World (The enrivonment/scene, IE Sun/Tree modules.)
* This should be moved into a seperate project file.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs b/OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs deleted file mode 100644 index a735677..0000000 --- a/OpenSim/Region/Environment/Modules/Communications/Interregion/RemotingObject.cs +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using OpenSim.Framework; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.Modules.Communications.Interregion | ||
6 | { | ||
7 | public class RemotingObject : MarshalByRefObject | ||
8 | { | ||
9 | private readonly Location[] m_coords; | ||
10 | private readonly Dictionary<Type, Object> m_interfaces = new Dictionary<Type, object>(); | ||
11 | |||
12 | public RemotingObject(Dictionary<Type, Object> myInterfaces, Location[] coords) | ||
13 | { | ||
14 | m_interfaces = myInterfaces; | ||
15 | m_coords = coords; | ||
16 | } | ||
17 | |||
18 | public Location[] GetLocations() | ||
19 | { | ||
20 | return (Location[]) m_coords.Clone(); | ||
21 | } | ||
22 | |||
23 | public string[] GetInterfaces() | ||
24 | { | ||
25 | string[] interfaces = new string[m_interfaces.Count]; | ||
26 | int i = 0; | ||
27 | |||
28 | foreach (KeyValuePair<Type, object> pair in m_interfaces) | ||
29 | { | ||
30 | interfaces[i++] = pair.Key.FullName; | ||
31 | } | ||
32 | |||
33 | return interfaces; | ||
34 | } | ||
35 | |||
36 | /// <summary> | ||
37 | /// Returns a registered interface availible to neighbouring regions. | ||
38 | /// </summary> | ||
39 | /// <typeparam name="T">The type of interface you wish to request</typeparam> | ||
40 | /// <returns>A MarshalByRefObject inherited from this region inheriting the interface requested.</returns> | ||
41 | /// <remarks>All registered interfaces <b>MUST</b> inherit from MarshalByRefObject and use only serialisable types.</remarks> | ||
42 | public T RequestInterface<T>() | ||
43 | { | ||
44 | if (m_interfaces.ContainsKey(typeof (T))) | ||
45 | return (T) m_interfaces[typeof (T)]; | ||
46 | |||
47 | throw new NotSupportedException("No such interface registered."); | ||
48 | } | ||
49 | } | ||
50 | } \ No newline at end of file | ||