public TestCommunicationsManager(NetworkServersInfo serversInfo) : base(serversInfo, new BaseHttpServer(666), null, false, null) { SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin()); m_assetCache = new AssetCache(assetService); LocalInventoryService lis = new LocalInventoryService(); m_inventoryDataPlugin = new TestInventoryDataPlugin(); lis.AddPlugin(m_inventoryDataPlugin); m_interServiceInventoryService = lis; AddInventoryService(lis); LocalUserServices lus = new LocalUserServices(991, 992, this); lus.AddPlugin(new TemporaryUserProfilePlugin()); m_userDataPlugin = new TestUserDataPlugin(); lus.AddPlugin(m_userDataPlugin); m_userService = lus; m_userAdminService = lus; LocalBackEndServices gs = new LocalBackEndServices(); m_gridService = gs; }
/// <summary> /// Create a test user with a standard inventory /// </summary> /// <param name="commsManager"></param> /// <param name="userId">Explicit user id to use for user creation</param> /// <returns></returns> public static CachedUserInfo CreateUserWithInventory(CommunicationsManager commsManager, UUID userId) { LocalUserServices lus = (LocalUserServices)commsManager.UserService; lus.AddUser("Bill", "Bailey", "troll", "*****@*****.**", 1000, 1000, userId); CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); userInfo.FetchInventory(); return(userInfo); }
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; }
public void SetUpLoginEnviroment() { m_capsEndPoint = new IPEndPoint(IPAddress.Loopback, 9123); m_commsManager = new TestCommunicationsManager(new NetworkServersInfo(42, 43)); m_regionConnector = new TestLoginToRegionConnector(); m_regionConnector.AddRegion(new RegionInfo(42, 43, m_capsEndPoint, m_regionExternalName)); m_localUserServices = (LocalUserServices)m_commsManager.UserService; m_localUserServices.AddUser(m_firstName, m_lastName, "boingboing", "*****@*****.**", 42, 43); m_loginService = new LLStandaloneLoginService((UserManagerBase)m_localUserServices, "Hello folks", new TestInventoryService(), m_commsManager.NetworkServersInfo, true, new LibraryRootFolder(String.Empty), m_regionConnector); m_userProfileData = m_localUserServices.GetUserProfile(m_firstName, m_lastName); }
// Constructor called when running in standalone public HGUserServices(CommunicationsManager commsManager, LocalUserServices local) : base(commsManager) { m_localUserServices = local; }