public void Startup(ConfigurationLoader loader) { HomeURI = loader.HomeURI; m_AgentInventoryService = loader.GetService <InventoryServiceInterface>(m_AgentInventoryServiceName); m_AgentAssetService = loader.GetService <AssetServiceInterface>(m_AgentAssetServiceName); if (m_AgentProfileServiceName?.Length != 0) { m_AgentProfileService = loader.GetService <ProfileServiceInterface>(m_AgentProfileServiceName); } m_AgentFriendsService = loader.GetService <FriendsServiceInterface>(m_AgentFriendsServiceName); m_UserSessionService = loader.GetService <UserSessionServiceInterface>(m_UserSessionServiceName); m_GridService = loader.GetService <GridServiceInterface>(m_GridServiceName); if (m_OfflineIMServiceName?.Length != 0) { m_OfflineIMService = loader.GetService <OfflineIMServiceInterface>(m_OfflineIMServiceName); } if (m_AgentExperienceServiceName?.Length != 0) { loader.GetService(m_AgentExperienceServiceName, out m_AgentExperienceService); } if (m_AgentGroupsServiceName?.Length != 0) { loader.GetService(m_AgentGroupsServiceName, out m_AgentGroupsService); } m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_AgentUserAgentService = new LocalUserAgentService(m_UserSessionService, m_UserAccountService, m_RequiresInventoryIDAsIMSessionID, HomeURI); m_Scenes = loader.Scenes; m_Commands = loader.CommandRegistry; m_CapsRedirector = loader.CapsRedirector; m_PacketHandlerPlugins = loader.GetServicesByValue <IProtocolExtender>(); }
public void Startup(ConfigurationLoader loader) { IConfig config = loader.Config.Configs[GetType().FullName]; m_Service = loader.GetService <UserAccountServiceInterface>(config.GetString("ServiceUnderTest")); /* we need the backend service so that we can create the entries we need for testing */ m_Backend = loader.GetService <UserAccountServiceInterface>(config.GetString("Backend")); }
public void Startup(ConfigurationLoader loader) { IConfig config = loader.Config.Configs[GetType().FullName]; m_UserSessionService = loader.GetService <UserSessionServiceInterface>(config.GetString("UserSessionService", "UserSessionService")); m_UserAccountService = loader.GetService <UserAccountServiceInterface>(config.GetString("UserAccountService", "UserAccountService")); m_UserID = new UGUIWithName(config.GetString("User")); m_SessionID = new UUID(config.GetString("SessionID")); m_SecureSessionID = new UUID(config.GetString("SecureSessionID")); m_ClientIPAddress = config.GetString("ClientIPAddress"); }
public LocalUserAgentService( UserSessionServiceInterface userSessionService, UserAccountServiceInterface userAccountService, bool requiresInventoryIDAsIMSessionID, string baseuri) { m_BaseURI = baseuri; m_UserSessionService = userSessionService; m_UserAccountService = userAccountService; RequiresInventoryIDAsIMSessionID = requiresInventoryIDAsIMSessionID; }
public StandalonePresenceService( UserAccountServiceInterface userAccountService, UGUI user, UserSessionServiceInterface userSessionService, UUID sessionID, List <IUserSessionStatusHandler> UserSessionStatusServices) { m_UserAccountService = userAccountService; m_User = user; m_UserSessionService = userSessionService; m_SessionID = sessionID; m_UserSessionStatusServices = UserSessionStatusServices; }
public void Startup(ConfigurationLoader loader) { m_UserSessionService = loader.GetService <UserSessionServiceInterface>(m_UserSessionServiceName); m_OfflineIMService = loader.GetService <OfflineIMServiceInterface>(m_OfflineIMServiceName); m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_HttpServer = loader.HttpServer; m_HttpServer.StartsWithUriHandlers.Add("/UserCAPS/ReadOfflineMsgs/", CapsHandler); if (loader.TryGetHttpsServer(out m_HttpsServer)) { m_HttpsServer.StartsWithUriHandlers.Add("/UserCAPS/ReadOfflineMsgs/", CapsHandler); } }
public void Startup(ConfigurationLoader loader) { m_UserSessionService = loader.GetService <UserSessionServiceInterface>(m_UserSessionServiceName); m_InventoryService = loader.GetService <InventoryServiceInterface>(m_InventoryServiceName); m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_HttpServer = loader.HttpServer; m_HttpServer.StartsWithUriHandlers.Add("/UserCAPS/FetchInventoryDescendents2/", CapsHandler); if (loader.TryGetHttpsServer(out m_HttpsServer)) { m_HttpsServer.StartsWithUriHandlers.Add("/UserCAPS/FetchInventoryDescendents2/", CapsHandler); } }
public void Startup(ConfigurationLoader loader) { m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_InventoryService = loader.GetService <InventoryServiceInterface>(m_InventoryServiceName); m_AccountDeleteServices = loader.GetServicesByValue <IUserAccountDeleteServiceInterface>(); m_AuthInfoService = loader.GetService <AuthInfoServiceInterface>(m_AuthInfoServiceName); m_ServiceURLsGetters = loader.GetServicesByValue <IServiceURLsGetInterface>(); loader.CommandRegistry.AddCreateCommand("user", CreateUserCommand); loader.CommandRegistry.AddDeleteCommand("user", DeleteUserCommand); loader.CommandRegistry.AddChangeCommand("user", ChangeUserCommand); loader.CommandRegistry.AddShowCommand("user", ShowUserCommand); loader.CommandRegistry.AddShowCommand("serviceurls", ShowServiceUrlsCommand); loader.CommandRegistry.AddResetCommand("user", ResetUserPasswordCommand); }
public void Startup(ConfigurationLoader loader) { loader.CommandRegistry.AddSaveCommand("iar", SaveIarCommand); loader.CommandRegistry.AddLoadCommand("iar", LoadIarCommand); m_AuthInfoService = loader.GetService <AuthInfoServiceInterface>(m_AuthInfoServiceName); m_AssetService = loader.GetService <AssetServiceInterface>(m_AssetServiceName); m_InventoryService = loader.GetService <InventoryServiceInterface>(m_InventoryServiceName); m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); foreach (string avatarNameService in m_AvatarNameServiceNames.Split(',')) { if (!string.IsNullOrEmpty(avatarNameService)) { m_AvatarNameServices.Add(loader.GetService <AvatarNameServiceInterface>(avatarNameService)); } } }
public void Startup(ConfigurationLoader loader) { m_AccountDeleteServices = loader.GetServicesByValue <IUserAccountDeleteServiceInterface>(); m_UserAccountService = loader.GetService <UserAccountServiceInterface>(m_UserAccountServiceName); m_AuthInfoService = loader.GetService <AuthInfoServiceInterface>(m_AuthInfoServiceName); var webif = loader.GetAdminWebIF(); m_WebIF = webif; webif.ModuleNames.Add("useraccounts"); webif.AutoGrantRights["useraccounts.manage"].Add("useraccounts.view"); webif.AutoGrantRights["useraccounts.delete"].Add("useraccounts.view"); webif.AutoGrantRights["useraccounts.create"].Add("useraccounts.view"); webif.JsonMethods.Add("useraccounts.search", HandleUserAccountSearch); webif.JsonMethods.Add("useraccount.get", HandleUserAccountGet); webif.JsonMethods.Add("useraccount.change", HandleUserAccountChange); webif.JsonMethods.Add("useraccount.delete", HandleUserAccountDelete); webif.JsonMethods.Add("useraccount.changepassword", HandleUserAccountChangePassword); webif.JsonMethods.Add("useraccount.create", HandleUserAccountCreate); }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_Loader = loader; m_GatekeeperURI = loader.GatekeeperURI; IConfig config = loader.Config.Configs[GetType().FullName]; /* we use same asset id keying here so to make them compatible with the other scripts */ foreach (string key in config.GetKeys()) { if (UUID.TryParse(key, out m_AssetID)) { m_ScriptFile = config.GetString(key); break; } } m_ObjectPermissionsBase = GetPermissions(config, "ObjectPermisionsBase"); m_ObjectPermissionsOwner = GetPermissions(config, "ObjectPermisionsOwner"); m_ObjectPermissionsGroup = GetPermissions(config, "ObjectPermisionsGroup"); m_ObjectPermissionsNext = GetPermissions(config, "ObjectPermisionsNext"); m_ObjectPermissionsEveryone = GetPermissions(config, "ObjectPermisionsEveryone"); m_ScriptPermissionsBase = GetPermissions(config, "ScriptPermisionsBase"); m_ScriptPermissionsOwner = GetPermissions(config, "ScriptPermisionsOwner"); m_ScriptPermissionsGroup = GetPermissions(config, "ScriptPermisionsGroup"); m_ScriptPermissionsNext = GetPermissions(config, "ScriptPermisionsNext"); m_ScriptPermissionsEveryone = GetPermissions(config, "ScriptPermisionsEveryone"); m_LoadOarFileName = config.GetString("OarFilename", string.Empty); m_TimeoutMs = config.GetInt("RunTimeout", 1000); m_RegionID = UUID.Parse(config.GetString("RegionID")); m_RegionOwner = new UGUIWithName(config.GetString("RegionOwner")) { IsAuthoritative = true }; m_EstateOwner = new UGUIWithName(config.GetString("EstateOwner", m_RegionOwner.ToString())) { IsAuthoritative = true }; m_EstateID = (uint)config.GetInt("EstateID", 100); m_EstateName = config.GetString("EstateName", "My Estate"); m_ObjectID = UUID.Parse(config.GetString("ID", UUID.Random.ToString())); m_RegionName = config.GetString("RegionName", "Testing Region"); m_ProductName = config.GetString("RegionProductName", "Mainland"); m_RegionLocation = new GridVector(config.GetString("RegionLocation", "10000,10000"), 256); m_RegionSize = new GridVector(config.GetString("RegionSize", "1,1"), 256); m_RegionAccess = (RegionAccess)Enum.Parse(typeof(RegionAccess), config.GetString("RegionAccess", "PG")); m_RegionPort = config.GetInt("RegionPort", 9300); m_Runner = loader.GetServicesByValue <TestRunner>()[0]; m_Position = Vector3.Parse(config.GetString("Position", "<128, 128, 23>")); m_Rotation = Quaternion.Parse(config.GetString("Rotation", "<0,0,0,1>")); m_ItemID = UUID.Parse(config.GetString("ScriptItemID", UUID.Random.ToString())); m_RezzingObjID = UUID.Parse(config.GetString("RezzingObjectID", UUID.Zero.ToString())); m_ObjectName = config.GetString("ObjectName", "Object"); m_ScriptName = config.GetString("ScriptName", "Script"); string experienceName = config.GetString("ExperienceName", "My Experience"); UUID experienceID; UUID.TryParse(config.GetString("ExperienceID", UUID.Zero.ToString()), out experienceID); m_ExperienceID = new UEI(experienceID, experienceName, null); m_ObjectDescription = config.GetString("ObjectDescription", ""); m_ScriptDescription = config.GetString("ScriptDescription", ""); m_RegionStorage = loader.GetService <GridServiceInterface>("RegionStorage"); m_SceneFactory = loader.GetService <SceneFactoryInterface>("DefaultSceneImplementation"); m_EstateService = loader.GetService <EstateServiceInterface>("EstateService"); m_AvatarNameService = loader.GetService <AvatarNameServiceInterface>("AvatarNameStorage"); m_UserAccountService = loader.GetService <UserAccountServiceInterface>("UserAccountService"); m_AvatarNameService.Store(m_RegionOwner); m_AvatarNameService.Store(m_EstateOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_RegionOwner, IsLocalToGrid = true, }); } catch { m_Log.Info("UserAccount creation failed for RegionOwner"); } if (!m_EstateOwner.EqualsGrid(m_RegionOwner)) { try { m_UserAccountService.Add(new UserAccount { Principal = m_RegionOwner, IsLocalToGrid = true, }); } catch { m_Log.Info("UserAccount creation failed for EstateOwner"); } } m_ObjectOwner = new UGUIWithName(config.GetString("ObjectOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectOwner); if (config.Contains("ObjectCreator")) { m_ObjectCreator = new UGUIWithName(config.GetString("ObjectCreator")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectCreator); try { m_UserAccountService.Add(new UserAccount { Principal = m_ObjectCreator, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ObjectCreator = m_ObjectOwner; } if (config.Contains("ObjectLastOwner")) { m_ObjectLastOwner = new UGUIWithName(config.GetString("ObjectLastOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectLastOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_ObjectLastOwner, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ObjectLastOwner = m_ObjectOwner; } m_ScriptOwner = new UGUIWithName(config.GetString("ScriptOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptOwner); if (config.Contains("ScriptCreator")) { m_ScriptCreator = new UGUIWithName(config.GetString("ScriptCreator")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptCreator); try { m_UserAccountService.Add(new UserAccount { Principal = m_ScriptCreator, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ScriptCreator = m_ScriptOwner; } if (config.Contains("ScriptLastOwner")) { m_ScriptLastOwner = new UGUIWithName(config.GetString("ScriptLastOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptLastOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_ScriptLastOwner, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ScriptLastOwner = m_ScriptOwner; } m_StartParameter = config.GetInt("StartParameter", 0); if (string.IsNullOrEmpty(m_ScriptFile)) { throw new ArgumentException("Script filename and UUID missing"); } m_AdditionalObjectConfigs = config.GetString("AdditionalObjects", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (m_AdditionalObjectConfigs.Length == 1 && m_AdditionalObjectConfigs[0] == string.Empty) { m_AdditionalObjectConfigs = new string[0]; } m_AdditionalInventoryConfigs = config.GetString("AdditionalInventories", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (m_AdditionalInventoryConfigs.Length == 1 && m_AdditionalInventoryConfigs[0] == string.Empty) { m_AdditionalInventoryConfigs = new string[0]; } m_AssetSourcesConfig = config.GetString("AssetSources", string.Empty); m_ScriptStatesConfig = config.GetString("ScriptStates", string.Empty); CompilerRegistry.ScriptCompilers.DefaultCompilerName = config.GetString("DefaultCompiler"); }