namespace ThreadPilot.Services { using System; using System.Collections.Generic; using System.Threading.Tasks; using ThreadPilot.Models; public interface IProcessPowerPlanAssociationService { event EventHandler? ConfigurationChanged; ProcessMonitorConfiguration Configuration { get; } Task LoadConfigurationAsync(); Task SaveConfigurationAsync(); Task> GetAssociationsAsync(); Task> GetEnabledAssociationsAsync(); Task AddAssociationAsync(ProcessPowerPlanAssociation association); Task UpdateAssociationAsync(ProcessPowerPlanAssociation association); Task RemoveAssociationAsync(string associationId); Task FindMatchingAssociationAsync(ProcessModel process); Task FindAssociationByExecutableAsync(string executableName); Task SetDefaultPowerPlanAsync(string powerPlanGuid, string powerPlanName); Task<(string Guid, string Name)> GetDefaultPowerPlanAsync(); Task> ValidateConfigurationAsync(); Task ResetConfigurationAsync(); Task ExportConfigurationAsync(string filePath); Task ImportConfigurationAsync(string filePath); Task ReplaceConfigurationAsync(ProcessMonitorConfiguration configuration); } public class ConfigurationChangedEventArgs : EventArgs { public string ChangeType { get; } public ProcessPowerPlanAssociation? Association { get; } public string? Details { get; } public ConfigurationChangedEventArgs(string changeType, ProcessPowerPlanAssociation? association = null, string? details = null) { this.ChangeType = changeType; this.Association = association; this.Details = details; } } }