1 // Copyright 2014 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.
7 * API for host-list management.
12 /** @suppress {duplicate} */
13 var remoting
= remoting
|| {};
16 remoting
.HostListApi = function() {
20 * @param {string} newHostId
21 * @param {string} hostName
22 * @param {string} publicKey
23 * @param {?string} hostClientId
24 * @return {!Promise<string>} An OAuth2 auth code or the empty string.
26 remoting
.HostListApi
.prototype.register
;
29 * Fetch the list of hosts for a user.
31 * @return {!Promise<!Array<!remoting.Host>>}
33 remoting
.HostListApi
.prototype.get = function() {
37 * Update the information for a host.
39 * @param {string} hostId
40 * @param {string} hostName
41 * @param {string} hostPublicKey
42 * @return {!Promise<void>}
44 remoting
.HostListApi
.prototype.put
=
45 function(hostId
, hostName
, hostPublicKey
) {
51 * @param {string} hostId
52 * @return {!Promise<void>}
54 remoting
.HostListApi
.prototype.remove = function(hostId
) {