From b6c48c53b21df9dbde4549bced938089f43ed1f0 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 16 Aug 2007 11:24:40 +0000 Subject: Can now set the plugins for standalone mode's Inventory database (default sqlite) and for its user database (default DB4o). Currently changing the user plugin to MySql should work (if you have MySql setup (should be same as for grid mode). There is also a MySql provider for the inventory but not 100% certain if that is finished and functional (will need to check with Adam on that). --- .../Communications/Local/CommunicationsLocal.cs | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 9ff9133..66779a2 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -44,16 +44,19 @@ namespace OpenSim.Region.Communications.Local public LocalLoginService LoginServices; public LocalInventoryService InvenServices; // public CAPSService CapsServices; + private LocalSettings m_settings; - public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage ) + public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings ) : base(serversInfo, httpServer, assetCache) { + m_settings = settings; + InvenServices = new LocalInventoryService(); - InvenServices.AddPlugin("OpenSim.Framework.Data.SQLite.dll"); + InvenServices.AddPlugin(m_settings.InventoryPlugin); InventoryServer = InvenServices; UserServices = new LocalUserServices(this, serversInfo); - UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); + UserServices.AddPlugin(m_settings.UserDatabasePlugin); UserServer = UserServices; InstanceServices = new LocalBackEndServices(); @@ -62,7 +65,7 @@ namespace OpenSim.Region.Communications.Local //CapsServices = new CAPSService(httpServer); - LoginServices = new LocalLoginService(UserServices, welcomeMessage, this, serversInfo, accountsAuthenticate); + LoginServices = new LocalLoginService(UserServices, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication); httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); } @@ -101,5 +104,27 @@ namespace OpenSim.Region.Communications.Local } } + public class LocalSettings + { + public string WelcomeMessage = ""; + public bool AccountAuthentication = false; + public string InventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; + public string UserDatabasePlugin = "OpenSim.Framework.Data.DB4o.dll"; + + public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin) + { + WelcomeMessage = welcomeMessage; + AccountAuthentication = accountsAuthenticate; + if (inventoryPlugin != "") + { + InventoryPlugin = inventoryPlugin; + } + if (userPlugin != "") + { + UserDatabasePlugin = userPlugin; + } + } + } + } } -- cgit v1.1