/* * Copyright (c) 2022 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/. */ using SafeExamBrowser.Monitoring.Contracts.Applications.Events; using SafeExamBrowser.Settings.Applications; namespace SafeExamBrowser.Monitoring.Contracts.Applications { /// /// Monitors applications running on the computer. /// public interface IApplicationMonitor { /// /// Event fired when a new instance of the Windows Explorer has been started. /// event ExplorerStartedEventHandler ExplorerStarted; /// /// Event fired when a new instance of a whitelisted application has been started. /// event InstanceStartedEventHandler InstanceStarted; /// /// Event fired when the automatic termination of a blacklisted application failed. /// event TerminationFailedEventHandler TerminationFailed; /// /// Initializes the application monitor. /// InitializationResult Initialize(ApplicationSettings settings); /// /// Starts monitoring all initialized applications. Windows Explorer will always be monitored. /// void Start(); /// /// Stops the application monitoring. /// void Stop(); /// /// Attempts to terminate all processes of the specified application. Returns true if successful, otherwise false. /// bool TryTerminate(RunningApplication application); } }