/*
* 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.Settings.Browser
{
///
/// Defines all settings for the integrated browser application.
///
[Serializable]
public class BrowserSettings
{
///
/// The settings to be used for additional browser windows.
///
public WindowSettings AdditionalWindow { get; set; }
///
/// Determines whether the user will be allowed to download configuration files.
///
public bool AllowConfigurationDownloads { get; set; }
///
/// Determines whether the user will be allowed to select a custom location when downloading a file (excluding configuration files).
///
public bool AllowCustomDownloadLocation { get; set; }
///
/// Determines whether the user will be allowed to download files (excluding configuration files).
///
public bool AllowDownloads { get; set; }
///
/// Determines whether the user will be allowed to zoom webpages.
///
public bool AllowPageZoom { get; set; }
///
/// Determines whether the internal PDF reader of the browser application is enabled. If not, documents will be downloaded by default.
///
public bool AllowPdfReader { get; set; }
///
/// Determines whether the toolbar of the internal PDF reader (which allows to e.g. download or print a document) will be enabled.
///
public bool AllowPdfReaderToolbar { get; set; }
///
/// Determines whether the user will be allowed to upload files.
///
public bool AllowUploads { get; set; }
///
/// The configuration key used for integrity checks with server applications (see also ).
///
public string ConfigurationKey { get; set; }
///
/// Determines whether the user needs to confirm the termination of SEB by .
///
public bool ConfirmQuitUrl { get; set; }
///
/// The custom user agent to optionally be used for all requests.
///
public string CustomUserAgent { get; set; }
///
/// Determines whether all cookies are deleted when terminating the browser application.
///
public bool DeleteCookiesOnShutdown { get; set; }
///
/// Determines whether all cookies are deleted when starting the browser application.
///
public bool DeleteCookiesOnStartup { get; set; }
///
/// Defines a custom directory for file downloads. If not defined, all downloads will be saved in the current user's download directory.
///
public string DownloadDirectory { get; set; }
///
/// Determines whether the user is allowed to use the integrated browser application.
///
public bool EnableBrowser { get; set; }
///
/// The salt value for the calculation of the exam key which is used for integrity checks with server applications (see also ).
///
public byte[] ExamKeySalt { get; set; }
///
/// The settings to be used for the browser request filter.
///
public FilterSettings Filter { get; set; }
///
/// The settings to be used for the main browser window.
///
public WindowSettings MainWindow { get; set; }
///
/// Determines how attempts to open a popup are handled.
///
public PopupPolicy PopupPolicy { get; set; }
///
/// Determines the proxy settings to be used by the browser.
///
public ProxySettings Proxy { get; set; }
///
/// An URL which will initiate the termination of SEB if visited by the user.
///
public string QuitUrl { get; set; }
///
/// Determines whether the configuration key header is sent with every HTTP request (see also ).
///
public bool SendConfigurationKey { get; set; }
///
/// Determines whether the exam key header is sent with every HTTP request (see also ).
///
public bool SendExamKey { get; set; }
///
/// The URL with which the main browser window will be loaded.
///
public string StartUrl { get; set; }
///
/// Determines whether a custom user agent will be used for all requests, see .
///
public bool UseCustomUserAgent { get; set; }
///
/// A custom suffix to be appended to the user agent.
///
public string UserAgentSuffix { get; set; }
public BrowserSettings()
{
AdditionalWindow = new WindowSettings();
Filter = new FilterSettings();
MainWindow = new WindowSettings();
Proxy = new ProxySettings();
}
}
}