-
Notifications
You must be signed in to change notification settings - Fork 4
/
ILauncher.cs
77 lines (63 loc) · 2.08 KB
/
ILauncher.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System.Drawing;
namespace GameLib.Core;
public interface ILauncher
{
/// <summary>
/// The options the launcher manager has been provided with
/// </summary>
public LauncherOptions LauncherOptions { get; }
/// <summary>
/// Guid of the Launcher
/// NOTE: generated by the plugin
/// </summary>
public Guid Id { get; }
/// <summary>
/// Name of the launcher
/// </summary>
public string Name { get; }
/// <summary>
/// Logo of the launcher
/// NOTE: size of Logo depends on the plugin
/// </summary>
public Image Logo { get; }
/// <summary>
/// <see langword="true"/> if the launcher is (properly) installed
/// </summary>
public bool IsInstalled { get; }
/// <summary>
/// <see langword="true"/> if the launcher is currently running
/// </summary>
public bool IsRunning { get; }
/// <summary>
/// The installation path of the Launcher<br/>
/// <see langword="string.Empty"/> if not (properly) installed
/// </summary>
public string InstallDir { get; }
/// <summary>
/// The executable including the path of the Launcher<br/>
/// <see langword="string.Empty"/> if not (properly) installed
/// </summary>
public string Executable { get; }
/// <summary>
/// The extracted icon of the launcher executable
/// </summary>
public Icon? ExecutableIcon { get; }
/// <summary>
/// The installed games of the Launcher
/// NOTE: if no cache is available list will be empty, Refresh must be called first
/// </summary>
public IEnumerable<IGame> Games { get; }
/// <summary>
/// Starts the launcher if not already running
/// </summary>
/// <returns><see langword="True"/> if started successfully or already running</returns>
public bool Start();
/// <summary>
/// Attempts to end the launcher
/// </summary>
public void Stop();
/// <summary>
/// Clear any cached values and reload all launcher and game data
/// </summary>
public void Refresh(CancellationToken cancellationToken = default);
}