Merge branch 'master' into careminster-presence-refactor
commit
b9c20fbaa7
|
@ -55,6 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
private IImprovedAssetCache m_cache;
|
private IImprovedAssetCache m_cache;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -73,8 +74,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianAssetServiceConnector() { }
|
public SimianAssetServiceConnector() { }
|
||||||
public string Name { get { return "SimianAssetServiceConnector"; } }
|
public string Name { get { return "SimianAssetServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAssetService>(this); } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAssetService>(this); } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } }
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
|
||||||
|
@ -85,20 +86,30 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["AssetService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("AssetServerURI");
|
string name = moduleConfig.GetString("AssetServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["AssetService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("AssetServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector");
|
||||||
|
else
|
||||||
|
m_Enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IAssetService
|
#region IAssetService
|
||||||
|
|
|
@ -51,6 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -61,8 +62,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianAuthenticationServiceConnector() { }
|
public SimianAuthenticationServiceConnector() { }
|
||||||
public string Name { get { return "SimianAuthenticationServiceConnector"; } }
|
public string Name { get { return "SimianAuthenticationServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAuthenticationService>(this); } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAuthenticationService>(this); } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } }
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
|
||||||
|
@ -73,20 +74,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["AuthenticationService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
|
string name = moduleConfig.GetString("AuthenticationServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["AuthenticationService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Authenticate(UUID principalID, string password, int lifetime)
|
public string Authenticate(UUID principalID, string password, int lifetime)
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
// private static string ZeroID = UUID.Zero.ToString();
|
// private static string ZeroID = UUID.Zero.ToString();
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -66,8 +67,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianAvatarServiceConnector() { }
|
public SimianAvatarServiceConnector() { }
|
||||||
public string Name { get { return "SimianAvatarServiceConnector"; } }
|
public string Name { get { return "SimianAvatarServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAvatarService>(this); } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAvatarService>(this); } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAvatarService>(this); } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAvatarService>(this); } }
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
|
||||||
|
@ -78,20 +79,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["AvatarService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("AvatarServerURI");
|
string name = moduleConfig.GetString("AvatarServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["AvatarService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("AvatarServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IAvatarService
|
#region IAvatarService
|
||||||
|
|
|
@ -46,8 +46,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stores and retrieves friend lists from the SimianGrid backend
|
/// Stores and retrieves friend lists from the SimianGrid backend
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
public class SimianFriendsServiceConnector : IFriendsService
|
||||||
public class SimianFriendsServiceConnector : IFriendsService, ISharedRegionModule
|
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
|
@ -55,20 +54,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
|
||||||
|
|
||||||
public Type ReplaceableInterface { get { return null; } }
|
|
||||||
public void RegionLoaded(Scene scene) { }
|
|
||||||
public void PostInitialise() { }
|
|
||||||
public void Close() { }
|
|
||||||
|
|
||||||
public SimianFriendsServiceConnector() { }
|
|
||||||
public string Name { get { return "SimianFriendsServiceConnector"; } }
|
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IFriendsService>(this); } }
|
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IFriendsService>(this); } }
|
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
|
||||||
|
|
||||||
public SimianFriendsServiceConnector(IConfigSource source)
|
public SimianFriendsServiceConnector(IConfigSource source)
|
||||||
{
|
{
|
||||||
Initialise(source);
|
Initialise(source);
|
||||||
|
|
|
@ -60,6 +60,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -72,21 +73,25 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
public string Name { get { return "SimianGridServiceConnector"; } }
|
public string Name { get { return "SimianGridServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
if (!m_Enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
// Every shared region module has to maintain an indepedent list of
|
// Every shared region module has to maintain an indepedent list of
|
||||||
// currently running regions
|
// currently running regions
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
m_scenes[scene.RegionInfo.RegionID] = scene;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(m_serverUrl))
|
scene.RegisterModuleInterface<IGridService>(this);
|
||||||
scene.RegisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
}
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
if (!m_Enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
m_scenes.Remove(scene.RegionInfo.RegionID);
|
m_scenes.Remove(scene.RegionInfo.RegionID);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(m_serverUrl))
|
scene.UnregisterModuleInterface<IGridService>(this);
|
||||||
scene.UnregisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
@ -98,20 +103,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["GridService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("GridServerURI");
|
string name = moduleConfig.GetString("GridServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["GridService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("GridServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
|
|
@ -70,6 +70,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
private string m_userServerUrl = String.Empty;
|
private string m_userServerUrl = String.Empty;
|
||||||
// private object m_gestureSyncRoot = new object();
|
// private object m_gestureSyncRoot = new object();
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -80,8 +81,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianInventoryServiceConnector() { }
|
public SimianInventoryServiceConnector() { }
|
||||||
public string Name { get { return "SimianInventoryServiceConnector"; } }
|
public string Name { get { return "SimianInventoryServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IInventoryService>(this); } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IInventoryService>(this); } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IInventoryService>(this); } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IInventoryService>(this); } }
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
|
||||||
|
@ -92,30 +93,41 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["InventoryService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("InventoryServerURI");
|
string name = moduleConfig.GetString("InventoryServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["InventoryService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
|
||||||
m_serverUrl = serviceUrl;
|
|
||||||
|
|
||||||
gridConfig = source.Configs["UserAccountService"];
|
|
||||||
if (gridConfig != null)
|
if (gridConfig != null)
|
||||||
{
|
{
|
||||||
serviceUrl = gridConfig.GetString("UserAccountServerURI");
|
string serviceUrl = gridConfig.GetString("InventoryServerURI");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
m_userServerUrl = serviceUrl;
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
|
||||||
|
gridConfig = source.Configs["UserAccountService"];
|
||||||
|
if (gridConfig != null)
|
||||||
|
{
|
||||||
|
serviceUrl = gridConfig.GetString("UserAccountServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
m_userServerUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector");
|
||||||
|
else if (String.IsNullOrEmpty(m_userServerUrl))
|
||||||
|
m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector");
|
|
||||||
else if (String.IsNullOrEmpty(m_userServerUrl))
|
|
||||||
m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
private SimianActivityDetector m_activityDetector;
|
private SimianActivityDetector m_activityDetector;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
public string Name { get { return "SimianPresenceServiceConnector"; } }
|
public string Name { get { return "SimianPresenceServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(m_serverUrl))
|
if (m_Enabled)
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IPresenceService>(this);
|
scene.RegisterModuleInterface<IPresenceService>(this);
|
||||||
scene.RegisterModuleInterface<IGridUserService>(this);
|
scene.RegisterModuleInterface<IGridUserService>(this);
|
||||||
|
@ -83,7 +84,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
}
|
}
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(m_serverUrl))
|
if (m_Enabled)
|
||||||
{
|
{
|
||||||
scene.UnregisterModuleInterface<IPresenceService>(this);
|
scene.UnregisterModuleInterface<IPresenceService>(this);
|
||||||
scene.UnregisterModuleInterface<IGridUserService>(this);
|
scene.UnregisterModuleInterface<IGridUserService>(this);
|
||||||
|
@ -103,20 +104,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["PresenceService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("PresenceServerURI");
|
string name = moduleConfig.GetString("PresenceServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["PresenceService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("PresenceServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IPresenceService
|
#region IPresenceService
|
||||||
|
|
|
@ -67,6 +67,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region INonSharedRegionModule
|
#region INonSharedRegionModule
|
||||||
|
|
||||||
|
@ -76,8 +77,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianProfiles() { }
|
public SimianProfiles() { }
|
||||||
public string Name { get { return "SimianProfiles"; } }
|
public string Name { get { return "SimianProfiles"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } }
|
||||||
|
|
||||||
#endregion INonSharedRegionModule
|
#endregion INonSharedRegionModule
|
||||||
|
|
||||||
|
@ -88,6 +89,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
IConfig profileConfig = source.Configs["Profile"];
|
||||||
|
if (profileConfig == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (profileConfig.GetString("Module", String.Empty) != Name)
|
||||||
|
return;
|
||||||
|
|
||||||
IConfig gridConfig = source.Configs["UserAccountService"];
|
IConfig gridConfig = source.Configs["UserAccountService"];
|
||||||
if (gridConfig != null)
|
if (gridConfig != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_serverUrl = String.Empty;
|
||||||
private ExpiringCache<UUID, UserAccount> m_accountCache;
|
private ExpiringCache<UUID, UserAccount> m_accountCache;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
|
@ -65,8 +66,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public SimianUserAccountServiceConnector() { }
|
public SimianUserAccountServiceConnector() { }
|
||||||
public string Name { get { return "SimianUserAccountServiceConnector"; } }
|
public string Name { get { return "SimianUserAccountServiceConnector"; } }
|
||||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IUserAccountService>(this); } }
|
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IUserAccountService>(this); } }
|
||||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IUserAccountService>(this); } }
|
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IUserAccountService>(this); } }
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
#endregion ISharedRegionModule
|
||||||
|
|
||||||
|
@ -77,20 +78,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["UserAccountService"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (gridConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("UserAccountServerURI");
|
string name = moduleConfig.GetString("UserAccountServices", "");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
if (name == Name)
|
||||||
{
|
{
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
IConfig gridConfig = source.Configs["UserAccountService"];
|
||||||
serviceUrl = serviceUrl + '/';
|
if (gridConfig != null)
|
||||||
m_serverUrl = serviceUrl;
|
{
|
||||||
|
string serviceUrl = gridConfig.GetString("UserAccountServerURI");
|
||||||
|
if (!String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_serverUrl = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(m_serverUrl))
|
||||||
|
m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
|
||||||
m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
||||||
|
|
Loading…
Reference in New Issue