/*
* 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;
using SafeExamBrowser.Contracts.Configuration.Settings;
namespace SafeExamBrowser.Contracts.Configuration
{
public interface IConfigurationRepository
{
///
/// Retrieves the current session, i.e. the last one which was initialized. If no session has been initialized yet, this
/// property will be null!
///
ISession 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!
///
ISettings CurrentSettings { get; }
///
/// The runtime information for the currently running application instance.
///
IRuntimeInfo RuntimeInfo { get; }
///
/// Builds a configuration for the client component, given the currently loaded settings, session and runtime information.
///
IClientConfiguration BuildClientConfiguration();
///
/// Initializes all relevant data for a new session.
///
ISession InitializeSession();
///
/// Attempts to load settings from the specified path.
///
/// Thrown if the given path cannot be resolved to a settings file.
ISettings LoadSettings(Uri path);
///
/// Loads the default settings.
///
ISettings LoadDefaultSettings();
}
}