/* * Copyright (c) 2024 ETH Zürich, IT Services * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ using System; using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.DataFormats; using SafeExamBrowser.Configuration.Contracts.DataResources; using SafeExamBrowser.Settings; namespace SafeExamBrowser.Configuration.Contracts { /// /// The repository which controls the loading and saving of configuration data. /// public interface IConfigurationRepository { /// /// Attempts to save the given resource as local client configuration. /// SaveStatus ConfigureClientWith(Uri resource, PasswordParameters password = null); /// /// Initializes the global configuration information for the currently running application instance. /// AppConfig InitializeAppConfig(); /// /// Initializes all relevant configuration data for a new session. /// SessionConfiguration InitializeSessionConfiguration(); /// /// Loads the default settings. /// AppSettings LoadDefaultSettings(); /// /// Registers the specified to be used to parse configuration data. /// void Register(IDataParser parser); /// /// Registers the specified to be used to serialize configuration data. /// void Register(IDataSerializer serializer); /// /// Registers the specified to be used to load configuration resources. /// void Register(IResourceLoader loader); /// /// Registers the specified to be used to save configuration resources. /// void Register(IResourceSaver saver); /// /// Attempts to load settings from the specified resource. /// LoadStatus TryLoadSettings(Uri resource, out AppSettings settings, PasswordParameters password = null); } }