2019-06-21 15:05:31 +02:00
|
|
|
|
/*
|
2021-02-03 00:45:33 +01:00
|
|
|
|
* Copyright (c) 2021 ETH Zürich, Educational Development and Technology (LET)
|
2019-06-21 15:05:31 +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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-06-26 10:13:11 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Lockdown.Contracts
|
2019-06-21 15:05:31 +02:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-11-05 10:08:19 +01:00
|
|
|
|
/// Allows to control a feature of the computer, the operating system or an installed software.
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IFeatureConfiguration
|
|
|
|
|
{
|
2019-06-26 10:13:11 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The unique identifier of this feature configuration.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Guid Id { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The identifier of the group of changes to which this feature configuration belongs.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Guid GroupId { get; }
|
|
|
|
|
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// <summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
/// Disables the feature. Returns <c>true</c> if successful, otherwise <c>false</c>.
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// </summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
bool DisableFeature();
|
2019-06-21 15:05:31 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
/// Enables the feature. Returns <c>true</c> if successful, otherwise <c>false</c>.
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// </summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
bool EnableFeature();
|
2019-06-21 15:05:31 +02:00
|
|
|
|
|
2019-07-02 10:35:40 +02:00
|
|
|
|
/// <summary>
|
2019-07-05 12:28:42 +02:00
|
|
|
|
/// Retrieves the current status of the configuration.
|
2019-07-02 10:35:40 +02:00
|
|
|
|
/// </summary>
|
2019-07-05 12:28:42 +02:00
|
|
|
|
FeatureConfigurationStatus GetStatus();
|
2019-07-02 10:35:40 +02:00
|
|
|
|
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// <summary>
|
2019-07-05 12:28:42 +02:00
|
|
|
|
/// Initializes the currently active configuration of the feature.
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// </summary>
|
2019-07-05 12:28:42 +02:00
|
|
|
|
void Initialize();
|
2019-06-21 15:05:31 +02:00
|
|
|
|
|
2019-07-19 10:07:45 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resets the feature to its default configuration. Returns <c>true</c> if successful, otherwise <c>false</c>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool Reset();
|
|
|
|
|
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// <summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
/// Restores the feature to its previous configuration (i.e. before it was enabled or disabled). Returns <c>true</c> if successful,
|
|
|
|
|
/// otherwise <c>false</c>.
|
2019-06-21 15:05:31 +02:00
|
|
|
|
/// </summary>
|
2019-06-27 08:32:37 +02:00
|
|
|
|
bool Restore();
|
2019-06-21 15:05:31 +02:00
|
|
|
|
}
|
|
|
|
|
}
|