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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using Tango.RemoteDesktop.Frames;
using Tango.RemoteDesktop.Network;
namespace Tango.FSE.Common.RemoteDesktop
{
/// <summary>
/// Represents a machine PPC remote desktop provider.
/// </summary>
public interface IRemoteDesktopProvider
{
/// <summary>
/// Occurs when a remote desktop session has started.
/// </summary>
event EventHandler SessionStarted;
/// <summary>
/// Occurs when a remote desktop session has stopped.
/// </summary>
event EventHandler SessionStopped;
/// <summary>
/// Occurs when a new remote desktop screen frame is available.
/// </summary>
event EventHandler<DesktopFrameReceivedEventArgs> FrameReceived;
/// <summary>
/// Gets the current remote desktop session frame rate.
/// </summary>
double FrameRate { get; }
/// <summary>
/// Gets the current remote desktop session frame width.
/// </summary>
int FrameWidth { get; }
/// <summary>
/// Gets the current remote desktop session frame height.
/// </summary>
int FrameHeight { get; }
/// <summary>
/// Gets a value indicating whether the WebRTC channel is available.
/// </summary>
bool IsWebRtcActive { get; }
/// <summary>
/// Gets or sets a value indicating whether enable the WebRTC channel.
/// </summary>
bool EnableWebRtc { get; set; }
/// <summary>
/// Gets a value indicating whether a remote desktop session is active.
/// </summary>
bool InSession { get; }
/// <summary>
/// Gets a value indicating whether a remote desktop session can be started.
/// </summary>
bool CanStartSession { get; }
/// <summary>
/// Gets or sets the mouse move send interval.
/// </summary>
TimeSpan MouseMoveInterval { get; set; }
/// <summary>
/// Starts a remote desktop session.
/// </summary>
/// <returns></returns>
Task StartSession();
/// <summary>
/// Ends the current remote desktop session.
/// </summary>
/// <returns></returns>
Task EndSession();
/// <summary>
/// Creates a video recording handler.
/// </summary>
/// <returns></returns>
VideoRecordingHandler CreateRecordingHandler();
/// <summary>
/// Sends a mouse down command to the remote PPC.
/// </summary>
/// <param name="button">The button.</param>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void MouseDown(MouseButton button, Point location, Size viewSize);
/// <summary>
/// Sends a mouse up command to the remote PPC.
/// </summary>
/// <param name="button">The button.</param>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void MouseUp(MouseButton button, Point location, Size viewSize);
/// <summary>
/// Sends a mouse move command to the remote PPC.
/// </summary>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void MouseMove(Point location, Size viewSize);
/// <summary>
/// Sends a mouse double click command to the remote PPC.
/// </summary>
/// <param name="button">The button.</param>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void MouseDoubleClick(MouseButton button, Point location, Size viewSize);
/// <summary>
/// Send a mouse scroll command to the remote PPC.
/// </summary>
/// <param name="delta">The delta.</param>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void MouseScroll(int delta, Point location, Size viewSize);
/// <summary>
/// Sends a touch down command to the remote PPC.
/// </summary>
/// <param name="location">The location.</param>
/// <param name="viewSize">Size of the view.</param>
void TouchDown(Point location, Size viewSize);
/// <summary>
/// Sends a touch move command to the remote PPC.
/// </summary>
/// <param name="deltaX">The delta x.</param>
/// <param name="deltaY">The delta y.</param>
/// <param name="viewSize">Size of the view.</param>
void TouchMove(int deltaX, int deltaY, Size viewSize);
/// <summary>
/// Sends a touch up command to the remote PPC.
/// </summary>
void TouchUp();
/// <summary>
/// Sends a key down command to the remote PPC.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="ctrlDown">if set to <c>true</c> [control down].</param>
/// <param name="shitDown">if set to <c>true</c> [shit down].</param>
/// <param name="altDown">if set to <c>true</c> [alt down].</param>
void KeyboardDown(Key key, bool ctrlDown, bool shitDown, bool altDown);
/// <summary>
/// Sends a key up command to the remote PPC.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="ctrlDown">if set to <c>true</c> [control down].</param>
/// <param name="shitDown">if set to <c>true</c> [shit down].</param>
/// <param name="altDown">if set to <c>true</c> [alt down].</param>
void KeyboardUp(Key key, bool ctrlDown, bool shitDown, bool altDown);
/// <summary>
/// Sends the specified predefined remote desktop command.
/// </summary>
/// <param name="command">The command.</param>
void SendCommand(RemoteDesktopCommand command);
/// <summary>
/// Sets the remote cursor visibility.
/// </summary>
/// <param name="visible">if set to <c>true</c> [visible].</param>
void SetRemoteCursorVisibility(bool visible);
/// <summary>
/// Gets a single remote desktop screen-shot.
/// </summary>
/// <returns></returns>
Task<RasterFrame> GetDesktopScreenShot();
}
}
|