using System; using System.Collections.ObjectModel; using System.Threading.Tasks; using ThreadPilot.Models; namespace ThreadPilot.Services { public interface IPowerPlanService { /// /// Event fired when the active power plan changes /// event EventHandler? PowerPlanChanged; Task> GetPowerPlansAsync(); Task> GetCustomPowerPlansAsync(); Task SetActivePowerPlan(PowerPlanModel powerPlan); Task GetActivePowerPlan(); Task ImportCustomPowerPlan(string filePath); /// /// Sets the active power plan by GUID with duplicate change prevention /// Task SetActivePowerPlanByGuidAsync(string powerPlanGuid, bool preventDuplicateChanges = true); /// /// Gets the currently active power plan GUID /// Task GetActivePowerPlanGuidAsync(); /// /// Checks if a power plan with the given GUID exists /// Task PowerPlanExistsAsync(string powerPlanGuid); /// /// Gets a power plan by GUID /// Task GetPowerPlanByGuidAsync(string powerPlanGuid); /// /// Validates that a power plan change is necessary /// Task IsPowerPlanChangeNeededAsync(string targetPowerPlanGuid); } /// /// Event arguments for power plan changes /// public class PowerPlanChangedEventArgs : EventArgs { public PowerPlanModel? PreviousPowerPlan { get; } public PowerPlanModel? NewPowerPlan { get; } public DateTime Timestamp { get; } public string? Reason { get; } public PowerPlanChangedEventArgs(PowerPlanModel? previousPowerPlan, PowerPlanModel? newPowerPlan, string? reason = null) { PreviousPowerPlan = previousPowerPlan; NewPowerPlan = newPowerPlan; Timestamp = DateTime.Now; Reason = reason; } } }