public HGCommunicationsStandalone(
     ConfigSettings configSettings,                          
     NetworkServersInfo serversInfo,
     BaseHttpServer httpServer,
     HGGridServices gridService, 
     LibraryRootFolder libraryRootFolder, 
     bool dumpAssetsToFile)
     : base(serversInfo, libraryRootFolder)
 {           
     LocalUserServices localUserService =
         new LocalUserServices(
             serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
     localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); 
     
     HGUserServices hgUserService = new HGUserServices(this, localUserService);
     // This plugin arrangement could eventually be configurable rather than hardcoded here.
     hgUserService.AddPlugin(new TemporaryUserProfilePlugin());
     hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService));
     
     m_userService = hgUserService;            
     m_userAdminService = hgUserService;            
     m_avatarService = hgUserService;
     m_messageService = hgUserService;
     
     gridService.UserProfileCache = m_userProfileCacheService;
     m_gridService = gridService;                        
 }
Ejemplo n.º 2
0
        public HGCommunicationsStandalone(
            ConfigSettings configSettings,
            NetworkServersInfo serversInfo,
            BaseHttpServer httpServer,
            IAssetCache assetCache,
            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);

            HGInventoryServiceClient inventoryService
                = new HGInventoryServiceClient(serversInfo.InventoryURL, null, false);
            List <IInventoryDataPlugin> plugins
                = DataPluginFactory.LoadDataPlugins <IInventoryDataPlugin>(
                      configSettings.StandaloneInventoryPlugin,
                      configSettings.StandaloneInventorySource);

            foreach (IInventoryDataPlugin plugin in plugins)
            {
                // Using the OSP wrapper plugin should be made configurable at some point
                inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
            }

            AddInventoryService(inventoryService);
            m_defaultInventoryHost            = inventoryService.Host;
            m_interServiceInventoryService    = inventoryService;
            inventoryService.UserProfileCache = UserProfileCacheService;

            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 TemporaryUserProfilePlugin());
            hgUserService.AddPlugin(new OGS1UserDataPlugin(this));

            m_userService      = hgUserService;
            m_userAdminService = hgUserService;
            m_avatarService    = hgUserService;
            m_messageService   = hgUserService;

            gridService.UserProfileCache = m_userProfileCacheService;
            m_gridService = gridService;
        }