2018-01-24 12:34:32 +01:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2018-01-24 12:34:32 +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-07-04 09:53:33 +02:00
|
|
|
|
using System;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Communication.Contracts.Data;
|
2018-01-24 12:34:32 +01:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Communication.Contracts.Proxies
|
2018-01-24 12:34:32 +01:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the functionality for a proxy to the communication host of the runtime application component.
|
|
|
|
|
/// </summary>
|
2018-02-14 15:26:05 +01:00
|
|
|
|
public interface IRuntimeProxy : ICommunicationProxy
|
2018-01-24 12:34:32 +01:00
|
|
|
|
{
|
2018-02-12 12:21:55 +01:00
|
|
|
|
/// <summary>
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// Retrieves the application configuration from the runtime.
|
2018-02-12 12:21:55 +01:00
|
|
|
|
/// </summary>
|
2018-08-10 13:23:24 +02:00
|
|
|
|
CommunicationResult<ConfigurationResponse> GetConfiguration();
|
2018-02-12 12:21:55 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-02-14 15:26:05 +01:00
|
|
|
|
/// Informs the runtime that the client is ready.
|
2018-02-12 12:21:55 +01:00
|
|
|
|
/// </summary>
|
2018-08-10 13:23:24 +02:00
|
|
|
|
CommunicationResult InformClientReady();
|
2018-02-20 15:15:26 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-02-22 16:15:06 +01:00
|
|
|
|
/// Requests the runtime to shut down the application.
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// </summary>
|
2018-08-10 13:23:24 +02:00
|
|
|
|
CommunicationResult RequestShutdown();
|
2018-03-08 15:27:12 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// Requests the runtime to reconfigure the application with the specified configuration.
|
2018-03-08 15:27:12 +01:00
|
|
|
|
/// </summary>
|
2020-09-24 12:55:20 +02:00
|
|
|
|
CommunicationResult RequestReconfiguration(string filePath, string url);
|
2018-07-04 09:53:33 +02:00
|
|
|
|
|
2020-07-31 19:57:08 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Submits the result of a server exam selection previously requested by the runtime. If the procedure was aborted by the user,
|
|
|
|
|
/// the selected exam identifier will be <see cref="default(string)"/>!
|
|
|
|
|
/// </summary>
|
|
|
|
|
CommunicationResult SubmitExamSelectionResult(Guid requestId, bool success, string selectedExamId = default(string));
|
|
|
|
|
|
2018-12-14 12:31:31 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Submits the result of a message box input previously requested by the runtime.
|
|
|
|
|
/// </summary>
|
2019-08-30 14:02:36 +02:00
|
|
|
|
CommunicationResult SubmitMessageBoxResult(Guid requestId, int result);
|
2018-12-14 12:31:31 +01:00
|
|
|
|
|
2018-07-04 09:53:33 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Submits the result of a password input previously requested by the runtime. If the procedure was aborted by the user,
|
2020-07-31 19:57:08 +02:00
|
|
|
|
/// the password parameter will be <see cref="default(string)"/>!
|
2018-07-04 09:53:33 +02:00
|
|
|
|
/// </summary>
|
2020-07-31 19:57:08 +02:00
|
|
|
|
CommunicationResult SubmitPassword(Guid requestId, bool success, string password = default(string));
|
2020-07-31 20:35:18 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Submits the result of a server failure action selection previously requested by the runtime.
|
|
|
|
|
/// </summary>
|
|
|
|
|
CommunicationResult SubmitServerFailureActionResult(Guid requestId, bool abort, bool fallback, bool retry);
|
2018-01-24 12:34:32 +01:00
|
|
|
|
}
|
|
|
|
|
}
|