diff options
author | Melanie | 2009-09-28 23:03:47 +0100 |
---|---|---|
committer | Melanie | 2009-09-28 23:03:47 +0100 |
commit | 07091493134341a316624d9a1f6a2ef1cfa2f2d8 (patch) | |
tree | 1d394e128be9766656a441058b2bdf141ba90269 /OpenSim/Services/Interfaces | |
parent | Allow the notation config_name@port/dll_name:class_name as a handler spec (diff) | |
parent | Forgot a return statement. (diff) | |
download | opensim-SC-07091493134341a316624d9a1f6a2ef1cfa2f2d8.zip opensim-SC-07091493134341a316624d9a1f6a2ef1cfa2f2d8.tar.gz opensim-SC-07091493134341a316624d9a1f6a2ef1cfa2f2d8.tar.bz2 opensim-SC-07091493134341a316624d9a1f6a2ef1cfa2f2d8.tar.xz |
Merge branch 'grid-service-redux'
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r-- | OpenSim/Services/Interfaces/IGridService.cs | 45 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IHyperlink.cs | 49 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/INeighbourService.cs | 3 |
3 files changed, 90 insertions, 7 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index ce432ab..46a7f09 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -122,9 +122,6 @@ namespace OpenSim.Services.Interfaces | |||
122 | } | 122 | } |
123 | protected string m_regionName = String.Empty; | 123 | protected string m_regionName = String.Empty; |
124 | 124 | ||
125 | protected bool Allow_Alternate_Ports; | ||
126 | public bool m_allow_alternate_ports; | ||
127 | |||
128 | protected string m_externalHostName; | 125 | protected string m_externalHostName; |
129 | 126 | ||
130 | protected IPEndPoint m_internalEndPoint; | 127 | protected IPEndPoint m_internalEndPoint; |
@@ -146,6 +143,11 @@ namespace OpenSim.Services.Interfaces | |||
146 | public UUID RegionID = UUID.Zero; | 143 | public UUID RegionID = UUID.Zero; |
147 | public UUID ScopeID = UUID.Zero; | 144 | public UUID ScopeID = UUID.Zero; |
148 | 145 | ||
146 | public UUID TerrainImage = UUID.Zero; | ||
147 | public byte Access; | ||
148 | public int Maturity; | ||
149 | public string RegionSecret; | ||
150 | |||
149 | public GridRegion() | 151 | public GridRegion() |
150 | { | 152 | { |
151 | } | 153 | } |
@@ -183,11 +185,29 @@ namespace OpenSim.Services.Interfaces | |||
183 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | 185 | m_internalEndPoint = ConvertFrom.InternalEndPoint; |
184 | m_externalHostName = ConvertFrom.ExternalHostName; | 186 | m_externalHostName = ConvertFrom.ExternalHostName; |
185 | m_httpPort = ConvertFrom.HttpPort; | 187 | m_httpPort = ConvertFrom.HttpPort; |
186 | m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; | 188 | RegionID = ConvertFrom.RegionID; |
187 | RegionID = UUID.Zero; | ||
188 | ServerURI = ConvertFrom.ServerURI; | 189 | ServerURI = ConvertFrom.ServerURI; |
190 | TerrainImage = ConvertFrom.RegionSettings.TerrainImageID; | ||
191 | Access = ConvertFrom.AccessLevel; | ||
192 | Maturity = ConvertFrom.RegionSettings.Maturity; | ||
193 | RegionSecret = ConvertFrom.regionSecret; | ||
189 | } | 194 | } |
190 | 195 | ||
196 | public GridRegion(GridRegion ConvertFrom) | ||
197 | { | ||
198 | m_regionName = ConvertFrom.RegionName; | ||
199 | m_regionLocX = ConvertFrom.RegionLocX; | ||
200 | m_regionLocY = ConvertFrom.RegionLocY; | ||
201 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | ||
202 | m_externalHostName = ConvertFrom.ExternalHostName; | ||
203 | m_httpPort = ConvertFrom.HttpPort; | ||
204 | RegionID = ConvertFrom.RegionID; | ||
205 | ServerURI = ConvertFrom.ServerURI; | ||
206 | TerrainImage = ConvertFrom.TerrainImage; | ||
207 | Access = ConvertFrom.Access; | ||
208 | Maturity = ConvertFrom.Maturity; | ||
209 | RegionSecret = ConvertFrom.RegionSecret; | ||
210 | } | ||
191 | 211 | ||
192 | /// <value> | 212 | /// <value> |
193 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. | 213 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. |
@@ -268,7 +288,10 @@ namespace OpenSim.Services.Interfaces | |||
268 | kvp["serverHttpPort"] = HttpPort.ToString(); | 288 | kvp["serverHttpPort"] = HttpPort.ToString(); |
269 | kvp["serverURI"] = ServerURI; | 289 | kvp["serverURI"] = ServerURI; |
270 | kvp["serverPort"] = InternalEndPoint.Port.ToString(); | 290 | kvp["serverPort"] = InternalEndPoint.Port.ToString(); |
271 | 291 | kvp["regionMapTexture"] = TerrainImage.ToString(); | |
292 | kvp["access"] = Access.ToString(); | ||
293 | kvp["regionSecret"] = RegionSecret; | ||
294 | // Maturity doesn't seem to exist in the DB | ||
272 | return kvp; | 295 | return kvp; |
273 | } | 296 | } |
274 | 297 | ||
@@ -312,6 +335,16 @@ namespace OpenSim.Services.Interfaces | |||
312 | 335 | ||
313 | if (kvp.ContainsKey("serverURI")) | 336 | if (kvp.ContainsKey("serverURI")) |
314 | ServerURI = (string)kvp["serverURI"]; | 337 | ServerURI = (string)kvp["serverURI"]; |
338 | |||
339 | if (kvp.ContainsKey("regionMapTexture")) | ||
340 | UUID.TryParse((string)kvp["regionMapTexture"], out TerrainImage); | ||
341 | |||
342 | if (kvp.ContainsKey("access")) | ||
343 | Access = Byte.Parse((string)kvp["access"]); | ||
344 | |||
345 | if (kvp.ContainsKey("regionSecret")) | ||
346 | RegionSecret =(string)kvp["regionSecret"]; | ||
347 | |||
315 | } | 348 | } |
316 | } | 349 | } |
317 | 350 | ||
diff --git a/OpenSim/Services/Interfaces/IHyperlink.cs b/OpenSim/Services/Interfaces/IHyperlink.cs new file mode 100644 index 0000000..ed3ff23 --- /dev/null +++ b/OpenSim/Services/Interfaces/IHyperlink.cs | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.Framework; | ||
29 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
30 | |||
31 | using OpenMetaverse; | ||
32 | |||
33 | namespace OpenSim.Services.Interfaces | ||
34 | { | ||
35 | public interface IHyperlinkService | ||
36 | { | ||
37 | GridRegion TryLinkRegion(IClientAPI client, string regionDescriptor); | ||
38 | GridRegion GetHyperlinkRegion(ulong handle); | ||
39 | ulong FindRegionHandle(ulong handle); | ||
40 | |||
41 | bool SendUserInformation(GridRegion region, AgentCircuitData aCircuit); | ||
42 | void AdjustUserInformation(AgentCircuitData aCircuit); | ||
43 | |||
44 | bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome); | ||
45 | void AcceptUser(ForeignUserProfileData user, GridRegion home); | ||
46 | |||
47 | bool IsLocalUser(UUID userID); | ||
48 | } | ||
49 | } | ||
diff --git a/OpenSim/Services/Interfaces/INeighbourService.cs b/OpenSim/Services/Interfaces/INeighbourService.cs index 3944486..960e13d 100644 --- a/OpenSim/Services/Interfaces/INeighbourService.cs +++ b/OpenSim/Services/Interfaces/INeighbourService.cs | |||
@@ -28,11 +28,12 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenSim.Framework; | 29 | using OpenSim.Framework; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
31 | 32 | ||
32 | namespace OpenSim.Services.Interfaces | 33 | namespace OpenSim.Services.Interfaces |
33 | { | 34 | { |
34 | public interface INeighbourService | 35 | public interface INeighbourService |
35 | { | 36 | { |
36 | bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion); | 37 | GridRegion HelloNeighbour(ulong regionHandle, RegionInfo otherRegion); |
37 | } | 38 | } |
38 | } | 39 | } |