/*
* 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 browser engine.
///
[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 user will be allowed to upload files.
///
public bool AllowUploads { 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; }
///
/// 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 settings to be used for the browser request filter.
///
public FilterSettings Filter { get; set; }
///
/// The hash value of the raw settings data, used for integrity checks with server applications (see also ).
///
public string HashValue { 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 custom request headers (e.g. for integrity checks) are sent with every HTTP request.
///
public bool SendCustomHeaders { 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; }
public BrowserSettings()
{
AdditionalWindow = new WindowSettings();
Filter = new FilterSettings();
MainWindow = new WindowSettings();
Proxy = new ProxySettings();
}
}
}