seb-win-refactoring/SafeExamBrowser.Settings/Browser/BrowserSettings.cs

118 lines
3.6 KiB
C#
Raw Normal View History

2017-07-28 14:52:15 +02:00
/*
* Copyright (c) 2020 ETH Zürich, Educational Development and Technology (LET)
2017-07-28 14:52:15 +02:00
*
* 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/.
*/
2018-02-15 15:42:54 +01:00
using System;
namespace SafeExamBrowser.Settings.Browser
2017-07-28 14:52:15 +02:00
{
/// <summary>
/// Defines all settings for the browser engine.
/// </summary>
2018-02-15 15:42:54 +01:00
[Serializable]
public class BrowserSettings
2017-07-28 14:52:15 +02:00
{
/// <summary>
/// The settings to be used for additional browser windows.
2017-07-28 14:52:15 +02:00
/// </summary>
public WindowSettings AdditionalWindow { get; set; }
2017-07-28 14:52:15 +02:00
/// <summary>
/// Determines whether the user will be allowed to download configuration files.
/// </summary>
public bool AllowConfigurationDownloads { get; set; }
/// <summary>
/// Determines whether the user will be allowed to select a custom location when downloading a file (excluding configuration files).
/// </summary>
public bool AllowCustomDownloadLocation { get; set; }
/// <summary>
/// Determines whether the user will be allowed to download files (excluding configuration files).
/// </summary>
public bool AllowDownloads { get; set; }
2019-01-15 10:44:35 +01:00
/// <summary>
/// Determines whether the user will be allowed to zoom webpages.
2019-01-15 10:44:35 +01:00
/// </summary>
public bool AllowPageZoom { get; set; }
2019-12-19 15:02:40 +01:00
/// <summary>
/// Determines whether the user needs to confirm the termination of SEB by <see cref="QuitUrl"/>.
/// </summary>
public bool ConfirmQuitUrl { get; set; }
/// <summary>
/// The custom user agent to optionally be used for all requests.
/// </summary>
public string CustomUserAgent { get; set; }
/// <summary>
/// Defines a custom directory for file downloads. If not defined, all downloads will be saved in the current user's download directory.
/// </summary>
public string DownloadDirectory { get; set; }
/// <summary>
/// Determines whether the user is allowed to use the integrated browser application.
/// </summary>
public bool EnableBrowser { get; set; }
/// <summary>
/// The settings to be used for the browser request filter.
/// </summary>
public FilterSettings Filter { get; set; }
/// <summary>
/// The hash value of the raw settings data, used for integrity checks with server applications (see also <see cref="SendCustomHeaders"/>).
/// </summary>
public string HashValue { get; set; }
2017-07-28 14:52:15 +02:00
/// <summary>
/// The settings to be used for the main browser window.
2017-07-28 14:52:15 +02:00
/// </summary>
public WindowSettings MainWindow { get; set; }
/// <summary>
/// Determines how attempts to open a popup are handled.
/// </summary>
public PopupPolicy PopupPolicy { get; set; }
/// <summary>
/// Determines the proxy settings to be used by the browser.
/// </summary>
public ProxySettings Proxy { get; set; }
2019-12-19 15:02:40 +01:00
/// <summary>
/// An URL which will initiate the termination of SEB if visited by the user.
/// </summary>
public string QuitUrl { get; set; }
/// <summary>
/// Determines whether custom request headers (e.g. for integrity checks) are sent with every HTTP request.
/// </summary>
public bool SendCustomHeaders { get; set; }
/// <summary>
/// The URL with which the main browser window will be loaded.
/// </summary>
2018-02-15 15:42:54 +01:00
public string StartUrl { get; set; }
/// <summary>
/// Determines whether a custom user agent will be used for all requests, see <see cref="CustomUserAgent"/>.
/// </summary>
public bool UseCustomUserAgent { get; set; }
public BrowserSettings()
{
AdditionalWindow = new WindowSettings();
Filter = new FilterSettings();
MainWindow = new WindowSettings();
Proxy = new ProxySettings();
}
2017-07-28 14:52:15 +02:00
}
}