2018-02-12 12:21:55 +01:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2018-02-12 12:21:55 +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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-02-14 15:26:05 +01:00
|
|
|
|
using System;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Communication.Contracts.Events;
|
2018-02-14 15:26:05 +01:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Communication.Contracts.Hosts
|
2018-02-12 12:21:55 +01:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the functionality of the communication host for the client application component.
|
|
|
|
|
/// </summary>
|
2018-02-12 12:21:55 +01:00
|
|
|
|
public interface IClientHost : ICommunicationHost
|
|
|
|
|
{
|
2018-09-28 11:05:49 +02:00
|
|
|
|
/// <summary>
|
2019-06-11 09:53:33 +02:00
|
|
|
|
/// The token used for initial authentication with the runtime.
|
2018-09-28 11:05:49 +02:00
|
|
|
|
/// </summary>
|
2019-06-11 09:53:33 +02:00
|
|
|
|
Guid AuthenticationToken { set; }
|
2018-09-28 11:05:49 +02:00
|
|
|
|
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// <summary>
|
2019-06-11 09:53:33 +02:00
|
|
|
|
/// Indicates whether the runtime has established a connection to this host.
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// </summary>
|
2019-06-11 09:53:33 +02:00
|
|
|
|
bool IsConnected { get; }
|
2018-02-20 15:15:26 +01:00
|
|
|
|
|
2018-12-14 12:31:31 +01:00
|
|
|
|
/// <summary>
|
2020-07-31 19:57:08 +02:00
|
|
|
|
/// Event fired when the runtime requests a server exam selection from the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ExamSelectionRequestEventArgs> ExamSelectionRequested;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-12-14 12:31:31 +01:00
|
|
|
|
/// Event fired when the runtime requests a message box input from the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<MessageBoxRequestEventArgs> MessageBoxRequested;
|
|
|
|
|
|
2018-07-04 09:53:33 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime requests a password input from the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<PasswordRequestEventArgs> PasswordRequested;
|
|
|
|
|
|
2020-02-10 16:47:50 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime aborted a reconfiguration.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler ReconfigurationAborted;
|
|
|
|
|
|
2018-07-04 09:53:33 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime denied a reconfiguration request.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ReconfigurationEventArgs> ReconfigurationDenied;
|
|
|
|
|
|
2018-09-28 11:05:49 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime disconnected from the client.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler RuntimeDisconnected;
|
|
|
|
|
|
2020-07-31 20:35:18 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime requests a server failure action selection from the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ServerFailureActionRequestEventArgs> ServerFailureActionRequested;
|
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the runtime commands the client to shutdown.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler Shutdown;
|
2018-02-12 12:21:55 +01:00
|
|
|
|
}
|
|
|
|
|
}
|