OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains type definitions for various remoting classes. | 5 // This file contains type definitions for various remoting classes. |
6 // It is used only with JSCompiler to verify the type-correctness of our code. | 6 // It is used only with JSCompiler to verify the type-correctness of our code. |
7 | 7 |
8 /** @suppress {duplicate} */ | 8 /** @suppress {duplicate} */ |
9 var remoting = remoting || {}; | 9 var remoting = remoting || {}; |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 /** @constructor | 25 /** @constructor |
26 */ | 26 */ |
27 remoting.ClipboardEvent = function() {}; | 27 remoting.ClipboardEvent = function() {}; |
28 | 28 |
29 /** @type {remoting.ClipboardData} */ | 29 /** @type {remoting.ClipboardData} */ |
30 remoting.ClipboardEvent.prototype.clipboardData; | 30 remoting.ClipboardEvent.prototype.clipboardData; |
31 | 31 |
32 /** @type {function(): void} */ | 32 /** @type {function(): void} */ |
33 remoting.ClipboardEvent.prototype.preventDefault; | 33 remoting.ClipboardEvent.prototype.preventDefault; |
34 | 34 |
35 | |
36 /** @constructor | |
37 * @extends HTMLElement | |
38 */ | |
39 remoting.HostPlugin = function() {}; | |
40 | |
41 /** @param {string} email The email address of the connector. | |
42 * @param {string} token The access token for the connector. | |
43 * @return {void} Nothing. */ | |
44 remoting.HostPlugin.prototype.connect = function(email, token) {}; | |
45 | |
46 /** @return {void} Nothing. */ | |
47 remoting.HostPlugin.prototype.disconnect = function() {}; | |
48 | |
49 /** @param {function(string):string} callback Pointer to chrome.i18n.getMessage. | |
50 * @return {void} Nothing. */ | |
51 remoting.HostPlugin.prototype.localize = function(callback) {}; | |
52 | |
53 /** @param {function(string):void} callback Callback to be called with the | |
54 * local hostname. | |
55 * @return {void} Nothing. */ | |
56 remoting.HostPlugin.prototype.getHostName = function(callback) {}; | |
57 | |
58 /** @param {string} hostId The host ID. | |
59 * @param {string} pin The PIN. | |
60 * @param {function(string):void} callback Callback to be called with the hash | |
61 * encoded with Base64. | |
62 * @return {void} Nothing. */ | |
63 remoting.HostPlugin.prototype.getPinHash = function(hostId, pin, callback) {}; | |
64 | |
65 /** @param {function(string, string):void} callback Callback to be called | |
66 * after new key is generated. | |
67 * @return {void} Nothing. */ | |
68 remoting.HostPlugin.prototype.generateKeyPair = function(callback) {}; | |
69 | |
70 /** | |
71 * Updates host config with the values specified in |config|. All | |
72 * fields that are not specified in |config| remain | |
73 * unchanged. Following parameters cannot be changed using this | |
74 * function: host_id, xmpp_login. Error is returned if |config| | |
75 * includes these paramters. Changes take effect before the callback | |
76 * is called. | |
77 * | |
78 * @param {string} config The new config parameters, JSON encoded dictionary. | |
79 * @param {function(remoting.HostController.AsyncResult):void} callback | |
80 * Callback to be called when finished. | |
81 * @return {void} Nothing. */ | |
82 remoting.HostPlugin.prototype.updateDaemonConfig = | |
83 function(config, callback) {}; | |
84 | |
85 /** @param {function(string):void} callback Callback to be called with | |
86 * the config. | |
87 * @return {void} Nothing. */ | |
88 remoting.HostPlugin.prototype.getDaemonConfig = function(callback) {}; | |
89 | |
90 /** @param {function(string):void} callback Callback to be called with | |
91 * the version, as a dotted string. | |
92 * @return {void} Nothing. */ | |
93 remoting.HostPlugin.prototype.getDaemonVersion = function(callback) {}; | |
94 | |
95 /** @param {function(boolean, boolean, boolean):void} callback Callback to be | |
96 * called with the consent. | |
97 * @return {void} Nothing. */ | |
98 remoting.HostPlugin.prototype.getUsageStatsConsent = function(callback) {}; | |
99 | |
100 /** @param {function(remoting.HostController.AsyncResult):void} callback | |
101 * Callback to be called when finished. | |
102 * @return {void} Nothing. */ | |
103 remoting.HostPlugin.prototype.installHost = function(callback) {}; | |
104 | |
105 /** @param {string} config Host configuration. | |
106 * @param {function(remoting.HostController.AsyncResult):void} callback | |
107 * Callback to be called when finished. | |
108 * @return {void} Nothing. */ | |
109 remoting.HostPlugin.prototype.startDaemon = function( | |
110 config, consent, callback) {}; | |
111 | |
112 /** @param {function(remoting.HostController.AsyncResult):void} callback | |
113 * Callback to be called when finished. | |
114 * @return {void} Nothing. */ | |
115 remoting.HostPlugin.prototype.stopDaemon = function(callback) {}; | |
116 | |
117 /** @param {function(string):void} callback Callback to be called with the | |
118 * JSON-encoded list of paired clients. | |
119 * @return {void} Nothing. | |
120 */ | |
121 remoting.HostPlugin.prototype.getPairedClients = function(callback) {}; | |
122 | |
123 /** @param {function(boolean):void} callback Callback to be called when | |
124 * finished. | |
125 * @return {void} Nothing. | |
126 */ | |
127 remoting.HostPlugin.prototype.clearPairedClients = function(callback) {}; | |
128 | |
129 /** @param {string} client Client id of the pairing to be deleted. | |
130 * @param {function(boolean):void} callback Callback to be called when | |
131 * finished. | |
132 * @return {void} Nothing. | |
133 */ | |
134 remoting.HostPlugin.prototype.deletePairedClient = function( | |
135 client, callback) {}; | |
136 | |
137 /** @type {number} */ remoting.HostPlugin.prototype.state; | |
138 | |
139 /** @type {number} */ remoting.HostPlugin.prototype.STARTING; | |
140 /** @type {number} */ remoting.HostPlugin.prototype.REQUESTED_ACCESS_CODE; | |
141 /** @type {number} */ remoting.HostPlugin.prototype.RECEIVED_ACCESS_CODE; | |
142 /** @type {number} */ remoting.HostPlugin.prototype.CONNECTED; | |
143 /** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTED; | |
144 /** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTING; | |
145 /** @type {number} */ remoting.HostPlugin.prototype.ERROR; | |
146 | |
147 /** @type {string} */ remoting.HostPlugin.prototype.accessCode; | |
148 /** @type {number} */ remoting.HostPlugin.prototype.accessCodeLifetime; | |
149 | |
150 /** @type {string} */ remoting.HostPlugin.prototype.client; | |
151 | |
152 /** @type {remoting.HostController.State} */ | |
153 remoting.HostPlugin.prototype.daemonState; | |
154 | |
155 /** @type {function(boolean):void} */ | |
156 remoting.HostPlugin.prototype.onNatTraversalPolicyChanged; | |
157 | |
158 /** @type {string} */ remoting.HostPlugin.prototype.xmppServerAddress; | |
159 /** @type {boolean} */ remoting.HostPlugin.prototype.xmppServerUseTls; | |
160 /** @type {string} */ remoting.HostPlugin.prototype.directoryBotJid; | |
161 /** @type {string} */ remoting.HostPlugin.prototype.supportedFeatures; | |
162 | |
163 | |
164 /** @constructor | 35 /** @constructor |
165 * @extends HTMLEmbedElement | 36 * @extends HTMLEmbedElement |
166 */ | 37 */ |
167 remoting.ViewerPlugin = function() { }; | 38 remoting.ViewerPlugin = function() { }; |
168 | 39 |
169 /** @param {string} message The message to send to the host. */ | 40 /** @param {string} message The message to send to the host. */ |
170 remoting.ViewerPlugin.prototype.postMessage = function(message) {}; | 41 remoting.ViewerPlugin.prototype.postMessage = function(message) {}; |
171 | 42 |
172 | 43 |
173 /** @constructor | 44 /** @constructor |
174 */ | 45 */ |
175 remoting.WcsIqClient = function() {}; | 46 remoting.WcsIqClient = function() {}; |
176 | 47 |
177 /** @param {function(Array.<string>): void} onMsg The function called when a | 48 /** @param {function(Array.<string>): void} onMsg The function called when a |
178 * message is received. | 49 * message is received. |
179 * @return {void} Nothing. */ | 50 * @return {void} Nothing. */ |
180 remoting.WcsIqClient.prototype.setOnMessage = function(onMsg) {}; | 51 remoting.WcsIqClient.prototype.setOnMessage = function(onMsg) {}; |
181 | 52 |
182 /** @return {void} Nothing. */ | 53 /** @return {void} Nothing. */ |
183 remoting.WcsIqClient.prototype.connectChannel = function() {}; | 54 remoting.WcsIqClient.prototype.connectChannel = function() {}; |
184 | 55 |
185 /** @param {string} stanza An IQ stanza. | 56 /** @param {string} stanza An IQ stanza. |
186 * @return {void} Nothing. */ | 57 * @return {void} Nothing. */ |
187 remoting.WcsIqClient.prototype.sendIq = function(stanza) {}; | 58 remoting.WcsIqClient.prototype.sendIq = function(stanza) {}; |
188 | 59 |
189 /** @param {string} token An OAuth2 access token. | 60 /** @param {string} token An OAuth2 access token. |
190 * @return {void} Nothing. */ | 61 * @return {void} Nothing. */ |
191 remoting.WcsIqClient.prototype.updateAccessToken = function(token) {}; | 62 remoting.WcsIqClient.prototype.updateAccessToken = function(token) {}; |
OLD | NEW |