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.
6 * @fileoverview Provides a "bottom half" helper to assist with raw enroll
12 * A helper for enroll requests.
13 * @extends {Closeable}
16 function EnrollHelper() {}
19 * Attempts to enroll using the provided data.
20 * @param {Array} enrollChallenges an array enroll challenges.
21 * @param {Array.<SignHelperChallenge>} signChallenges a list of sign
22 * challenges for already enrolled gnubbies, to prevent double-enrolling a
25 EnrollHelper.prototype.doEnroll =
26 function(enrollChallenges, signChallenges) {};
28 /** Closes this helper. */
29 EnrollHelper.prototype.close = function() {};
32 * A factory for creating enroll helpers.
35 function EnrollHelperFactory() {}
38 * Creates a new enroll helper.
39 * @param {!Countdown} timer Timer after whose expiration the caller is no
40 * longer interested in the result of an enroll request.
41 * @param {function(number, boolean)} errorCb Called when an enroll request
42 * fails with an error code and whether any gnubbies were found.
43 * @param {function(string, string)} successCb Called with the result of a
44 * successful enroll request, along with the version of the gnubby that
46 * @param {(function(number, boolean)|undefined)} opt_progressCb Called with
47 * progress updates to the enroll request.
48 * @param {string=} opt_logMsgUrl A URL to post log messages to.
49 * @return {EnrollHelper} the newly created helper.
51 EnrollHelperFactory.prototype.createHelper =
52 function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {};