Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / remoting / webapp / crd / js / host_list_api.js
blob9b63ccb71c38a2a29891257a3ee14eeb1a47e26f
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.
5 /**
6 * @fileoverview
7 * API for host-list management.
8 */
10 'use strict';
12 /** @suppress {duplicate} */
13 var remoting = remoting || {};
15 /** @interface */
16 remoting.HostListApi = function() {
19 /**
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;
28 /**
29 * Fetch the list of hosts for a user.
31 * @return {!Promise<!Array<!remoting.Host>>}
33 remoting.HostListApi.prototype.get = function() {
36 /**
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) {
48 /**
49 * Delete a host.
51 * @param {string} hostId
52 * @return {!Promise<void>}
54 remoting.HostListApi.prototype.remove = function(hostId) {