From b5eaea7b0c627c55544f4099b50e9ac1a504fe17 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 2 Oct 2007 00:00:12 +0000 Subject: * Moved setup of LocalInventoryService and LocalUserServices to the app layer * Killed off 'parent' relation from LocalUserServices to CommunicationsLocal * Deleted obsolete project InventoryServiceBase * Deleted superfluous createCol function --- OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 8 ++------ OpenSim/Region/Communications/Local/LocalUserServices.cs | 14 +++++++------- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index a00b35f..76814cf 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -39,15 +39,13 @@ namespace OpenSim.Region.Communications.Local { public class CommunicationsLocal : CommunicationsManager { - public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) + public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings, LocalUserServices userService) : base(serversInfo, httpServer, assetCache) { LocalInventoryService inventoryService = new LocalInventoryService(); inventoryService.AddPlugin(settings.InventoryPlugin); m_inventoryService = inventoryService; - LocalUserServices userService = new LocalUserServices(this, serversInfo); - userService.AddPlugin(settings.UserDatabasePlugin); m_userService = userService; LocalBackEndServices backendService = new LocalBackEndServices(); @@ -118,14 +116,12 @@ namespace OpenSim.Region.Communications.Local public string WelcomeMessage; public bool AccountAuthentication = false; public string InventoryPlugin; - public string UserDatabasePlugin; - public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin) + public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin) { WelcomeMessage = welcomeMessage; AccountAuthentication = accountsAuthenticate; InventoryPlugin = inventoryPlugin; - UserDatabasePlugin = userPlugin; } } diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 3bc4301..9e81fb8 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -8,20 +8,20 @@ namespace OpenSim.Region.Communications.Local { public class LocalUserServices : UserManagerBase { - private readonly CommunicationsLocal m_parent; - private readonly NetworkServersInfo m_serversInfo; private readonly uint m_defaultHomeX; private readonly uint m_defaultHomeY; + private IInventoryServices m_inventoryService; - public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) + public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, IInventoryServices inventoryService) { - m_parent = parent; m_serversInfo = serversInfo; - m_defaultHomeX = m_serversInfo.DefaultHomeLocX; - m_defaultHomeY = m_serversInfo.DefaultHomeLocY; + m_defaultHomeX = defaultHomeLocX; + m_defaultHomeY = defaultHomeLocY; + + m_inventoryService = inventoryService; } public override UserProfileData SetupMasterUser(string firstName, string lastName) @@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Local } else { - m_parent.InventoryService.CreateNewUserInventory(profile.UUID); + m_inventoryService.CreateNewUserInventory(profile.UUID); } return profile; -- cgit v1.1