Restore SEBPatch

This commit is contained in:
2025-06-01 11:44:20 +02:00
commit 8c656e3137
1297 changed files with 142172 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the purpose of a <see cref="ICredentialsDialog"/>.
/// </summary>
public enum CredentialsDialogPurpose
{
/// <summary>
/// Credentials for generic purposes.
/// </summary>
Generic,
/// <summary>
/// Credentials for wireless network authentication.
/// </summary>
WirelessNetwork
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the user interaction result of an <see cref="ICredentialsDialog"/>.
/// </summary>
public class CredentialsDialogResult
{
/// <summary>
/// The password entered by the user, or <c>default(string)</c> if the interaction was unsuccessful.
/// </summary>
public string Password { get; set; }
/// <summary>
/// Indicates whether the user confirmed the dialog or not.
/// </summary>
public bool Success { get; set; }
/// <summary>
/// The username entered by the user, or <c>default(string)</c> if no username is required or the interaction was unsuccessful.
/// </summary>
public string Username { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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 SafeExamBrowser.Server.Contracts.Data;
namespace SafeExamBrowser.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the user interaction result of an <see cref="IExamSelectionDialog"/>.
/// </summary>
public class ExamSelectionDialogResult
{
/// <summary>
/// The exam selected by the user.
/// </summary>
public Exam SelectedExam { get; set; }
/// <summary>
/// Indicates whether the user confirmed the dialog or not.
/// </summary>
public bool Success { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines an option for the user to select on the <see cref="ILockScreen"/>.
/// </summary>
public class LockScreenOption
{
/// <summary>
/// The unique identifier for this option.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// The text to be displayed to the user.
/// </summary>
public string Text { get; set; }
public LockScreenOption()
{
Id = Guid.NewGuid();
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the result of a lock screen interaction by the user.
/// </summary>
public class LockScreenResult
{
/// <summary>
/// Indicates that the lock screen has been canceled (e.g. via a server instruction).
/// </summary>
public bool Canceled { get; set; }
/// <summary>
/// The identifier of the option selected by the user, if available.
/// </summary>
public Guid? OptionId { get; set; }
/// <summary>
/// The password entered by the user.
/// </summary>
public string Password { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the user interaction result of an <see cref="IPasswordDialog"/>.
/// </summary>
public class PasswordDialogResult
{
/// <summary>
/// The password entered by the user, or <c>null</c> if the interaction was unsuccessful.
/// </summary>
public string Password { get; set; }
/// <summary>
/// Indicates whether the user confirmed the dialog or not.
/// </summary>
public bool Success { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.UserInterface.Contracts.Windows.Data
{
/// <summary>
/// Defines the user interaction result of an <see cref="IServerFailureDialog"/>.
/// </summary>
public class ServerFailureDialogResult
{
/// <summary>
/// Indicates whether the user wants to abort the operation.
/// </summary>
public bool Abort { get; set; }
/// <summary>
/// Indicates whether the user wants to performa a fallback.
/// </summary>
public bool Fallback { get; set; }
/// <summary>
/// Indicates whether the user wants to retry the operation.
/// </summary>
public bool Retry { get; set; }
/// <summary>
/// Indicates whether the user confirmed the dialog or not.
/// </summary>
public bool Success { get; set; }
}
}