mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
This commit is contained in:
48
OpenSim/Services/Interfaces/IBansService.cs
Normal file
48
OpenSim/Services/Interfaces/IBansService.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IBansService
|
||||
{
|
||||
/// <summary>
|
||||
/// Are any of the given arguments banned from the grid?
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="ip"></param>
|
||||
/// <param name="id0"></param>
|
||||
/// <param name="origin"></param>
|
||||
/// <returns></returns>
|
||||
bool IsBanned(string userID, string ip, string id0, string origin);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,9 +29,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
|
||||
using log4net;
|
||||
|
||||
namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IGridService
|
||||
@@ -97,6 +101,7 @@ namespace OpenSim.Services.Interfaces
|
||||
List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax);
|
||||
|
||||
List<GridRegion> GetDefaultRegions(UUID scopeID);
|
||||
List<GridRegion> GetDefaultHypergridRegions(UUID scopeID);
|
||||
List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y);
|
||||
List<GridRegion> GetHyperlinks(UUID scopeID);
|
||||
|
||||
@@ -118,6 +123,9 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
public class GridRegion
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly string LogHeader = "[GRID REGION]";
|
||||
|
||||
/// <summary>
|
||||
/// The port by which http communication occurs with the region
|
||||
/// </summary>
|
||||
@@ -137,7 +145,10 @@ namespace OpenSim.Services.Interfaces
|
||||
if ( m_serverURI != string.Empty ) {
|
||||
return m_serverURI;
|
||||
} else {
|
||||
return "http://" + m_externalHostName + ":" + m_httpPort + "/";
|
||||
if (m_httpPort == 0)
|
||||
return "http://" + m_externalHostName + "/";
|
||||
else
|
||||
return "http://" + m_externalHostName + ":" + m_httpPort + "/";
|
||||
}
|
||||
}
|
||||
set {
|
||||
@@ -173,6 +184,7 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
/// <summary>
|
||||
/// The location of this region in meters.
|
||||
/// DANGER DANGER! Note that this name means something different in RegionInfo.
|
||||
/// </summary>
|
||||
public int RegionLocX
|
||||
{
|
||||
@@ -181,8 +193,12 @@ namespace OpenSim.Services.Interfaces
|
||||
}
|
||||
protected int m_regionLocX;
|
||||
|
||||
public int RegionSizeX { get; set; }
|
||||
public int RegionSizeY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The location of this region in meters.
|
||||
/// DANGER DANGER! Note that this name means something different in RegionInfo.
|
||||
/// </summary>
|
||||
public int RegionLocY
|
||||
{
|
||||
@@ -211,13 +227,18 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
public GridRegion()
|
||||
{
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
RegionSizeY = (int)Constants.RegionSize;
|
||||
m_serverURI = string.Empty;
|
||||
}
|
||||
|
||||
/*
|
||||
public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri)
|
||||
{
|
||||
m_regionLocX = regionLocX;
|
||||
m_regionLocY = regionLocY;
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
RegionSizeY = (int)Constants.RegionSize;
|
||||
|
||||
m_internalEndPoint = internalEndPoint;
|
||||
m_externalHostName = externalUri;
|
||||
@@ -227,16 +248,21 @@ namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
m_regionLocX = regionLocX;
|
||||
m_regionLocY = regionLocY;
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
RegionSizeY = (int)Constants.RegionSize;
|
||||
|
||||
m_externalHostName = externalUri;
|
||||
|
||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)port);
|
||||
}
|
||||
*/
|
||||
|
||||
public GridRegion(uint xcell, uint ycell)
|
||||
{
|
||||
m_regionLocX = (int)(xcell * Constants.RegionSize);
|
||||
m_regionLocY = (int)(ycell * Constants.RegionSize);
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
RegionSizeY = (int)Constants.RegionSize;
|
||||
}
|
||||
|
||||
public GridRegion(RegionInfo ConvertFrom)
|
||||
@@ -244,6 +270,8 @@ namespace OpenSim.Services.Interfaces
|
||||
m_regionName = ConvertFrom.RegionName;
|
||||
m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
|
||||
m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
|
||||
RegionSizeX = (int)ConvertFrom.RegionSizeX;
|
||||
RegionSizeY = (int)ConvertFrom.RegionSizeY;
|
||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||
m_httpPort = ConvertFrom.HttpPort;
|
||||
@@ -262,6 +290,8 @@ namespace OpenSim.Services.Interfaces
|
||||
m_regionName = ConvertFrom.RegionName;
|
||||
m_regionLocX = ConvertFrom.RegionLocX;
|
||||
m_regionLocY = ConvertFrom.RegionLocY;
|
||||
RegionSizeX = ConvertFrom.RegionSizeX;
|
||||
RegionSizeY = ConvertFrom.RegionSizeY;
|
||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||
m_httpPort = ConvertFrom.HttpPort;
|
||||
@@ -373,6 +403,8 @@ namespace OpenSim.Services.Interfaces
|
||||
kvp["uuid"] = RegionID.ToString();
|
||||
kvp["locX"] = RegionLocX.ToString();
|
||||
kvp["locY"] = RegionLocY.ToString();
|
||||
kvp["sizeX"] = RegionSizeX.ToString();
|
||||
kvp["sizeY"] = RegionSizeY.ToString();
|
||||
kvp["regionName"] = RegionName;
|
||||
kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
|
||||
kvp["serverHttpPort"] = HttpPort.ToString();
|
||||
@@ -399,6 +431,16 @@ namespace OpenSim.Services.Interfaces
|
||||
if (kvp.ContainsKey("locY"))
|
||||
RegionLocY = Convert.ToInt32((string)kvp["locY"]);
|
||||
|
||||
if (kvp.ContainsKey("sizeX"))
|
||||
RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
|
||||
else
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
|
||||
if (kvp.ContainsKey("sizeY"))
|
||||
RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
|
||||
else
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
|
||||
if (kvp.ContainsKey("regionName"))
|
||||
RegionName = (string)kvp["regionName"];
|
||||
|
||||
@@ -452,6 +494,9 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
if (kvp.ContainsKey("Token"))
|
||||
Token = kvp["Token"].ToString();
|
||||
|
||||
// m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>",
|
||||
// LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,15 +43,9 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// HG1.5 only
|
||||
/// </summary>
|
||||
public interface IUserAgentService
|
||||
{
|
||||
// called by login service only
|
||||
bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason);
|
||||
// called by simulators
|
||||
bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, out string reason);
|
||||
bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
|
||||
void LogoutAgent(UUID userID, UUID sessionID);
|
||||
GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt);
|
||||
Dictionary<string, object> GetServerURLs(UUID userID);
|
||||
|
||||
@@ -35,7 +35,14 @@ namespace OpenSim.Services.Interfaces
|
||||
public interface IOfflineIMService
|
||||
{
|
||||
List<GridInstantMessage> GetMessages(UUID principalID);
|
||||
|
||||
bool StoreMessage(GridInstantMessage im, out string reason);
|
||||
|
||||
/// <summary>
|
||||
/// Delete messages to or from this user (or group).
|
||||
/// </summary>
|
||||
/// <param name="userID">A user or group ID</param>
|
||||
void DeleteMessages(UUID userID);
|
||||
}
|
||||
|
||||
public class OfflineIMDataUtils
|
||||
|
||||
@@ -75,8 +75,6 @@ namespace OpenSim.Services.Interfaces
|
||||
/// <returns></returns>
|
||||
bool UpdateAgent(GridRegion destination, AgentPosition data);
|
||||
|
||||
bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
|
||||
|
||||
bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason);
|
||||
|
||||
/// <summary>
|
||||
@@ -89,21 +87,13 @@ namespace OpenSim.Services.Interfaces
|
||||
/// <returns></returns>
|
||||
bool ReleaseAgent(UUID originRegion, UUID id, string uri);
|
||||
|
||||
/// <summary>
|
||||
/// Close child agent.
|
||||
/// </summary>
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool CloseChildAgent(GridRegion destination, UUID id);
|
||||
|
||||
/// <summary>
|
||||
/// Close agent.
|
||||
/// </summary>
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool CloseAgent(GridRegion destination, UUID id);
|
||||
bool CloseAgent(GridRegion destination, UUID id, string auth_token);
|
||||
|
||||
#endregion Agents
|
||||
|
||||
|
||||
75
OpenSim/Services/Interfaces/IUserProfilesService.cs
Normal file
75
OpenSim/Services/Interfaces/IUserProfilesService.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IUserProfilesService
|
||||
{
|
||||
#region Classifieds
|
||||
OSD AvatarClassifiedsRequest(UUID creatorId);
|
||||
bool ClassifiedUpdate(UserClassifiedAdd ad, ref string result);
|
||||
bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result);
|
||||
bool ClassifiedDelete(UUID recordId);
|
||||
#endregion Classifieds
|
||||
|
||||
#region Picks
|
||||
OSD AvatarPicksRequest(UUID creatorId);
|
||||
bool PickInfoRequest(ref UserProfilePick pick, ref string result);
|
||||
bool PicksUpdate(ref UserProfilePick pick, ref string result);
|
||||
bool PicksDelete(UUID pickId);
|
||||
#endregion Picks
|
||||
|
||||
#region Notes
|
||||
bool AvatarNotesRequest(ref UserProfileNotes note);
|
||||
bool NotesUpdate(ref UserProfileNotes note, ref string result);
|
||||
#endregion Notes
|
||||
|
||||
#region Profile Properties
|
||||
bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result);
|
||||
bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result);
|
||||
#endregion Profile Properties
|
||||
|
||||
#region Interests
|
||||
bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result);
|
||||
#endregion Interests
|
||||
|
||||
#region Utility
|
||||
OSD AvatarImageAssetsRequest(UUID avatarId);
|
||||
#endregion Utility
|
||||
|
||||
#region UserData
|
||||
bool RequestUserAppData(ref UserAppData prop, ref string result);
|
||||
bool SetUserAppData(UserAppData prop, ref string result);
|
||||
#endregion UserData
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.6.*")]
|
||||
[assembly: AssemblyVersion("0.8.0.*")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user