forked from Devolutions/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIPackageManager.cs
More file actions
80 lines (69 loc) · 3.33 KB
/
IPackageManager.cs
File metadata and controls
80 lines (69 loc) · 3.33 KB
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
78
79
80
using UniGetUI.PackageEngine.Classes.Manager.Classes;
using UniGetUI.PackageEngine.Classes.Manager.ManagerHelpers;
using UniGetUI.PackageEngine.Interfaces.ManagerProviders;
using UniGetUI.PackageEngine.ManagerClasses.Classes;
using UniGetUI.PackageEngine.ManagerClasses.Manager;
namespace UniGetUI.PackageEngine.Interfaces
{
public interface IPackageManager
{
public ManagerProperties Properties { get; }
public ManagerCapabilities Capabilities { get; }
public ManagerStatus Status { get; }
public string Name { get; }
public string DisplayName { get; }
public IManagerSource DefaultSource { get; }
public bool ManagerReady { get; }
public IManagerLogger TaskLogger { get; }
public IMultiSourceHelper SourcesHelper { get; }
public IPackageDetailsHelper DetailsHelper { get; }
public IPackageOperationHelper OperationHelper { get; }
public IReadOnlyList<ManagerDependency> Dependencies { get; }
/// <summary>
/// Initializes the Package Manager (asynchronously). Must be run before using any other method of the manager.
/// </summary>
public void Initialize();
/// <summary>
/// Returns true if the manager is enabled, false otherwise
/// </summary>
public bool IsEnabled();
/// <summary>
/// Returns true if the manager is enabled and available (the required executable files were found). Returns false otherwise
/// </summary>
public bool IsReady();
/// <summary>
/// Returns an array of Package objects that the manager lists for the given query. Depending on the manager, the list may
/// also include similar results. This method is fail-safe and will return an empty array if an error occurs.
/// </summary>
public IReadOnlyList<IPackage> FindPackages(string query);
/// <summary>
/// Returns an array of UpgradablePackage objects that represent the available updates reported by the manager.
/// This method is fail-safe and will return an empty array if an error occurs.
/// </summary>
public IReadOnlyList<IPackage> GetAvailableUpdates();
/// <summary>
/// Returns an array of Package objects that represent the installed reported by the manager.
/// This method is fail-safe and will return an empty array if an error occurs.
/// </summary>
public IReadOnlyList<IPackage> GetInstalledPackages();
/// <summary>
/// Refreshes the Package Manager sources/indexes
/// Each manager MUST implement this method.
/// </summary>
public void RefreshPackageIndexes();
/// <summary>
/// This method should attempt to resolve issues
/// such as COM API disconnect or similar issues that
/// can easily be resolved by reconnecting to a client and/or
/// clearing some internal caches. See the WinGet implementation for
/// an example
/// </summary>
public void AttemptFastRepair();
/// <summary>
/// Find all available executable files that apply to this package manager
/// </summary>
/// <returns></returns>
public IReadOnlyList<string> FindCandidateExecutableFiles();
public Tuple<bool, string> GetExecutableFile();
}
}