Skip to content

ITaskPluginQuery

Interface in Oadm.Sdk.Plugins · Oadm.Sdk.dll

Optional for task plugins whose dialog must read the current device state before the user decides (existing users, current network settings, installed ACAP applications, firmware status). The client dialog calls it through ITaskDialogContext.QueryAsync; it runs on the server with the stored credentials. Queries must be read-only: never change the device here.

public interface ITaskPluginQuery

Guide: Task plugins

Task<string?> QueryAsync(ITaskQueryContext ctx, IDeviceInfo device, string method, string? payloadJson, CancellationToken ct)

Answers method for the dialog with JSON. Read only: never change the device. Throw ArgumentException for an unknown method or bad input; the message reaches the dialog.

Task<string?> QueryAsync(ITaskQueryContext ctx, ICallContext caller, IDeviceInfo device, string method, string? payloadJson, CancellationToken ct)

Default implementation

ITaskPluginQuery.QueryAsync with the user’s call (SDK 0.4.0): read other devices than device only through caller (the user’s view). The host calls this one; the default forwards to the old one. device is always in the user’s view (the host checked it).