/*
* Copyright (c) 2020 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.Configuration.Contracts
{
///
/// Defines the fundamental, global configuration information for all application components.
///
[Serializable]
public class AppConfig
{
///
/// The name of the backup data file used by the service component.
///
public const string BACKUP_FILE_NAME = "Backup.bin";
///
/// The base address for all communication hosts of the application.
///
public const string BASE_ADDRESS = "net.pipe://localhost/safeexambrowser";
///
/// The name of the synchronization primitive for the client component.
///
public const string CLIENT_MUTEX_NAME = "safe_exam_browser_client_mutex";
///
/// The name of the synchronization primitive for the runtime component.
///
public const string RUNTIME_MUTEX_NAME = "safe_exam_browser_runtime_mutex";
///
/// The communication address of the service component.
///
public const string SERVICE_ADDRESS = BASE_ADDRESS + "/service";
///
/// The name of the synchronization primitive for the service component.
///
public const string SERVICE_MUTEX_NAME = "safe_exam_browser_reset_mutex";
///
/// The file path of the local client configuration for the active user.
///
public string AppDataFilePath { get; set; }
///
/// The point in time when the application was started.
///
public DateTime ApplicationStartTime { get; set; }
///
/// The path where the browser cache is to be stored.
///
public string BrowserCachePath { get; set; }
///
/// The file path under which the log of the browser component is to be stored.
///
public string BrowserLogFilePath { get; set; }
///
/// The communication address of the client component.
///
public string ClientAddress { get; set; }
///
/// The executable path of the client compontent.
///
public string ClientExecutablePath { get; set; }
///
/// The unique identifier for the currently running client instance.
///
public Guid ClientId { get; set; }
///
/// The file path under which the log of the client component is to be stored.
///
public string ClientLogFilePath { get; set; }
///
/// The hash value of the certificate used to sign the application binaries, or null if the binaries are unsigned.
///
public string CodeSignatureHash { get; set; }
///
/// The file extension of configuration files for the application (including the period).
///
public string ConfigurationFileExtension { get; set; }
///
/// The MIME type of configuration files for the application.
///
public string ConfigurationFileMimeType { get; set; }
///
/// The build version of the application.
///
public string ProgramBuildVersion { get; set; }
///
/// The copyright information for the application.
///
public string ProgramCopyright { get; set; }
///
/// The file path of the local client configuration for all users.
///
public string ProgramDataFilePath { get; set; }
///
/// The program title of the application.
///
public string ProgramTitle { get; set; }
///
/// The informational version of the application.
///
public string ProgramInformationalVersion { get; set; }
///
/// The communication address of the runtime component.
///
public string RuntimeAddress { get; set; }
///
/// The unique identifier for the currently running runtime instance.
///
public Guid RuntimeId { get; set; }
///
/// The file path under which the log of the runtime component is to be stored.
///
public string RuntimeLogFilePath { get; set; }
///
/// The URI scheme for SEB resources.
///
public string SebUriScheme { get; set; }
///
/// The URI scheme for secure SEB resources.
///
public string SebUriSchemeSecure { get; set; }
///
/// The server API as JSON string.
///
public string ServerApi { get; set; }
///
/// The connection token for a server.
///
public string ServerConnectionToken { get; set; }
///
/// The OAuth2 token for a server.
///
public string ServerOauth2Token { get; set; }
///
/// The communication address of the service component.
///
public string ServiceAddress { get; set; }
///
/// The name of the global inter-process synchronization event hosted by the service.
///
public string ServiceEventName { get; set; }
///
/// The file path under which the log for the current session of the service component is to be stored.
///
public string ServiceLogFilePath { get; set; }
///
/// The directory to be used for temporary application data.
///
public string TemporaryDirectory { get; set; }
///
/// Creates a shallow clone.
///
public AppConfig Clone()
{
return MemberwiseClone() as AppConfig;
}
}
}