2018-02-06 15:12:11 +01:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2018-02-06 15:12:11 +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-06 15:12:11 +01:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the functionality of the communication host for the runtime application component.
|
|
|
|
|
/// </summary>
|
2018-02-06 15:12:11 +01:00
|
|
|
|
public interface IRuntimeHost : ICommunicationHost
|
|
|
|
|
{
|
2018-12-11 16:06:10 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Determines whether another application component may establish a connection with the host.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool AllowConnection { get; set; }
|
|
|
|
|
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// <summary>
|
2019-06-11 09:53:33 +02:00
|
|
|
|
/// The token used for initial authentication.
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// </summary>
|
2019-06-18 10:18:56 +02:00
|
|
|
|
Guid? AuthenticationToken { set; }
|
2018-02-14 15:26:05 +01:00
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client disconnected from the runtime.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler ClientDisconnected;
|
|
|
|
|
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// <summary>
|
2019-06-06 15:44:03 +02:00
|
|
|
|
/// Event fired when the client has signaled that it is ready to operate.
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler ClientReady;
|
2018-02-20 15:15:26 +01:00
|
|
|
|
|
2018-10-12 11:16:59 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client requested its configuration data.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ClientConfigurationEventArgs> ClientConfigurationNeeded;
|
|
|
|
|
|
2020-07-31 19:57:08 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client submitted a server exam selection made by the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ExamSelectionReplyEventArgs> ExamSelectionReceived;
|
|
|
|
|
|
2018-12-14 12:31:31 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client submitted a message box result chosen by the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<MessageBoxReplyEventArgs> MessageBoxReplyReceived;
|
|
|
|
|
|
2018-06-27 14:02:16 +02:00
|
|
|
|
/// <summary>
|
2018-07-04 09:53:33 +02:00
|
|
|
|
/// Event fired when the client submitted a password entered by the user.
|
2018-06-27 14:02:16 +02:00
|
|
|
|
/// </summary>
|
2018-07-04 09:53:33 +02:00
|
|
|
|
event CommunicationEventHandler<PasswordReplyEventArgs> PasswordReceived;
|
2018-06-27 14:02:16 +02:00
|
|
|
|
|
2018-03-08 15:27:12 +01:00
|
|
|
|
/// <summary>
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// Event fired when the client requested a reconfiguration of the application.
|
2018-03-08 15:27:12 +01:00
|
|
|
|
/// </summary>
|
2018-06-21 07:56:25 +02:00
|
|
|
|
event CommunicationEventHandler<ReconfigurationEventArgs> ReconfigurationRequested;
|
2018-03-08 15:27:12 +01:00
|
|
|
|
|
2020-07-31 20:35:18 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client submitted a server failure action chosen by the user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler<ServerFailureActionReplyEventArgs> ServerFailureActionReceived;
|
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the client requests to shut down the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event CommunicationEventHandler ShutdownRequested;
|
2018-02-06 15:12:11 +01:00
|
|
|
|
}
|
|
|
|
|
}
|