OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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. |
| 4 |
| 5 /** |
| 6 * @fileoverview Provides a "bottom half" helper to assist with raw sign |
| 7 * requests. |
| 8 * @author juanlang@google.com (Juan Lang) |
| 9 */ |
| 10 'use strict'; |
| 11 |
| 12 /** |
| 13 * A helper for sign requests. |
| 14 * @extends {Closeable} |
| 15 * @interface |
| 16 */ |
| 17 function SignHelper() {} |
| 18 |
| 19 /** |
| 20 * Attempts to sign the provided challenges. |
| 21 * @param {Array.<SignHelperChallenge>} challenges the new challenges to sign. |
| 22 * @return {boolean} whether the challenges were successfully added. |
| 23 */ |
| 24 SignHelper.prototype.doSign = function(challenges) {}; |
| 25 |
| 26 /** Closes this helper. */ |
| 27 SignHelper.prototype.close = function() {}; |
| 28 |
| 29 /** |
| 30 * A factory for creating sign helpers. |
| 31 * @interface |
| 32 */ |
| 33 function SignHelperFactory() {} |
| 34 |
| 35 /** |
| 36 * Creates a new sign helper. |
| 37 * @param {Countdown} timer Timer after whose expiration the caller is no longer |
| 38 * interested in the result of a sign request. |
| 39 * @param {function(number, boolean)} errorCb Called when a sign request fails |
| 40 * with an error code and whether any gnubbies were found. |
| 41 * @param {function(SignHelperChallenge, string)} successCb Called with the |
| 42 * signature produced by a successful sign request. |
| 43 * @param {(function(number, boolean)|undefined)} opt_progressCb Called with |
| 44 * progress updates to the sign request. |
| 45 * @param {string=} opt_logMsgUrl A URL to post log messages to. |
| 46 * @return {SignHelper} The newly created helper. |
| 47 */ |
| 48 SignHelperFactory.prototype.createHelper = |
| 49 function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {}; |
OLD | NEW |