From 342126b7b9ca386f9160daecb51ecc14487a5f9f Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 22 Apr 2009 22:19:43 +0000 Subject: * Resolve http://opensimulator.org/mantis/view.php?id=3509 by putting some service initialization into CommsManager * What is really needed is a plugin and interface request system as being done for region modules --- .../Hypergrid/HGCommunicationsStandalone.cs | 37 +++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs') diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index b649a91..126f42b 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs @@ -25,32 +25,53 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Communications.Local; +using OpenSim.Region.Communications.OGS1; namespace OpenSim.Region.Communications.Hypergrid { - public class HGCommunicationsStandalone : CommunicationsLocal + public class HGCommunicationsStandalone : CommunicationsManager { public HGCommunicationsStandalone( + ConfigSettings configSettings, NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache, - IUserService userService, - IUserAdminService userServiceAdmin, LocalInventoryService inventoryService, - HGGridServices gridService, IMessagingService messageService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) - : base(serversInfo, httpServer, assetCache, userService, userServiceAdmin, inventoryService, gridService, messageService, libraryRootFolder, dumpAssetsToFile) - { - gridService.UserProfileCache = m_userProfileCacheService; + HGGridServices gridService, + LibraryRootFolder libraryRootFolder, + bool dumpAssetsToFile) + : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) + { + LocalUserServices localUserService = + new LocalUserServices( + serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); + localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); + + AddInventoryService(inventoryService); + m_defaultInventoryHost = inventoryService.Host; + m_interServiceInventoryService = inventoryService; + m_assetCache = assetCache; // Let's swap to always be secure access to inventory AddSecureInventoryService((ISecureInventoryService)inventoryService); m_inventoryServices = null; + + HGUserServices hgUserService = new HGUserServices(this, localUserService); + // This plugin arrangement could eventually be configurable rather than hardcoded here. + hgUserService.AddPlugin(new OGS1UserDataPlugin(this)); + + m_userService = hgUserService; + m_userAdminService = hgUserService; + m_avatarService = hgUserService; + m_messageService = hgUserService; + + gridService.UserProfileCache = m_userProfileCacheService; + m_gridService = gridService; } } } -- cgit v1.1