using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Threading.Tasks; using ThreadPilot.Models; namespace ThreadPilot.Services { public interface IProcessService { Task> GetProcessesAsync(); Task SetProcessorAffinity(ProcessModel process, long affinityMask); Task SetProcessPriority(ProcessModel process, ProcessPriorityClass priority); Task SaveProcessProfile(string profileName, ProcessModel process); Task LoadProcessProfile(string profileName, ProcessModel process); Task RefreshProcessInfo(ProcessModel process); /// /// Gets a process by its ID /// Task GetProcessByIdAsync(int processId); /// /// Gets processes by executable name /// Task> GetProcessesByNameAsync(string executableName); /// /// Checks if a process with the given name is currently running /// Task IsProcessRunningAsync(string executableName); /// /// Gets all running processes with their executable paths /// Task> GetProcessesWithPathsAsync(); /// /// Gets only active applications with visible windows (user-facing applications) /// Task> GetActiveApplicationsAsync(); /// /// Creates a ProcessModel from a System.Diagnostics.Process /// ProcessModel CreateProcessModel(Process process); /// /// Checks if a specific process is still running /// Task IsProcessStillRunning(ProcessModel process); /// /// Sets the idle server state for a process (disables/enables idle functionality) /// Task SetIdleServerStateAsync(ProcessModel process, bool enableIdleServer); /// /// Sets registry-based priority enforcement for a process /// Task SetRegistryPriorityAsync(ProcessModel process, bool enable, ProcessPriorityClass priority); } }