0.2.0-dev Download ZIP
38 lines ·788 B Raw
| 1 | using System.Diagnostics.CodeAnalysis; |
| 2 | |
| 3 | namespace EvilEngine.Mounts; |
| 4 | |
| 5 | public enum InstallState |
| 6 | { |
| 7 | Installed, |
| 8 | UpdateQueued, |
| 9 | Updating |
| 10 | } |
| 11 | |
| 12 | public sealed record FoundArt(string? Capsule, string? Header, string? Hero, string? Logo) |
| 13 | { |
| 14 | public string? Icon { get; init; } |
| 15 | |
| 16 | public static FoundArt None { get; } = new(null, null, null, null); |
| 17 | } |
| 18 | |
| 19 | public sealed record FoundInstall(string Store, string Key, string Title, string Path) |
| 20 | { |
| 21 | public FoundArt Art { get; init; } = FoundArt.None; |
| 22 | |
| 23 | public InstallState State { get; init; } |
| 24 | } |
| 25 | |
| 26 | public interface IFinder |
| 27 | { |
| 28 | string Store { get; } |
| 29 | |
| 30 | bool TryFind(string key, [NotNullWhen(true)] out string? path); |
| 31 | |
| 32 | IReadOnlyList<FoundInstall> Installs(); |
| 33 | |
| 34 | FoundArt Art(string key) |
| 35 | { |
| 36 | return FoundArt.None; |
| 37 | } |
| 38 | } |