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 * Fetch the list of hosts for a user.
22 * @param {function(Array<remoting.Host>):void} onDone
23 * @param {function(remoting.Error):void} onError
25 remoting.HostListApi.prototype.get = function(onDone, onError) {
29 * Update the information for a host.
31 * @param {function():void} onDone
32 * @param {function(remoting.Error):void} onError
33 * @param {string} hostId
34 * @param {string} hostName
35 * @param {string} hostPublicKey
37 remoting.HostListApi.prototype.put =
38 function(hostId, hostName, hostPublicKey, onDone, onError) {
44 * @param {function():void} onDone
45 * @param {function(remoting.Error):void} onError
46 * @param {string} hostId
48 remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) {