Interface IGameInstaller
- Namespace
- Hi3Helper.Plugin.Core.Management
- Assembly
- Hi3Helper.Plugin.Core.dll
Defines a method which handles the game's installation and updates.
[GeneratedComInterface]
[Guid("436f6c6c-6170-7365-727f-000000000030")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface IGameInstaller : IGameUninstaller, IInitializableTask, IFree
Remarks
This interface is intended to perform installation, updates and game download size retrieval.
All methods included within this interface are mostly asynchronous which requires awaiting via ComAsyncResult.
Methods
Free()
void Free()
GetGameDownloadedSizeAsync(GameInstallerKind, in Guid, out nint)
Gets the size of existing/downloaded assets depends on the current state.
void GetGameDownloadedSizeAsync(GameInstallerKind gameInstallerKind, in Guid cancelToken, out nint result)
Parameters
gameInstallerKindGameInstallerKindKind of game state of the size to retrieve.
cancelTokenGuidCancel token for the async operation.
resultnintA pointer to the ComAsyncResult instance.
Remarks
This method returns a pointer to the ComAsyncResult instance via result.
The pointer must be passed to AsTask<T>(nint) and set the generic
result to long in order to await and get the result from this async function.
GetGameSizeAsync(GameInstallerKind, in Guid, out nint)
Gets the estimated total size of the game depends on the current state.
void GetGameSizeAsync(GameInstallerKind gameInstallerKind, in Guid cancelToken, out nint result)
Parameters
gameInstallerKindGameInstallerKindKind of game state of the size to retrieve.
cancelTokenGuidCancel token for the async operation.
resultnintA pointer to the ComAsyncResult instance.
Remarks
This method returns a pointer to the ComAsyncResult instance via result.
The pointer must be passed to AsTask<T>(nint) and set the generic
result to long in order to await and get the result from this async function.
InitAsync(in Guid, out nint)
void InitAsync(in Guid cancelToken, out nint result)
Parameters
StartInstallAsync(InstallProgressDelegate?, InstallProgressStateDelegate?, in Guid, out nint)
Perform installation routine asynchronously.
void StartInstallAsync(InstallProgressDelegate? progressDelegate, InstallProgressStateDelegate? progressStateDelegate, in Guid cancelToken, out nint result)
Parameters
progressDelegateInstallProgressDelegateA delegate to get the progress of the routine.
progressStateDelegateInstallProgressStateDelegateA delegate to get the state of the progress of the routine.
cancelTokenGuidA cancel token for cancelling the async operation.
resultnintA pointer to the ComAsyncResult instance.
Remarks
This method returns a pointer to the ComAsyncResult instance via result.
The pointer must be passed to AsTask(nint) in order to await the async function.
The function, however is not-returnable.
StartPreloadAsync(InstallProgressDelegate?, InstallProgressStateDelegate?, in Guid, out nint)
Perform preload routine asynchronously. Returns immediately if no preload is available.
void StartPreloadAsync(InstallProgressDelegate? progressDelegate, InstallProgressStateDelegate? progressStateDelegate, in Guid cancelToken, out nint result)
Parameters
progressDelegateInstallProgressDelegateA delegate to get the progress of the routine.
progressStateDelegateInstallProgressStateDelegateA delegate to get the state of the progress of the routine.
cancelTokenGuidA cancel token for cancelling the async operation.
resultnintA pointer to the ComAsyncResult instance.
Remarks
This method returns a pointer to the ComAsyncResult instance via result.
The pointer must be passed to AsTask(nint) in order to await the async function.
The function, however is not-returnable.
StartUpdateAsync(InstallProgressDelegate?, InstallProgressStateDelegate?, in Guid, out nint)
Perform update routine asynchronously. Returns immediately if no update is available.
void StartUpdateAsync(InstallProgressDelegate? progressDelegate, InstallProgressStateDelegate? progressStateDelegate, in Guid cancelToken, out nint result)
Parameters
progressDelegateInstallProgressDelegateA delegate to get the progress of the routine.
progressStateDelegateInstallProgressStateDelegateA delegate to get the state of the progress of the routine.
cancelTokenGuidA cancel token for cancelling the async operation.
resultnintA pointer to the ComAsyncResult instance.
Remarks
This method returns a pointer to the ComAsyncResult instance via result.
The pointer must be passed to AsTask(nint) in order to await the async function.
The function, however is not-returnable.
UninstallAsync(in Guid, out nint)
void UninstallAsync(in Guid cancelToken, out nint result)