aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IBansService.cs48
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs47
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs8
-rw-r--r--OpenSim/Services/Interfaces/IOfflineIMService.cs7
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs12
-rw-r--r--OpenSim/Services/Interfaces/IUserProfilesService.cs75
-rw-r--r--OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs2
7 files changed, 179 insertions, 20 deletions
diff --git a/OpenSim/Services/Interfaces/IBansService.cs b/OpenSim/Services/Interfaces/IBansService.cs
new file mode 100644
index 0000000..8fd3521
--- /dev/null
+++ b/OpenSim/Services/Interfaces/IBansService.cs
@@ -0,0 +1,48 @@
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 */
27using System;
28using System.Collections.Generic;
29
30using OpenSim.Framework;
31using OpenMetaverse;
32
33namespace OpenSim.Services.Interfaces
34{
35 public interface IBansService
36 {
37 /// <summary>
38 /// Are any of the given arguments banned from the grid?
39 /// </summary>
40 /// <param name="userID"></param>
41 /// <param name="ip"></param>
42 /// <param name="id0"></param>
43 /// <param name="origin"></param>
44 /// <returns></returns>
45 bool IsBanned(string userID, string ip, string id0, string origin);
46 }
47
48}
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index a3d237f..4e6a0f6 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -29,9 +29,13 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using System.Reflection;
33
32using OpenSim.Framework; 34using OpenSim.Framework;
33using OpenMetaverse; 35using OpenMetaverse;
34 36
37using log4net;
38
35namespace OpenSim.Services.Interfaces 39namespace OpenSim.Services.Interfaces
36{ 40{
37 public interface IGridService 41 public interface IGridService
@@ -97,6 +101,7 @@ namespace OpenSim.Services.Interfaces
97 List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax); 101 List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax);
98 102
99 List<GridRegion> GetDefaultRegions(UUID scopeID); 103 List<GridRegion> GetDefaultRegions(UUID scopeID);
104 List<GridRegion> GetDefaultHypergridRegions(UUID scopeID);
100 List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y); 105 List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y);
101 List<GridRegion> GetHyperlinks(UUID scopeID); 106 List<GridRegion> GetHyperlinks(UUID scopeID);
102 107
@@ -118,6 +123,9 @@ namespace OpenSim.Services.Interfaces
118 123
119 public class GridRegion 124 public class GridRegion
120 { 125 {
126 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
127 private static readonly string LogHeader = "[GRID REGION]";
128
121 /// <summary> 129 /// <summary>
122 /// The port by which http communication occurs with the region 130 /// The port by which http communication occurs with the region
123 /// </summary> 131 /// </summary>
@@ -137,7 +145,10 @@ namespace OpenSim.Services.Interfaces
137 if ( m_serverURI != string.Empty ) { 145 if ( m_serverURI != string.Empty ) {
138 return m_serverURI; 146 return m_serverURI;
139 } else { 147 } else {
140 return "http://" + m_externalHostName + ":" + m_httpPort + "/"; 148 if (m_httpPort == 0)
149 return "http://" + m_externalHostName + "/";
150 else
151 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
141 } 152 }
142 } 153 }
143 set { 154 set {
@@ -179,6 +190,7 @@ namespace OpenSim.Services.Interfaces
179 190
180 /// <summary> 191 /// <summary>
181 /// The location of this region in meters. 192 /// The location of this region in meters.
193 /// DANGER DANGER! Note that this name means something different in RegionInfo.
182 /// </summary> 194 /// </summary>
183 public int RegionLocX 195 public int RegionLocX
184 { 196 {
@@ -187,8 +199,12 @@ namespace OpenSim.Services.Interfaces
187 } 199 }
188 protected int m_regionLocX; 200 protected int m_regionLocX;
189 201
202 public int RegionSizeX { get; set; }
203 public int RegionSizeY { get; set; }
204
190 /// <summary> 205 /// <summary>
191 /// The location of this region in meters. 206 /// The location of this region in meters.
207 /// DANGER DANGER! Note that this name means something different in RegionInfo.
192 /// </summary> 208 /// </summary>
193 public int RegionLocY 209 public int RegionLocY
194 { 210 {
@@ -217,13 +233,18 @@ namespace OpenSim.Services.Interfaces
217 233
218 public GridRegion() 234 public GridRegion()
219 { 235 {
236 RegionSizeX = (int)Constants.RegionSize;
237 RegionSizeY = (int)Constants.RegionSize;
220 m_serverURI = string.Empty; 238 m_serverURI = string.Empty;
221 } 239 }
222 240
241 /*
223 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri) 242 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri)
224 { 243 {
225 m_regionLocX = regionLocX; 244 m_regionLocX = regionLocX;
226 m_regionLocY = regionLocY; 245 m_regionLocY = regionLocY;
246 RegionSizeX = (int)Constants.RegionSize;
247 RegionSizeY = (int)Constants.RegionSize;
227 248
228 m_internalEndPoint = internalEndPoint; 249 m_internalEndPoint = internalEndPoint;
229 m_externalHostName = externalUri; 250 m_externalHostName = externalUri;
@@ -233,16 +254,21 @@ namespace OpenSim.Services.Interfaces
233 { 254 {
234 m_regionLocX = regionLocX; 255 m_regionLocX = regionLocX;
235 m_regionLocY = regionLocY; 256 m_regionLocY = regionLocY;
257 RegionSizeX = (int)Constants.RegionSize;
258 RegionSizeY = (int)Constants.RegionSize;
236 259
237 m_externalHostName = externalUri; 260 m_externalHostName = externalUri;
238 261
239 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)port); 262 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)port);
240 } 263 }
264 */
241 265
242 public GridRegion(uint xcell, uint ycell) 266 public GridRegion(uint xcell, uint ycell)
243 { 267 {
244 m_regionLocX = (int)(xcell * Constants.RegionSize); 268 m_regionLocX = (int)(xcell * Constants.RegionSize);
245 m_regionLocY = (int)(ycell * Constants.RegionSize); 269 m_regionLocY = (int)(ycell * Constants.RegionSize);
270 RegionSizeX = (int)Constants.RegionSize;
271 RegionSizeY = (int)Constants.RegionSize;
246 } 272 }
247 273
248 public GridRegion(RegionInfo ConvertFrom) 274 public GridRegion(RegionInfo ConvertFrom)
@@ -250,6 +276,8 @@ namespace OpenSim.Services.Interfaces
250 m_regionName = ConvertFrom.RegionName; 276 m_regionName = ConvertFrom.RegionName;
251 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); 277 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
252 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); 278 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
279 RegionSizeX = (int)ConvertFrom.RegionSizeX;
280 RegionSizeY = (int)ConvertFrom.RegionSizeY;
253 m_internalEndPoint = ConvertFrom.InternalEndPoint; 281 m_internalEndPoint = ConvertFrom.InternalEndPoint;
254 m_externalHostName = ConvertFrom.ExternalHostName; 282 m_externalHostName = ConvertFrom.ExternalHostName;
255 m_httpPort = ConvertFrom.HttpPort; 283 m_httpPort = ConvertFrom.HttpPort;
@@ -268,6 +296,8 @@ namespace OpenSim.Services.Interfaces
268 m_regionName = ConvertFrom.RegionName; 296 m_regionName = ConvertFrom.RegionName;
269 m_regionLocX = ConvertFrom.RegionLocX; 297 m_regionLocX = ConvertFrom.RegionLocX;
270 m_regionLocY = ConvertFrom.RegionLocY; 298 m_regionLocY = ConvertFrom.RegionLocY;
299 RegionSizeX = ConvertFrom.RegionSizeX;
300 RegionSizeY = ConvertFrom.RegionSizeY;
271 m_internalEndPoint = ConvertFrom.InternalEndPoint; 301 m_internalEndPoint = ConvertFrom.InternalEndPoint;
272 m_externalHostName = ConvertFrom.ExternalHostName; 302 m_externalHostName = ConvertFrom.ExternalHostName;
273 m_httpPort = ConvertFrom.HttpPort; 303 m_httpPort = ConvertFrom.HttpPort;
@@ -379,6 +409,8 @@ namespace OpenSim.Services.Interfaces
379 kvp["uuid"] = RegionID.ToString(); 409 kvp["uuid"] = RegionID.ToString();
380 kvp["locX"] = RegionLocX.ToString(); 410 kvp["locX"] = RegionLocX.ToString();
381 kvp["locY"] = RegionLocY.ToString(); 411 kvp["locY"] = RegionLocY.ToString();
412 kvp["sizeX"] = RegionSizeX.ToString();
413 kvp["sizeY"] = RegionSizeY.ToString();
382 kvp["regionName"] = RegionName; 414 kvp["regionName"] = RegionName;
383 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); 415 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
384 kvp["serverHttpPort"] = HttpPort.ToString(); 416 kvp["serverHttpPort"] = HttpPort.ToString();
@@ -405,6 +437,16 @@ namespace OpenSim.Services.Interfaces
405 if (kvp.ContainsKey("locY")) 437 if (kvp.ContainsKey("locY"))
406 RegionLocY = Convert.ToInt32((string)kvp["locY"]); 438 RegionLocY = Convert.ToInt32((string)kvp["locY"]);
407 439
440 if (kvp.ContainsKey("sizeX"))
441 RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
442 else
443 RegionSizeX = (int)Constants.RegionSize;
444
445 if (kvp.ContainsKey("sizeY"))
446 RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
447 else
448 RegionSizeX = (int)Constants.RegionSize;
449
408 if (kvp.ContainsKey("regionName")) 450 if (kvp.ContainsKey("regionName"))
409 RegionName = (string)kvp["regionName"]; 451 RegionName = (string)kvp["regionName"];
410 452
@@ -458,6 +500,9 @@ namespace OpenSim.Services.Interfaces
458 500
459 if (kvp.ContainsKey("Token")) 501 if (kvp.ContainsKey("Token"))
460 Token = kvp["Token"].ToString(); 502 Token = kvp["Token"].ToString();
503
504 // m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>",
505 // LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY);
461 } 506 }
462 } 507 }
463} 508}
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index 3dc877a..05e175a 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -43,15 +43,9 @@ namespace OpenSim.Services.Interfaces
43 43
44 } 44 }
45 45
46 /// <summary>
47 /// HG1.5 only
48 /// </summary>
49 public interface IUserAgentService 46 public interface IUserAgentService
50 { 47 {
51 // called by login service only 48 bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
52 bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason);
53 // called by simulators
54 bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, out string reason);
55 void LogoutAgent(UUID userID, UUID sessionID); 49 void LogoutAgent(UUID userID, UUID sessionID);
56 GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); 50 GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt);
57 Dictionary<string, object> GetServerURLs(UUID userID); 51 Dictionary<string, object> GetServerURLs(UUID userID);
diff --git a/OpenSim/Services/Interfaces/IOfflineIMService.cs b/OpenSim/Services/Interfaces/IOfflineIMService.cs
index 2848967..588aaaf 100644
--- a/OpenSim/Services/Interfaces/IOfflineIMService.cs
+++ b/OpenSim/Services/Interfaces/IOfflineIMService.cs
@@ -35,7 +35,14 @@ namespace OpenSim.Services.Interfaces
35 public interface IOfflineIMService 35 public interface IOfflineIMService
36 { 36 {
37 List<GridInstantMessage> GetMessages(UUID principalID); 37 List<GridInstantMessage> GetMessages(UUID principalID);
38
38 bool StoreMessage(GridInstantMessage im, out string reason); 39 bool StoreMessage(GridInstantMessage im, out string reason);
40
41 /// <summary>
42 /// Delete messages to or from this user (or group).
43 /// </summary>
44 /// <param name="userID">A user or group ID</param>
45 void DeleteMessages(UUID userID);
39 } 46 }
40 47
41 public class OfflineIMDataUtils 48 public class OfflineIMDataUtils
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index a963b8e..1c82b3e 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -75,8 +75,6 @@ namespace OpenSim.Services.Interfaces
75 /// <returns></returns> 75 /// <returns></returns>
76 bool UpdateAgent(GridRegion destination, AgentPosition data); 76 bool UpdateAgent(GridRegion destination, AgentPosition data);
77 77
78 bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
79
80 bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason); 78 bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason);
81 79
82 /// <summary> 80 /// <summary>
@@ -90,20 +88,12 @@ namespace OpenSim.Services.Interfaces
90 bool ReleaseAgent(UUID originRegion, UUID id, string uri); 88 bool ReleaseAgent(UUID originRegion, UUID id, string uri);
91 89
92 /// <summary> 90 /// <summary>
93 /// Close child agent.
94 /// </summary>
95 /// <param name="regionHandle"></param>
96 /// <param name="id"></param>
97 /// <returns></returns>
98 bool CloseChildAgent(GridRegion destination, UUID id);
99
100 /// <summary>
101 /// Close agent. 91 /// Close agent.
102 /// </summary> 92 /// </summary>
103 /// <param name="regionHandle"></param> 93 /// <param name="regionHandle"></param>
104 /// <param name="id"></param> 94 /// <param name="id"></param>
105 /// <returns></returns> 95 /// <returns></returns>
106 bool CloseAgent(GridRegion destination, UUID id); 96 bool CloseAgent(GridRegion destination, UUID id, string auth_token);
107 97
108 #endregion Agents 98 #endregion Agents
109 99
diff --git a/OpenSim/Services/Interfaces/IUserProfilesService.cs b/OpenSim/Services/Interfaces/IUserProfilesService.cs
new file mode 100644
index 0000000..319d307
--- /dev/null
+++ b/OpenSim/Services/Interfaces/IUserProfilesService.cs
@@ -0,0 +1,75 @@
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
28using System;
29using OpenSim.Framework;
30using OpenMetaverse;
31using OpenMetaverse.StructuredData;
32
33namespace OpenSim.Services.Interfaces
34{
35 public interface IUserProfilesService
36 {
37 #region Classifieds
38 OSD AvatarClassifiedsRequest(UUID creatorId);
39 bool ClassifiedUpdate(UserClassifiedAdd ad, ref string result);
40 bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result);
41 bool ClassifiedDelete(UUID recordId);
42 #endregion Classifieds
43
44 #region Picks
45 OSD AvatarPicksRequest(UUID creatorId);
46 bool PickInfoRequest(ref UserProfilePick pick, ref string result);
47 bool PicksUpdate(ref UserProfilePick pick, ref string result);
48 bool PicksDelete(UUID pickId);
49 #endregion Picks
50
51 #region Notes
52 bool AvatarNotesRequest(ref UserProfileNotes note);
53 bool NotesUpdate(ref UserProfileNotes note, ref string result);
54 #endregion Notes
55
56 #region Profile Properties
57 bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result);
58 bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result);
59 #endregion Profile Properties
60
61 #region Interests
62 bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result);
63 #endregion Interests
64
65 #region Utility
66 OSD AvatarImageAssetsRequest(UUID avatarId);
67 #endregion Utility
68
69 #region UserData
70 bool RequestUserAppData(ref UserAppData prop, ref string result);
71 bool SetUserAppData(UserAppData prop, ref string result);
72 #endregion UserData
73 }
74}
75
diff --git a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
index 47ece75..f7c8cc1 100644
--- a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.6.*")] 32[assembly: AssemblyVersion("0.8.0.*")]
33 33