2017-07-26 14:36:20 +02:00
|
|
|
|
/*
|
2019-01-09 11:25:21 +01:00
|
|
|
|
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
|
2017-07-26 14:36:20 +02: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-21 14:01:21 +01:00
|
|
|
|
using System;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Browser.Contracts;
|
|
|
|
|
using SafeExamBrowser.Communication.Contracts.Hosts;
|
|
|
|
|
using SafeExamBrowser.Configuration.Contracts;
|
|
|
|
|
using SafeExamBrowser.Configuration.Contracts.Settings;
|
2018-02-20 15:15:26 +01:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Client.Contracts
|
2017-07-26 14:36:20 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Controls the lifetime and is responsible for the event handling of the client application component.
|
|
|
|
|
/// </summary>
|
2018-01-17 08:26:44 +01:00
|
|
|
|
public interface IClientController
|
2017-07-26 14:36:20 +02:00
|
|
|
|
{
|
2018-06-29 09:50:20 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The global configuration information to be used during application execution.
|
|
|
|
|
/// </summary>
|
|
|
|
|
AppConfig AppConfig { set; }
|
|
|
|
|
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// <summary>
|
2019-08-30 12:30:00 +02:00
|
|
|
|
/// The browser application.
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// </summary>
|
2019-08-30 12:30:00 +02:00
|
|
|
|
IBrowserApplication Browser { set; }
|
2018-06-21 07:56:25 +02:00
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The client host used for communication handling.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IClientHost ClientHost { set; }
|
|
|
|
|
|
2018-02-21 14:01:21 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The session identifier of the currently running session.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Guid SessionId { set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The settings to be used during application execution.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Settings Settings { set; }
|
|
|
|
|
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// <summary>
|
2018-02-12 12:21:55 +01:00
|
|
|
|
/// Reverts any changes, releases all used resources and terminates the client.
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// </summary>
|
2018-02-12 12:21:55 +01:00
|
|
|
|
void Terminate();
|
2017-07-26 14:36:20 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-02-12 12:21:55 +01:00
|
|
|
|
/// Tries to start the client. Returns <c>true</c> if successful, otherwise <c>false</c>.
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// </summary>
|
2018-02-12 12:21:55 +01:00
|
|
|
|
bool TryStart();
|
2017-07-26 14:36:20 +02:00
|
|
|
|
}
|
|
|
|
|
}
|