Files
rdp-proxy/clients/windows/src/RemoteAccessPlatform.Windows.Contracts/ISessionGatewayClient.cs
T
2026-04-28 22:29:50 +03:00

28 lines
1.3 KiB
C#

using RemoteAccessPlatform.Windows.Models;
namespace RemoteAccessPlatform.Windows.Contracts;
public interface ISessionGatewayClient
{
Task<ISessionGatewayConnection> ConnectAsync(
string attachToken,
DataPlaneOfferDto? dataPlane,
Func<LiveTransportEnvelopeDto, Task> onEnvelope,
Func<Exception?, Task> onClosed,
CancellationToken cancellationToken);
}
public interface ISessionGatewayConnection : IAsyncDisposable
{
bool IsConnected { get; }
string TransportKind { get; }
Task SendInputAsync(SessionInputEventDto inputEvent, CancellationToken cancellationToken);
Task SendClipboardTextAsync(string text, string origin, string contentHash, long sequenceId, CancellationToken cancellationToken);
Task SendFileUploadStartAsync(FileUploadStartDto upload, CancellationToken cancellationToken);
Task SendFileUploadChunkAsync(FileUploadChunkDto chunk, CancellationToken cancellationToken);
Task SendFileUploadCancelAsync(string transferId, CancellationToken cancellationToken);
Task SendFileDownloadStartAsync(FileDownloadStartDto download, CancellationToken cancellationToken);
Task SendFileDownloadAckAsync(FileDownloadAckDto ack, CancellationToken cancellationToken);
Task SendFileDownloadCancelAsync(string transferId, CancellationToken cancellationToken);
}