2018-01-24 12:34:32 +01:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
|
|
|
|
|
*
|
|
|
|
|
* 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-08 13:32:48 +01:00
|
|
|
|
using System;
|
|
|
|
|
using SafeExamBrowser.Contracts.Configuration.Settings;
|
|
|
|
|
|
2018-01-24 12:34:32 +01:00
|
|
|
|
namespace SafeExamBrowser.Contracts.Communication
|
|
|
|
|
{
|
|
|
|
|
public interface IServiceProxy
|
|
|
|
|
{
|
2018-01-25 09:50:46 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Instructs the proxy to ignore all operations or simulate a connection, where applicable. To be set e.g. when the service
|
|
|
|
|
/// policy is optional and the service is not available.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool Ignore { set; }
|
|
|
|
|
|
2018-01-24 12:34:32 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Tries to connect to the service host.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool Connect();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Disconnects from the service host.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Disconnect();
|
2018-02-08 13:32:48 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Instructs the service to start a new session according to the given parameters.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void StartSession(Guid sessionId, ISettings settings);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Instructs the service to stop the specified session.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void StopSession(Guid sessionId);
|
2018-01-24 12:34:32 +01:00
|
|
|
|
}
|
|
|
|
|
}
|