| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * API for host-list management. | 7 * API for host-list management. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
| 13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
| 14 | 14 |
| 15 /** @interface */ | 15 /** @interface */ |
| 16 remoting.HostListApi = function() { | 16 remoting.HostListApi = function() { |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Fetch the list of hosts for a user. | 20 * Fetch the list of hosts for a user. |
| 21 * | 21 * |
| 22 * @param {function(Array<remoting.Host>):void} onDone | 22 * @param {function(Array<remoting.Host>):void} onDone |
| 23 * @param {function(remoting.Error):void} onError | 23 * @param {function(!remoting.Error):void} onError |
| 24 */ | 24 */ |
| 25 remoting.HostListApi.prototype.get = function(onDone, onError) { | 25 remoting.HostListApi.prototype.get = function(onDone, onError) { |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Update the information for a host. | 29 * Update the information for a host. |
| 30 * | 30 * |
| 31 * @param {function():void} onDone | 31 * @param {function():void} onDone |
| 32 * @param {function(remoting.Error):void} onError | 32 * @param {function(!remoting.Error):void} onError |
| 33 * @param {string} hostId | 33 * @param {string} hostId |
| 34 * @param {string} hostName | 34 * @param {string} hostName |
| 35 * @param {string} hostPublicKey | 35 * @param {string} hostPublicKey |
| 36 */ | 36 */ |
| 37 remoting.HostListApi.prototype.put = | 37 remoting.HostListApi.prototype.put = |
| 38 function(hostId, hostName, hostPublicKey, onDone, onError) { | 38 function(hostId, hostName, hostPublicKey, onDone, onError) { |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Delete a host. | 42 * Delete a host. |
| 43 * | 43 * |
| 44 * @param {function():void} onDone | 44 * @param {function():void} onDone |
| 45 * @param {function(remoting.Error):void} onError | 45 * @param {function(!remoting.Error):void} onError |
| 46 * @param {string} hostId | 46 * @param {string} hostId |
| 47 */ | 47 */ |
| 48 remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) { | 48 remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) { |
| 49 }; | 49 }; |
| OLD | NEW |