using Grpc.Core;
using MxGateway.Contracts.Proto;
namespace MxGateway.Client;
internal interface IMxGatewayClientTransport
{
///
/// Gets the client configuration options.
///
MxGatewayClientOptions Options { get; }
///
/// Gets the underlying gRPC client, if available.
///
MxAccessGateway.MxAccessGatewayClient? RawClient { get; }
///
/// Opens a new gateway session.
///
/// Session open request.
/// gRPC call options.
/// The session open reply.
Task OpenSessionAsync(
OpenSessionRequest request,
CallOptions callOptions);
///
/// Closes an open gateway session.
///
/// Session close request.
/// gRPC call options.
/// The session close reply.
Task CloseSessionAsync(
CloseSessionRequest request,
CallOptions callOptions);
///
/// Invokes an MXAccess command on the session.
///
/// The command request.
/// gRPC call options.
/// The command reply.
Task InvokeAsync(
MxCommandRequest request,
CallOptions callOptions);
///
/// Streams events from the session.
///
/// The stream events request.
/// gRPC call options.
/// An async enumerable of events.
IAsyncEnumerable StreamEventsAsync(
StreamEventsRequest request,
CallOptions callOptions);
///
/// Acknowledges an active MXAccess alarm condition.
///
/// The acknowledge request.
/// gRPC call options.
/// The acknowledge reply with native MxStatus.
Task AcknowledgeAlarmAsync(
AcknowledgeAlarmRequest request,
CallOptions callOptions);
///
/// Attaches to the gateway's central alarm feed — the current active-alarm
/// snapshot followed by live transitions.
///
/// The stream request, optionally scoped by alarm-reference prefix.
/// gRPC call options.
/// An async enumerable of alarm feed messages.
IAsyncEnumerable StreamAlarmsAsync(
StreamAlarmsRequest request,
CallOptions callOptions);
}