87 lines
2.4 KiB
C#
87 lines
2.4 KiB
C#
using AcDream.Launcher.Core.Launching;
|
|
using AcDream.Launcher.Core.Profiles;
|
|
|
|
namespace AcDream.Launcher.Core.Orchestration;
|
|
|
|
/// <summary>
|
|
/// Canonical state/mutation surface projected by the Avalonia launcher. The UI
|
|
/// never owns a second profile document, process map, status tail, or launch
|
|
/// transaction; it asks for immutable snapshots and sends typed mutations here.
|
|
/// </summary>
|
|
public interface ILauncherOrchestrator : IDisposable
|
|
{
|
|
event EventHandler? StateChanged;
|
|
|
|
void LoadProfiles();
|
|
|
|
LauncherStateSnapshot GetSnapshot();
|
|
|
|
LauncherCapability GetLaunchCapability(LaunchMode mode);
|
|
|
|
LauncherCapability GetProbeCapability(string serverName, string accountName);
|
|
|
|
void SetInstallRecord(LauncherInstallRecord? installRecord);
|
|
|
|
void AddServer(string name, string host, int port);
|
|
|
|
void EditServer(string name, string newName, string newHost, int newPort);
|
|
|
|
void RemoveServer(string name);
|
|
|
|
void AddAccount(string serverName, string accountName, string password);
|
|
|
|
void EditAccount(
|
|
string serverName,
|
|
string accountName,
|
|
string newAccountName,
|
|
string? newPassword);
|
|
|
|
void RemoveAccount(string serverName, string accountName);
|
|
|
|
void AddCharacter(
|
|
string serverName,
|
|
string accountName,
|
|
string characterName,
|
|
string? characterId);
|
|
|
|
void EditCharacterIdentity(
|
|
string serverName,
|
|
string accountName,
|
|
string characterName,
|
|
string newCharacterName,
|
|
string? newCharacterId);
|
|
|
|
void UpdateCharacterSettings(
|
|
string serverName,
|
|
string accountName,
|
|
string characterName,
|
|
LaunchMode launchMode,
|
|
IReadOnlyList<string> plugins,
|
|
IReadOnlyList<string> loginCommands);
|
|
|
|
void RemoveCharacter(
|
|
string serverName,
|
|
string accountName,
|
|
string characterName);
|
|
|
|
Task<LauncherSessionSnapshot> LaunchAsync(
|
|
string serverName,
|
|
string accountName,
|
|
string characterName,
|
|
LaunchMode mode,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<LauncherSessionSnapshot> ProbeAsync(
|
|
string serverName,
|
|
string accountName,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task StopSessionAsync(
|
|
string sessionId,
|
|
TimeSpan timeout,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
void PollStatus();
|
|
|
|
void ClearFinishedSessions();
|
|
}
|