using Google.Protobuf;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Integration.Operation;
using Tango.PMR.Integration;
using Tango.Transport;
using Tango.Transport.Adapters;
using Tango.Transport.Transporters;
namespace Tango.Integration.ExternalBridge
{
public interface IExternalBridgeService
{
///
/// Gets the collection of logged-in receivers.
///
List ActiveReceivers { get; }
///
/// Occurs when a new client is waiting for authentication.
///
event EventHandler ConnectionRequest;
///
/// Occurs when the current full control session has disconnected.
///
event EventHandler FullControlSessionDisconnected;
///
/// Occurs when the service has received a new color profile request.
///
event EventHandler ColorProfileRequest;
///
/// Gets or sets the machine operator.
///
IMachineOperator MachineOperator { get; set; }
///
/// Gets or sets the machine.
///
Machine Machine { get; set; }
///
/// Gets or sets the SignalR configuration.
///
ExternalBridgeSignalRConfiguration SignalRConfiguration { get; set; }
///
/// Gets the current full control session receiver.
///
ExternalBridgeReceiver FullControlSessionReceiver { get; }
///
/// Gets or sets the TCP transport adapter write mode when creating a TCP receiver.
///
TcpTransportAdapterWriteMode TcpTransportAdapterWriteMode { get; set; }
///
/// Gets a value indicating whether this instance is started.
///
bool IsStarted { get; }
///
/// Gets or sets a value indicating whether this is enabled.
///
bool Enabled { get; set; }
///
/// Gets a value indicating whether there are any connected sessions.
///
bool HasSessions { get; }
///
/// Starts this instance.
///
void Start();
///
/// Stops this instance.
///
void Stop();
///
/// Disconnects the current remote client session.
///
void DisconnectFullControlSession();
///
/// Registers the request handler.
///
/// The handler.
void RegisterRequestHandler(IExternalBridgeRequestHandler handler);
///
/// Unregisters the request handler.
///
/// The handler.
void UnregisterRequestHandler(IExternalBridgeRequestHandler handler);
}
}