using System; using System.Threading.Tasks; namespace ThreadPilot.Services { /// /// Service for managing Windows system tweaks and optimizations /// public interface ISystemTweaksService { /// /// Event raised when a tweak status changes /// event EventHandler? TweakStatusChanged; /// /// Get the current status of Core Parking /// Task GetCoreParkingStatusAsync(); /// /// Enable or disable Core Parking /// Task SetCoreParkingAsync(bool enabled); /// /// Get the current status of C-States /// Task GetCStatesStatusAsync(); /// /// Enable or disable C-States /// Task SetCStatesAsync(bool enabled); /// /// Get the current status of SysMain service /// Task GetSysMainStatusAsync(); /// /// Enable or disable SysMain service /// Task SetSysMainAsync(bool enabled); /// /// Get the current status of Prefetch feature /// Task GetPrefetchStatusAsync(); /// /// Enable or disable Prefetch feature /// Task SetPrefetchAsync(bool enabled); /// /// Get the current status of Power Throttling /// Task GetPowerThrottlingStatusAsync(); /// /// Enable or disable Power Throttling /// Task SetPowerThrottlingAsync(bool enabled); /// /// Get the current status of HPET (High Precision Event Timer) /// Task GetHpetStatusAsync(); /// /// Enable or disable HPET /// Task SetHpetAsync(bool enabled); /// /// Get the current status of High Scheduling Category for gaming /// Task GetHighSchedulingCategoryStatusAsync(); /// /// Enable or disable High Scheduling Category for gaming /// Task SetHighSchedulingCategoryAsync(bool enabled); /// /// Get the current status of Menu Show Delay /// Task GetMenuShowDelayStatusAsync(); /// /// Enable or disable Menu Show Delay /// Task SetMenuShowDelayAsync(bool enabled); /// /// Refresh all tweak statuses /// Task RefreshAllStatusesAsync(); } /// /// Represents the status of a system tweak /// public class TweakStatus { public bool IsEnabled { get; set; } public bool IsAvailable { get; set; } public string? ErrorMessage { get; set; } public string? Description { get; set; } } /// /// Event args for tweak status changes /// public class TweakStatusChangedEventArgs : EventArgs { public string TweakName { get; } public TweakStatus Status { get; } public DateTime ChangeTime { get; } public TweakStatusChangedEventArgs(string tweakName, TweakStatus status) { TweakName = tweakName; Status = status; ChangeTime = DateTime.UtcNow; } } /// /// Enumeration of available system tweaks /// public enum SystemTweak { CoreParking, CStates, SysMain, Prefetch, PowerThrottling, Hpet, HighSchedulingCategory, MenuShowDelay } }