using adas_core.Domain.Enums;
using adas_core.Domain.Models;
using adas_core.Domain.Models.SignalR;
namespace adas_core.Application.Services.Interfaces;
public interface IClientMessageService
{
///
/// Asynchronously sends a message to the specified receiver, optionally categorized by an operation type.
///
/// The identifier of the intended message receiver.
/// The optional operation type used to classify the message.
/// The optional message payload to be sent.
/// A task that represents the asynchronous send operation.
Task SendAsync(string receiverId, OperationType? type, object? msg);
///
/// Asynchronously broadcasts a message of the specified operation type to all connected recipients.
///
/// The operation type that classifies the broadcast message.
/// The message payload to send, or null when no payload is required.
/// A task that represents the asynchronous broadcast operation.
Task SendToAllAsync(OperationType type, object? msg);
///
/// Processes an incoming message within the context of the specified connection.
///
/// The message to be processed.
/// The identifier of the connection context associated with the message.
Task ProcessMessage(Message msg, string contextConnectionId);
///
/// Sends an update message to the specified list of patient location boxes.
///
/// The list of patient locations that will receive the update message.
void SendUpdateMessageToBoxes(List boxes);
}