Revert 168224 - Update V8 to version 3.15.4.
[chromium-blink-merge.git] / remoting / webapp / host_plugin_proto.js
blobf8459659d241d120a5d3e9c20318afaa1a6efc1f
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 || {};
11 /** @constructor
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 /** @return {string} Local hostname. */
29 remoting.HostPlugin.prototype.getHostName = function() {};
31 /** @param {string} hostId The host ID.
32 * @param {string} pin The PIN.
33 * @return {string} The hash encoded with Base64. */
34 remoting.HostPlugin.prototype.getPinHash = function(hostId, pin) {};
36 /** @param {function(string, string):void} callback Callback to be called
37 * after new key is generated.
38 * @return {void} Nothing. */
39 remoting.HostPlugin.prototype.generateKeyPair = function(callback) {};
41 /**
42 * Updates host config with the values specified in |config|. All
43 * fields that are not specified in |config| remain
44 * unchanged. Following parameters cannot be changed using this
45 * function: host_id, xmpp_login. Error is returned if |config|
46 * includes these paramters. Changes take effect before the callback
47 * is called.
49 * @param {string} config The new config parameters, JSON encoded dictionary.
50 * @param {function(remoting.HostController.AsyncResult):void} callback
51 * Callback to be called when finished.
52 * @return {void} Nothing. */
53 remoting.HostPlugin.prototype.updateDaemonConfig =
54 function(config, callback) {};
56 /** @param {function(string):void} callback Callback to be called with
57 * the config.
58 * @return {void} Nothing. */
59 remoting.HostPlugin.prototype.getDaemonConfig = function(callback) {};
61 /** @param {function(string):void} callback Callback to be called with
62 * the version, as a dotted string.
63 * @return {void} Nothing. */
64 remoting.HostPlugin.prototype.getDaemonVersion = function(callback) {};
66 /** @param {function(boolean, boolean, boolean):void} callback Callback to be
67 * called with the consent.
68 * @return {void} Nothing. */
69 remoting.HostPlugin.prototype.getUsageStatsConsent = function(callback) {};
71 /** @param {string} config Host configuration.
72 * @param {function(remoting.HostController.AsyncResult):void} callback
73 * Callback to be called when finished.
74 * @return {void} Nothing. */
75 remoting.HostPlugin.prototype.startDaemon = function(
76 config, consent, callback) {};
78 /** @param {function(remoting.HostController.AsyncResult):void} callback
79 * Callback to be called when finished.
80 * @return {void} Nothing. */
81 remoting.HostPlugin.prototype.stopDaemon = function(callback) {};
83 /** @type {number} */ remoting.HostPlugin.prototype.state;
85 /** @type {number} */ remoting.HostPlugin.prototype.STARTING;
86 /** @type {number} */ remoting.HostPlugin.prototype.REQUESTED_ACCESS_CODE;
87 /** @type {number} */ remoting.HostPlugin.prototype.RECEIVED_ACCESS_CODE;
88 /** @type {number} */ remoting.HostPlugin.prototype.CONNECTED;
89 /** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTED;
90 /** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTING;
91 /** @type {number} */ remoting.HostPlugin.prototype.ERROR;
93 /** @type {string} */ remoting.HostPlugin.prototype.accessCode;
94 /** @type {number} */ remoting.HostPlugin.prototype.accessCodeLifetime;
96 /** @type {string} */ remoting.HostPlugin.prototype.client;
98 /** @type {remoting.HostController.State} */
99 remoting.HostPlugin.prototype.daemonState;
101 /** @type {function(boolean):void} */
102 remoting.HostPlugin.prototype.onNatTraversalPolicyChanged;