Interface ILauncherApi
- Namespace
- Hi3Helper.Plugin.Core.Management.Api
- Assembly
- Hi3Helper.Plugin.Core.dll
Defines the contract for a launcher API that supports asynchronous asset downloading.
[GeneratedComInterface]
[Guid("436f6c6c-6170-7365-727f-000000000020")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface ILauncherApi : IInitializableTask, IFree
Remarks
This interface extends IInitializableTask and provides methods for downloading assets asynchronously. The download operation supports progress reporting and cancellation.
Methods
DownloadAssetAsync(LauncherPathEntry, FileHandle, FileReadProgressDelegate?, in Guid, out nint)
Asynchronously downloads an asset to the specified output stream.
void DownloadAssetAsync(LauncherPathEntry entry, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate? downloadProgress, in Guid cancelToken, out nint result)
Parameters
entryLauncherPathEntryLauncherPathEntry struct for the asset's URL to download.
outputStreamHandleFileHandleA handle to the output stream where the asset will be written.
downloadProgressPluginFiles.FileReadProgressDelegateAn optional callback delegate for reporting download progress.
cancelTokenGuidA Guid used as a cancellation token for the operation.
resultnintA native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
Remarks
This method returns a native pointer (nint) to a ComAsyncResult via result representing the asynchronous operation.
DownloadAssetAsync(string, FileHandle, FileReadProgressDelegate?, in Guid, out nint)
Asynchronously downloads an asset to the specified output stream.
void DownloadAssetAsync(string fileUrl, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate? downloadProgress, in Guid cancelToken, out nint result)
Parameters
fileUrlstringThe asset's URL to download.
outputStreamHandleFileHandleA handle to the output stream where the asset will be written.
downloadProgressPluginFiles.FileReadProgressDelegateAn optional callback delegate for reporting download progress.
cancelTokenGuidA Guid used as a cancellation token for the operation.
resultnintA native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
Remarks
A native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
Free()
void Free()
InitAsync(in Guid, out nint)
void InitAsync(in Guid cancelToken, out nint result)