2017-07-19 14:43:54 +02:00
|
|
|
|
/*
|
2019-01-09 11:25:21 +01:00
|
|
|
|
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
|
2017-07-19 14:43:54 +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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-07-27 11:46:31 +02:00
|
|
|
|
using System;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Monitoring.Contracts.Events;
|
2017-07-27 11:46:31 +02:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Monitoring.Contracts
|
2017-07-19 14:43:54 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Monitors the processes running on the computer and provides access to process-related functionality.
|
|
|
|
|
/// </summary>
|
2017-07-19 14:43:54 +02:00
|
|
|
|
public interface IProcessMonitor
|
|
|
|
|
{
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// <summary>
|
2018-07-06 15:57:38 +02:00
|
|
|
|
/// Event fired when the process monitor observes that a new instance of the Windows explorer has been started.
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// </summary>
|
2017-08-02 08:31:12 +02:00
|
|
|
|
event ExplorerStartedEventHandler ExplorerStarted;
|
2017-07-26 14:36:20 +02:00
|
|
|
|
|
2017-07-27 11:46:31 +02:00
|
|
|
|
/// <summary>
|
2017-07-27 13:57:12 +02:00
|
|
|
|
/// Performs a check whether the process associated to the given window is allowed.
|
2017-07-27 11:46:31 +02:00
|
|
|
|
/// </summary>
|
2017-07-27 13:57:12 +02:00
|
|
|
|
bool BelongsToAllowedProcess(IntPtr window);
|
2017-07-27 11:46:31 +02:00
|
|
|
|
|
2017-07-19 14:43:54 +02:00
|
|
|
|
/// <summary>
|
2018-07-06 15:57:38 +02:00
|
|
|
|
/// Starts monitoring the Windows explorer, i.e. any newly created instances of <c>explorer.exe</c> will trigger the
|
|
|
|
|
/// <see cref="ExplorerStarted"/> event.
|
2017-07-19 14:43:54 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
void StartMonitoringExplorer();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stops monitoring the Windows explorer.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void StopMonitoringExplorer();
|
|
|
|
|
}
|
|
|
|
|
}
|