Table of Contents

Class FirmwareChecker

Namespace
Huddly.Sdk.Upgraders
Assembly
Huddly.Sdk.dll
public class FirmwareChecker : IFirmwareChecker
Inheritance
FirmwareChecker
Implements
Inherited Members

Constructors

FirmwareChecker(IFirmwareApi, ILoggerFactory?)

NOTE: Constructor for dependency injection. Call ForDevice to get an instance created and initialized with desired connection type and device model.

public FirmwareChecker(IFirmwareApi api, ILoggerFactory? loggerFactory = null)

Parameters

api IFirmwareApi
loggerFactory ILoggerFactory

FirmwareChecker(ConnectionType, DeviceModel, ILoggerFactory?, Uri?)

Creates a FirmwareChecker that uses the FirmwareApiUrls in prioritized order, or the given firmwareApiUrl when set. A custom URL that is not in FirmwareApiUrls is used without fallback.

public FirmwareChecker(ConnectionType connection, DeviceModel model, ILoggerFactory? loggerFactory = null, Uri? firmwareApiUrl = null)

Parameters

connection ConnectionType
model DeviceModel
loggerFactory ILoggerFactory
firmwareApiUrl Uri

Fields

FirmwareApiUrl

The legacy/obsolete firmware API (software release server) URL. See FirmwareApiUrls for the full list including fallback URLs.

[Obsolete("Use FirmwareApiUrls instead. This field will be removed in SDK version 3")]
public const string FirmwareApiUrl = "https://huddlyreleaseserver.azurewebsites.net"

Field Value

string

FirmwareApiUrls

Firmware API URLs in prioritized order. The first URL is the primary server, and the remaining URLs are tried in order when the preceding servers are unreachable or unavailable. See FirmwareApiFallbackHandler for details.

public static readonly IReadOnlyList<Uri> FirmwareApiUrls

Field Value

IReadOnlyList<Uri>

Methods

ForDevice(ConnectionType, DeviceModel)

Create a new FirmwareChecker instance for the desired connection type and device model.

public IFirmwareChecker ForDevice(ConnectionType connection, DeviceModel model)

Parameters

connection ConnectionType
model DeviceModel

Returns

IFirmwareChecker

GetFirmwareList(FirmwareChannel, Dictionary<string, string>, CancellationToken)

public Task<Result<List<RemoteFirmwareInfo>>> GetFirmwareList(FirmwareChannel channel, Dictionary<string, string> metadata, CancellationToken ct = default)

Parameters

channel FirmwareChannel
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<Result<List<RemoteFirmwareInfo>>>

GetFirmwareList(FirmwareChannel, CancellationToken)

public Task<Result<List<RemoteFirmwareInfo>>> GetFirmwareList(FirmwareChannel channel, CancellationToken ct = default)

Parameters

channel FirmwareChannel
ct CancellationToken

Returns

Task<Result<List<RemoteFirmwareInfo>>>

GetLatestLocalVersion(IEnumerable<string>, CancellationToken)

Returns the path and version of the latest firmware, given a list of local firmware paths. If the firmware file is not found or cannot be read it is ignored and it will not be returned. If all paths are invalid or point to invalid firmware, an error result is returned.

public Task<Result<LocalFirmwareInfo>> GetLatestLocalVersion(IEnumerable<string> filePaths, CancellationToken ct = default)

Parameters

filePaths IEnumerable<string>
ct CancellationToken

Returns

Task<Result<LocalFirmwareInfo>>

GetLatestRemoteVersion(FirmwareChannel, Dictionary<string, string>, CancellationToken)

public Task<Result<RemoteFirmwareInfo>> GetLatestRemoteVersion(FirmwareChannel channel, Dictionary<string, string> metadata, CancellationToken ct = default)

Parameters

channel FirmwareChannel
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<Result<RemoteFirmwareInfo>>

GetLatestRemoteVersion(FirmwareChannel, CancellationToken)

public Task<Result<RemoteFirmwareInfo>> GetLatestRemoteVersion(FirmwareChannel channel, CancellationToken ct = default)

Parameters

channel FirmwareChannel
ct CancellationToken

Returns

Task<Result<RemoteFirmwareInfo>>

GetVersion(string, CancellationToken)

public Task<Result<FirmwareVersion>> GetVersion(string filePath, CancellationToken ct = default)

Parameters

filePath string
ct CancellationToken

Returns

Task<Result<FirmwareVersion>>