Table of Contents

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

entry LauncherPathEntry

LauncherPathEntry struct for the asset's URL to download.

outputStreamHandle FileHandle

A handle to the output stream where the asset will be written.

downloadProgress PluginFiles.FileReadProgressDelegate

An optional callback delegate for reporting download progress.

cancelToken Guid

A Guid used as a cancellation token for the operation.

result nint

A 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

fileUrl string

The asset's URL to download.

outputStreamHandle FileHandle

A handle to the output stream where the asset will be written.

downloadProgress PluginFiles.FileReadProgressDelegate

An optional callback delegate for reporting download progress.

cancelToken Guid

A Guid used as a cancellation token for the operation.

result nint

A 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)

Parameters

cancelToken Guid
result nint