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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview
* Interface abstracting the ClientPlugin functionality.
*/
'use strict';
/** @suppress {duplicate} */
var remoting = remoting || {};
/**
* @interface
* @extends {base.Disposable}
*/
remoting.ClientPlugin = function() {};
/**
* @return {remoting.HostDesktop}
*/
remoting.ClientPlugin.prototype.hostDesktop = function() {};
/**
* @return {HTMLElement} The DOM element representing the remote session.
*/
remoting.ClientPlugin.prototype.element = function() {};
/**
* @param {function(boolean):void} onDone Completion callback.
*/
remoting.ClientPlugin.prototype.initialize = function(onDone) {};
/**
* @param {remoting.Host} host The host to connect to.
* @param {string} localJid Local jid.
* @param {remoting.CredentialsProvider} credentialsProvider
*/
remoting.ClientPlugin.prototype.connect =
function(host, localJid, credentialsProvider) {};
/**
* @param {number} key The keycode to inject.
* @param {boolean} down True for press; false for a release.
*/
remoting.ClientPlugin.prototype.injectKeyEvent =
function(key, down) {};
/**
* Sends a key combination to the host, by sending down events for
* the given keys, followed by up events in reverse order.
*
* @param {Array<number>} keys Key codes to be sent.
* @return {void} Nothing.
*/
remoting.ClientPlugin.prototype.injectKeyCombination = function(keys) {};
/**
* Sets and stores the key remapping setting for the current host.
*
* @param {string} remappings Comma separated list of key remappings.
*/
remoting.ClientPlugin.prototype.setRemapKeys = function(remappings) {};
/**
* @param {number} from
* @param {number} to
*/
remoting.ClientPlugin.prototype.remapKey = function(from, to) {};
/**
* Release all keys currently being pressed.
*/
remoting.ClientPlugin.prototype.releaseAllKeys = function() {};
/**
* @param {string} iq
*/
remoting.ClientPlugin.prototype.onIncomingIq = function(iq) {};
/**
* @return {boolean} True if the web-app and plugin are compatible.
*/
remoting.ClientPlugin.prototype.isSupportedVersion = function() {};
/**
* @param {remoting.ClientPlugin.Feature} feature
* @return {boolean} True if the plugin supports the specified feature.
*/
remoting.ClientPlugin.prototype.hasFeature = function(feature) {};
/**
* Sends a clipboard item to the host.
*
* @param {string} mimeType The MIME type of the clipboard item.
* @param {string} item The clipboard item.
*/
remoting.ClientPlugin.prototype.sendClipboardItem =
function(mimeType, item) {};
/**
* Request that this client be paired with the current host.
*
* @param {string} clientName The human-readable name of the client.
* @param {function(string, string):void} onDone Callback to receive the
* client id and shared secret when they are available.
*/
remoting.ClientPlugin.prototype.requestPairing =
function(clientName, onDone) {};
/**
* Allows automatic mouse-lock.
*/
remoting.ClientPlugin.prototype.allowMouseLock = function() {};
/**
* @param {boolean} pause True to pause the audio stream; false to resume it.
*/
remoting.ClientPlugin.prototype.pauseAudio = function(pause) {};
/**
* @param {boolean} pause True to pause the video stream; false to resume it.
*/
remoting.ClientPlugin.prototype.pauseVideo = function(pause) {};
/**
* @return {remoting.ClientSession.PerfStats} A summary of the connection
* performance.
*/
remoting.ClientPlugin.prototype.getPerfStats = function() {};
/**
* Send an extension message to the host.
*
* @param {string} name
* @param {string} data
*/
remoting.ClientPlugin.prototype.sendClientMessage =
function(name, data) {};
/**
* @param {remoting.ClientPlugin.ConnectionEventHandler} handler
*/
remoting.ClientPlugin.prototype.setConnectionEventHandler =
function(handler) {};
/**
* @param {function(string, number, number):void} handler Callback for
* processing large mouse cursor images. The first parameter is a data:
* URL encoding the mouse cursor; the second and third parameters are
* the cursor hotspot's x- and y-coordinates, respectively.
*/
remoting.ClientPlugin.prototype.setMouseCursorHandler =
function(handler) {};
/**
* @param {function({rects:Array<Array<number>>}):void|null} handler Callback
* to receive dirty region information for each video frame, for debugging.
*/
remoting.ClientPlugin.prototype.setDebugDirtyRegionHandler =
function(handler) {};
/**
* Set of features for which hasFeature() can be used to test.
*
* @enum {string}
*/
remoting.ClientPlugin.Feature = {
INJECT_KEY_EVENT: 'injectKeyEvent',
NOTIFY_CLIENT_RESOLUTION: 'notifyClientResolution',
ASYNC_PIN: 'asyncPin',
PAUSE_VIDEO: 'pauseVideo',
PAUSE_AUDIO: 'pauseAudio',
REMAP_KEY: 'remapKey',
SEND_CLIPBOARD_ITEM: 'sendClipboardItem',
THIRD_PARTY_AUTH: 'thirdPartyAuth',
TRAP_KEY: 'trapKey',
PINLESS_AUTH: 'pinlessAuth',
ALLOW_MOUSE_LOCK: 'allowMouseLock',
EXTENSION_MESSAGE: 'extensionMessage',
VIDEO_CONTROL: 'videoControl'
};
/**
* @interface
*/
remoting.ClientPlugin.ConnectionEventHandler = function() {};
/**
* @param {string} iq
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onOutgoingIq =
function(iq) {};
/**
* @param {string} msg
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onDebugMessage =
function(msg) {};
/**
* @param {remoting.ClientSession.State} status The plugin's status.
* @param {remoting.ClientSession.ConnectionError} error The plugin's error
* state, if any.
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.
onConnectionStatusUpdate = function(status, error) {};
/**
* @param {string} channel The channel name.
* @param {string} connectionType The new connection type.
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onRouteChanged =
function(channel, connectionType) {};
/**
* @param {boolean} ready True if the connection is ready.
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onConnectionReady =
function(ready) {};
/**
* @param {!Array<string>} capabilities The set of capabilities negotiated
* between the client and host.
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onSetCapabilities =
function(capabilities) {};
/**
* @param {string} type
* @param {string} data
*/
remoting.ClientPlugin.ConnectionEventHandler.prototype.onExtensionMessage =
function(type, data) {};
/**
* @interface
*/
remoting.ClientPluginFactory = function() {};
/**
* @param {Element} container The container for the embed element.
* @param {Array<string>} requiredCapabilities
* @return {remoting.ClientPlugin} A new client plugin instance.
*/
remoting.ClientPluginFactory.prototype.createPlugin =
function(container, requiredCapabilities) {};
/**
* Preload the plugin to make instantiation faster when the user tries
* to connect.
*/
remoting.ClientPluginFactory.prototype.preloadPlugin = function() {};
/**
* @type {remoting.ClientPluginFactory}
*/
remoting.ClientPlugin.factory = null;
|