blob: c7d2c8d5cfeca5d9ed05f8ce6938ba430d62c3d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
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
{
/// <summary>
/// Gets the collection of logged-in receivers.
/// </summary>
List<ExternalBridgeReceiver> ActiveReceivers { get; }
/// <summary>
/// Occurs when a new client is waiting for authentication.
/// </summary>
event EventHandler<ExternalBridgeClientConnectedEventArgs> ConnectionRequest;
/// <summary>
/// Occurs when the current full control session has disconnected.
/// </summary>
event EventHandler FullControlSessionDisconnected;
/// <summary>
/// Occurs when the service has received a new color profile request.
/// </summary>
event EventHandler<ColorProfileRequestEventArgs> ColorProfileRequest;
/// <summary>
/// Gets or sets the machine operator.
/// </summary>
IMachineOperator MachineOperator { get; set; }
/// <summary>
/// Gets or sets the machine.
/// </summary>
Machine Machine { get; set; }
/// <summary>
/// Gets or sets the SignalR configuration.
/// </summary>
ExternalBridgeSignalRConfiguration SignalRConfiguration { get; set; }
/// <summary>
/// Gets the current full control session receiver.
/// </summary>
ExternalBridgeReceiver FullControlSessionReceiver { get; }
/// <summary>
/// Gets or sets the TCP transport adapter write mode when creating a TCP receiver.
/// </summary>
TcpTransportAdapterWriteMode TcpTransportAdapterWriteMode { get; set; }
/// <summary>
/// Gets a value indicating whether this instance is started.
/// </summary>
bool IsStarted { get; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="IExternalBridgeService"/> is enabled.
/// </summary>
bool Enabled { get; set; }
/// <summary>
/// Gets a value indicating whether there are any connected sessions.
/// </summary>
bool HasSessions { get; }
/// <summary>
/// Starts this instance.
/// </summary>
void Start();
/// <summary>
/// Stops this instance.
/// </summary>
void Stop();
/// <summary>
/// Disconnects the current remote client session.
/// </summary>
void DisconnectFullControlSession();
/// <summary>
/// Registers the request handler.
/// </summary>
/// <param name="handler">The handler.</param>
void RegisterRequestHandler(IExternalBridgeRequestHandler handler);
/// <summary>
/// Unregisters the request handler.
/// </summary>
/// <param name="handler">The handler.</param>
void UnregisterRequestHandler(IExternalBridgeRequestHandler handler);
}
}
|