function SearchPager(opts) {
  assert.object(opts);
  assert.func(opts.callback);
  assert.number(opts.pageSize);

  EventEmitter.call(this, {});

  this.callback = opts.callback;
  this.controls = opts.controls;
  this.pageSize = opts.pageSize;
  this.pagePause = opts.pagePause;

  this.controls.forEach(function (control) {
    if (control.type === PagedControl.OID) {
      // The point of using SearchPager is not having to do this.
      // Toss an error if the pagedResultsControl is present
      throw new Error('redundant pagedResultControl');
    }
  });

  this.finished = false;
  this.started = false;

  var emitter = new EventEmitter();
  emitter.on('searchEntry', this.emit.bind(this, 'searchEntry'));
  emitter.on('end', this._onEnd.bind(this));
  emitter.on('error',  this._onError.bind(this));
  this.childEmitter = emitter;
}