/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.Client.Contracts
{
///
/// Coordinates concurrent operations of the client application.
///
internal interface ICoordinator
{
///
/// Indicates whether the reconfiguration lock is currently occupied.
///
bool IsReconfigurationLocked();
///
/// Indicates whether the session lock is currently occupied.
///
bool IsSessionLocked();
///
/// Releases the reconfiguration lock.
///
void ReleaseReconfigurationLock();
///
/// Releases the session lock.
///
void ReleaseSessionLock();
///
/// Attempts to acquire the unique reconfiguration lock. Returns true if successful, otherwise false.
///
bool RequestReconfigurationLock();
///
/// Attempts to acquire the unique session lock. Returns true if successful, otherwise false.
///
bool RequestSessionLock();
}
}