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 {string} pin The new PIN.
29 * @return {boolean} True if the PIN was changed successfully. */
30 remoting
.HostPlugin
.prototype.setDaemonPin = function(pin
) { return false; };
32 /** @return {boolean} True if successful (poll daemonState for completion). */
33 remoting
.HostPlugin
.prototype.startDaemon = function() { return false; };
35 /** @return {boolean} True if successful. */
36 remoting
.HostPlugin
.prototype.stopDaemon = function() { return false; };
38 /** @type {number} */ remoting
.HostPlugin
.prototype.state
;
40 /** @type {number} */ remoting
.HostPlugin
.prototype.STARTING
;
41 /** @type {number} */ remoting
.HostPlugin
.prototype.REQUESTED_ACCESS_CODE
;
42 /** @type {number} */ remoting
.HostPlugin
.prototype.RECEIVED_ACCESS_CODE
;
43 /** @type {number} */ remoting
.HostPlugin
.prototype.CONNECTED
;
44 /** @type {number} */ remoting
.HostPlugin
.prototype.DISCONNECTED
;
45 /** @type {number} */ remoting
.HostPlugin
.prototype.DISCONNECTING
;
46 /** @type {number} */ remoting
.HostPlugin
.prototype.ERROR
;
48 /** @type {string} */ remoting
.HostPlugin
.prototype.accessCode
;
49 /** @type {number} */ remoting
.HostPlugin
.prototype.accessCodeLifetime
;
51 /** @type {string} */ remoting
.HostPlugin
.prototype.client
;
53 /** @type {remoting.DaemonPlugin.State} */
54 remoting
.HostPlugin
.prototype.daemonState
;
56 /** @type {function(boolean):void} */
57 remoting
.HostPlugin
.prototype.onNatTraversalPolicyChanged
;