/*
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
*
* 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;
namespace SafeExamBrowser.Contracts.Configuration
{
///
/// The repository which controls the loading and initializing of configuration data.
///
public interface IConfigurationRepository
{
///
/// The global configuration information for the currently running application instance.
///
AppConfig AppConfig { get; }
///
/// Retrieves the current session data, i.e. the last one which was initialized. If no session has been initialized yet, this
/// property will be null!
///
ISessionData CurrentSession { get; }
///
/// Retrieves the current settings, i.e. the last ones which were loaded. If no settings have been loaded yet, this property will
/// be null!
///
Settings.Settings CurrentSettings { get; }
///
/// The path of the settings file to be used when reconfiguring the application.
///
string ReconfigurationFilePath { get; set; }
///
/// Builds a configuration for the client component, given the currently loaded settings, session and runtime information.
///
ClientConfiguration BuildClientConfiguration();
///
/// Initializes all relevant data for a new session.
///
void InitializeSessionConfiguration();
///
/// Attempts to load settings from the specified resource, using the optional passwords. Returns a
/// indicating the result of the operation.
///
LoadStatus LoadSettings(Uri resource, string adminPassword = null, string settingsPassword = null);
///
/// Loads the default settings.
///
void LoadDefaultSettings();
}
}