18 lines
946 B
C#
18 lines
946 B
C#
// Only the COM executor and browser-plugin channel are replaced. The outbox,
|
|
// session, framing, cancellation and persistence are production code.
|
|
using SwyxTray.Recording;
|
|
using SwyxTray.Swyx;
|
|
namespace SwyxTray.Web;
|
|
internal sealed class CommandExecutor(RecordingOutbox outbox)
|
|
{
|
|
public RecordingOutbox Outbox => outbox;
|
|
public Task<SwyxSnapshot> GetSnapshotAsync(CancellationToken _) => Task.FromResult(SwyxSnapshot.Offline);
|
|
public Task<IReadOnlyList<SwyxContact>> GetAddressesAsync(CancellationToken _) => Task.FromResult<IReadOnlyList<SwyxContact>>([]);
|
|
public Task<ResultMessage> ExecuteAsync(ClientCommand command, CancellationToken _)
|
|
{
|
|
if (command.Cmd == "recording.ack") Outbox.Acknowledge(command.RecordingId!.Value, command.JobId);
|
|
return Task.FromResult(new ResultMessage(command.Id, true));
|
|
}
|
|
}
|
|
internal sealed class PluginTabChannel { public bool TryComplete(ClientCommand _) => false; }
|