more refactoring
parent
9b1eefbcde
commit
652654176a
|
@ -159,17 +159,24 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_sandbox)
|
if (m_sandbox)
|
||||||
{
|
{
|
||||||
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate);
|
|
||||||
|
|
||||||
LocalInventoryService inventoryService = new LocalInventoryService();
|
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||||
inventoryService.AddPlugin(standaloneInventoryPlugin);
|
inventoryService.AddPlugin(standaloneInventoryPlugin);
|
||||||
|
|
||||||
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService );
|
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService );
|
||||||
userService.AddPlugin( standaloneUserPlugin );
|
userService.AddPlugin( standaloneUserPlugin );
|
||||||
|
|
||||||
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService, inventoryService);
|
LocalBackEndServices backendService = new LocalBackEndServices();
|
||||||
|
|
||||||
|
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, backendService, backendService);
|
||||||
m_commsManager = localComms;
|
m_commsManager = localComms;
|
||||||
|
|
||||||
|
|
||||||
|
LocalLoginService loginService = new LocalLoginService(userService, standaloneWelcomeMessage, localComms, m_networkServersInfo, standaloneAuthenticate);
|
||||||
|
loginService.OnLoginToRegion += backendService.AddNewSession;
|
||||||
|
|
||||||
|
m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
|
||||||
|
|
||||||
|
|
||||||
if (standaloneAuthenticate)
|
if (standaloneAuthenticate)
|
||||||
{
|
{
|
||||||
this.CreateAccount = localComms.doCreate;
|
this.CreateAccount = localComms.doCreate;
|
||||||
|
|
|
@ -39,34 +39,14 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
public class CommunicationsLocal : CommunicationsManager
|
public class CommunicationsLocal : CommunicationsManager
|
||||||
{
|
{
|
||||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings, LocalUserServices userService, LocalInventoryService inventoryService)
|
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalUserServices userService, LocalInventoryService inventoryService, IInterRegionCommunications interRegionService, IGridServices gridService)
|
||||||
: base(serversInfo, httpServer, assetCache)
|
: base(serversInfo, httpServer, assetCache)
|
||||||
{
|
{
|
||||||
m_inventoryService = inventoryService;
|
m_inventoryService = inventoryService;
|
||||||
m_userService = userService;
|
m_userService = userService;
|
||||||
|
m_gridService = gridService;
|
||||||
|
m_interRegion = interRegionService;
|
||||||
|
|
||||||
LocalBackEndServices backendService = new LocalBackEndServices();
|
|
||||||
m_gridService = backendService;
|
|
||||||
m_interRegion = backendService;
|
|
||||||
|
|
||||||
LocalLoginService loginService = new LocalLoginService(userService, settings.WelcomeMessage, this, serversInfo, settings.AccountAuthentication);
|
|
||||||
loginService.OnLoginToRegion += backendService.AddNewSession;
|
|
||||||
|
|
||||||
httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class LocalSettings
|
|
||||||
{
|
|
||||||
public string WelcomeMessage;
|
|
||||||
public bool AccountAuthentication = false;
|
|
||||||
|
|
||||||
public LocalSettings(string welcomeMessage, bool accountsAuthenticate)
|
|
||||||
{
|
|
||||||
WelcomeMessage = welcomeMessage;
|
|
||||||
AccountAuthentication = accountsAuthenticate;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
m_defaultHomeY = defaultHomeLocY;
|
m_defaultHomeY = defaultHomeLocY;
|
||||||
|
|
||||||
m_inventoryService = inventoryService;
|
m_inventoryService = inventoryService;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData SetupMasterUser(string firstName, string lastName)
|
public override UserProfileData SetupMasterUser(string firstName, string lastName)
|
||||||
|
|
|
@ -41,12 +41,17 @@ namespace SimpleApp
|
||||||
{
|
{
|
||||||
base.StartUp();
|
base.StartUp();
|
||||||
|
|
||||||
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false);
|
|
||||||
|
|
||||||
LocalInventoryService inventoryService = new LocalInventoryService();
|
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||||
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService);
|
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService);
|
||||||
|
LocalBackEndServices backendService = new LocalBackEndServices();
|
||||||
|
|
||||||
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService, inventoryService );
|
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, backendService, backendService);
|
||||||
|
m_commsManager = localComms;
|
||||||
|
|
||||||
|
LocalLoginService loginService = new LocalLoginService(userService, "", localComms, m_networkServersInfo, false);
|
||||||
|
loginService.OnLoginToRegion += backendService.AddNewSession;
|
||||||
|
|
||||||
|
m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
|
||||||
|
|
||||||
m_log.Notice(m_log.LineInfo);
|
m_log.Notice(m_log.LineInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue