1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains type definitions for the host plugin. It is used only
6 // with JSCompiler to verify the type-correctness of our code.
8 /** @suppress {duplicate} */
9 var remoting
= remoting
|| {};
12 * @extends HTMLElement
14 remoting
.HostPlugin = function() {};
16 /** @param {string} email The email address of the connector.
17 * @param {string} token The access token for the connector.
18 * @return {void} Nothing. */
19 remoting
.HostPlugin
.prototype.connect = function(email
, token
) {};
21 /** @return {void} Nothing. */
22 remoting
.HostPlugin
.prototype.disconnect = function() {};
24 /** @param {function(string):string} callback Pointer to chrome.i18n.getMessage.
25 * @return {void} Nothing. */
26 remoting
.HostPlugin
.prototype.localize = function(callback
) {};
28 /** @param {function(string):void} callback Callback to be called with the
30 * @return {void} Nothing. */
31 remoting
.HostPlugin
.prototype.getHostName = function(callback
) {};
33 /** @param {string} hostId The host ID.
34 * @param {string} pin The PIN.
35 * @param {function(string):void} callback Callback to be called with the hash
36 * encoded with Base64.
37 * @return {void} Nothing. */
38 remoting
.HostPlugin
.prototype.getPinHash = function(hostId
, pin
, callback
) {};
40 /** @param {function(string, string):void} callback Callback to be called
41 * after new key is generated.
42 * @return {void} Nothing. */
43 remoting
.HostPlugin
.prototype.generateKeyPair = function(callback
) {};
46 * Updates host config with the values specified in |config|. All
47 * fields that are not specified in |config| remain
48 * unchanged. Following parameters cannot be changed using this
49 * function: host_id, xmpp_login. Error is returned if |config|
50 * includes these paramters. Changes take effect before the callback
53 * @param {string} config The new config parameters, JSON encoded dictionary.
54 * @param {function(remoting.HostController.AsyncResult):void} callback
55 * Callback to be called when finished.
56 * @return {void} Nothing. */
57 remoting
.HostPlugin
.prototype.updateDaemonConfig
=
58 function(config
, callback
) {};
60 /** @param {function(string):void} callback Callback to be called with
62 * @return {void} Nothing. */
63 remoting
.HostPlugin
.prototype.getDaemonConfig = function(callback
) {};
65 /** @param {function(string):void} callback Callback to be called with
66 * the version, as a dotted string.
67 * @return {void} Nothing. */
68 remoting
.HostPlugin
.prototype.getDaemonVersion = function(callback
) {};
70 /** @param {function(boolean, boolean, boolean):void} callback Callback to be
71 * called with the consent.
72 * @return {void} Nothing. */
73 remoting
.HostPlugin
.prototype.getUsageStatsConsent = function(callback
) {};
75 /** @param {string} config Host configuration.
76 * @param {function(remoting.HostController.AsyncResult):void} callback
77 * Callback to be called when finished.
78 * @return {void} Nothing. */
79 remoting
.HostPlugin
.prototype.startDaemon = function(
80 config
, consent
, callback
) {};
82 /** @param {function(remoting.HostController.AsyncResult):void} callback
83 * Callback to be called when finished.
84 * @return {void} Nothing. */
85 remoting
.HostPlugin
.prototype.stopDaemon = function(callback
) {};
87 /** @param {function(string):void} callback Callback to be called with the
88 * JSON-encoded list of paired clients.
89 * @return {void} Nothing.
91 remoting
.HostPlugin
.prototype.getPairedClients = function(callback
) {};
93 /** @param {function(boolean):void} callback Callback to be called when
95 * @return {void} Nothing.
97 remoting
.HostPlugin
.prototype.clearPairedClients = function(callback
) {};
99 /** @param {string} client Client id of the pairing to be deleted.
100 * @param {function(boolean):void} callback Callback to be called when
102 * @return {void} Nothing.
104 remoting
.HostPlugin
.prototype.deletePairedClient = function(
105 client
, callback
) {};
107 /** @type {number} */ remoting
.HostPlugin
.prototype.state
;
109 /** @type {number} */ remoting
.HostPlugin
.prototype.STARTING
;
110 /** @type {number} */ remoting
.HostPlugin
.prototype.REQUESTED_ACCESS_CODE
;
111 /** @type {number} */ remoting
.HostPlugin
.prototype.RECEIVED_ACCESS_CODE
;
112 /** @type {number} */ remoting
.HostPlugin
.prototype.CONNECTED
;
113 /** @type {number} */ remoting
.HostPlugin
.prototype.DISCONNECTED
;
114 /** @type {number} */ remoting
.HostPlugin
.prototype.DISCONNECTING
;
115 /** @type {number} */ remoting
.HostPlugin
.prototype.ERROR
;
117 /** @type {string} */ remoting
.HostPlugin
.prototype.accessCode
;
118 /** @type {number} */ remoting
.HostPlugin
.prototype.accessCodeLifetime
;
120 /** @type {string} */ remoting
.HostPlugin
.prototype.client
;
122 /** @type {remoting.HostController.State} */
123 remoting
.HostPlugin
.prototype.daemonState
;
125 /** @type {function(boolean):void} */
126 remoting
.HostPlugin
.prototype.onNatTraversalPolicyChanged
;
128 /** @type {string} */ remoting
.HostPlugin
.prototype.xmppServerAddress
;
129 /** @type {boolean} */ remoting
.HostPlugin
.prototype.xmppServerUseTls
;
130 /** @type {string} */ remoting
.HostPlugin
.prototype.directoryBotJid
;
131 /** @type {string} */ remoting
.HostPlugin
.prototype.supportedFeatures
;