/*
* ThreadPilot - Advanced Windows Process and Power Plan Manager
* Copyright (C) 2025 Prime Build
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, version 3 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
namespace ThreadPilot.Services
{
using System.Threading.Tasks;
///
/// Service for managing Scheduled Task-based elevation entrypoints.
///
public interface IElevatedTaskService
{
///
/// Gets the managed task name used for on-demand elevated launch.
///
string LaunchTaskName { get; }
///
/// Gets the managed task name used for elevated logon autostart.
///
string AutostartTaskName { get; }
///
/// Ensures the managed on-demand elevated launch task exists and targets the current executable.
///
/// True when the task exists and is up to date; otherwise false.
Task EnsureLaunchTaskAsync();
///
/// Runs the managed on-demand elevated launch task.
///
/// True if task execution was started successfully; otherwise false.
Task TryRunLaunchTaskAsync();
///
/// Ensures elevated autostart task exists and points to the provided executable command.
///
/// Absolute executable path.
/// Command-line arguments for autostart launches.
/// True if task was created/updated successfully; otherwise false.
Task EnsureAutostartTaskAsync(string executablePath, string arguments);
///
/// Removes the managed elevated autostart task.
///
/// True when the task is removed (or already absent); otherwise false.
Task RemoveAutostartTaskAsync();
///
/// Checks whether the managed elevated autostart task is currently registered.
///
/// True when the task exists; otherwise false.
Task IsAutostartTaskRegisteredAsync();
}
}