2021-02-10 23:21:48 +01:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2021-02-10 23:21:48 +01: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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-01-18 18:02:21 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using SafeExamBrowser.Core.Contracts.Notifications;
|
2021-09-17 10:47:02 +02:00
|
|
|
|
using SafeExamBrowser.Proctoring.Contracts.Events;
|
2021-02-19 22:03:52 +01:00
|
|
|
|
using SafeExamBrowser.Settings.Proctoring;
|
|
|
|
|
|
2021-02-10 23:21:48 +01:00
|
|
|
|
namespace SafeExamBrowser.Proctoring.Contracts
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the remote proctoring functionality.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IProctoringController
|
|
|
|
|
{
|
2021-09-17 10:47:02 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates whether the hand is currently raised.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool IsHandRaised { get; }
|
|
|
|
|
|
2024-01-18 18:02:21 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The notifications for all active proctoring providers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<INotification> Notifications { get; }
|
|
|
|
|
|
2021-09-17 10:47:02 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fired when the hand has been lowered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event ProctoringEventHandler HandLowered;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fired when the hand has been raised.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event ProctoringEventHandler HandRaised;
|
|
|
|
|
|
2024-02-29 21:05:43 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the status of the remaining work has been updated.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event RemainingWorkUpdatedEventHandler RemainingWorkUpdated;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Executes any remaining work like e.g. the transmission of cached screen shots. Make sure to do so before calling <see cref="Terminate"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void ExecuteRemainingWork();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates whether there is any remaining work which needs to be done before the proctoring can be terminated.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool HasRemainingWork();
|
|
|
|
|
|
2021-02-19 22:03:52 +01:00
|
|
|
|
/// <summary>
|
2021-06-16 15:38:55 +02:00
|
|
|
|
/// Initializes the given settings and starts the proctoring if the settings are valid.
|
2021-02-19 22:03:52 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
void Initialize(ProctoringSettings settings);
|
2021-02-10 23:21:48 +01:00
|
|
|
|
|
2021-09-17 10:47:02 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Lowers the hand.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void LowerHand();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Raises the hand, optionally with the given message.
|
|
|
|
|
/// </summary>
|
2024-01-18 18:02:21 +01:00
|
|
|
|
void RaiseHand(string message = default);
|
2021-09-17 10:47:02 +02:00
|
|
|
|
|
2021-02-19 22:03:52 +01:00
|
|
|
|
/// <summary>
|
2024-02-29 21:05:43 +01:00
|
|
|
|
/// Stops the proctoring functionality. Make sure to call <see cref="ExecuteRemainingWork"/> beforehand if necessary.
|
2021-02-19 22:03:52 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
void Terminate();
|
2021-02-10 23:21:48 +01:00
|
|
|
|
}
|
|
|
|
|
}
|