Interface IGameManager
- Namespace
- Hi3Helper.Plugin.Core.Management
- Assembly
- Hi3Helper.Plugin.Core.dll
Defines the details about the current game installation, versioning, and path configuration.
[GeneratedComInterface]
[Guid("436f6c6c-6170-7365-727f-000000000012")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface IGameManager : IInitializableTask, IFree
Remarks
This interface is intended for retrieving game installation details, the current version of the game, update status, preload status, and setting the path of the game installation location.
Methods
FindExistingInstallPathAsync(in Guid, out nint)
Finds the existing installation path of the game asynchronously.
void FindExistingInstallPathAsync(in Guid cancelToken, out nint result)
Parameters
cancelTokenGuidA Guid value token for the cancelling asynchronous operation.
resultnintA safe pointer to the ComAsyncResult.
Remarks
This method returns a safe pointer to the ComAsyncResult via result.
The pointer needs to be passed to AsTask<T>(nint) and the generic type must be PluginDisposableMemoryMarshal of byte
Free()
void Free()
GetApiGameVersion(out GameVersion)
Gets the latest game version available from the API.
void GetApiGameVersion(out GameVersion gameVersion)
Parameters
gameVersionGameVersionAn GameVersion representing the latest available game version.
GetApiPreloadGameVersion(out GameVersion)
Gets the preload version of the game available from the API, if any.
void GetApiPreloadGameVersion(out GameVersion gameVersion)
Parameters
gameVersionGameVersionAn GameVersion representing the preload version, or Empty if not available.
GetCurrentGameVersion(out GameVersion)
Gets the current version of the installed game.
void GetCurrentGameVersion(out GameVersion gameVersion)
Parameters
gameVersionGameVersionAn GameVersion representing the installed game version.
GetGamePath(out string?)
Gets the current path where the game is installed.
void GetGamePath(out string? result)
Parameters
resultstringThe file system path to the game installation directory.
InitAsync(in Guid, out nint)
void InitAsync(in Guid cancelToken, out nint result)
Parameters
IsGameHasPreload(out bool)
Determines whether a preload version is available for the game.
void IsGameHasPreload(out bool result)
Parameters
resultbooltrueif a preload version is available; otherwise,false.
IsGameHasUpdate(out bool)
Determines whether an update is available for the game.
void IsGameHasUpdate(out bool result)
Parameters
resultbooltrueif an update is available; otherwise,false.
IsGameInstalled(out bool)
Determines whether the game is currently installed.
void IsGameInstalled(out bool result)
Parameters
resultbooltrueif the game is installed; otherwise,false.
LoadConfig()
Perform config loading mechanism. Before calling this method, ensure that you have set the game path using SetGamePath(string).
void LoadConfig()
SaveConfig()
Perform config saving mechanism. Before calling this method, ensure that you have set the game path using SetGamePath(string).
void SaveConfig()
SetCurrentGameVersion(in GameVersion)
Sets the current version of the installed game.
void SetCurrentGameVersion(in GameVersion version)
Parameters
versionGameVersionThe IVersion to set as the current game version.
SetGamePath(string)
Set-only or Set-Save the path of the game installation.
void SetGamePath(string gamePath)
Parameters
gamePathstringThe new file system path to the game installation directory.