Blame storage/mozIStorageStatementCallback.idl

Packit f0b94e
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
Packit f0b94e
 * vim: sw=2 ts=2 sts=2 expandtab 
Packit f0b94e
 * This Source Code Form is subject to the terms of the Mozilla Public
Packit f0b94e
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Packit f0b94e
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Packit f0b94e
Packit f0b94e
#include "nsISupports.idl"
Packit f0b94e
Packit f0b94e
interface mozIStorageResultSet;
Packit f0b94e
interface mozIStorageError;
Packit f0b94e
Packit f0b94e
[scriptable, uuid(29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa)]
Packit f0b94e
interface mozIStorageStatementCallback : nsISupports {
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Called when some result is obtained from the database.  This function can
Packit f0b94e
   * be called more than once with a different storageIResultSet each time for
Packit f0b94e
   * any given asynchronous statement.
Packit f0b94e
   *
Packit f0b94e
   * @param aResultSet
Packit f0b94e
   *        The result set containing the data from the database.
Packit f0b94e
   */
Packit f0b94e
  void handleResult(in mozIStorageResultSet aResultSet);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Called when some error occurs while executing the statement.  This function
Packit f0b94e
   * may be called more than once with a different storageIError each time for
Packit f0b94e
   * any given asynchronous statement.
Packit f0b94e
   *
Packit f0b94e
   * @param aError
Packit f0b94e
   *        An object containing information about the error.
Packit f0b94e
   */
Packit f0b94e
  void handleError(in mozIStorageError aError);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Called when the statement has finished executing.  This function will only
Packit f0b94e
   * be called once for any given asynchronous statement.
Packit f0b94e
   *
Packit f0b94e
   * @param aReason
Packit f0b94e
   *        Indicates if the statement is no longer executing because it either
Packit f0b94e
   *        finished (REASON_FINISHED), was canceled (REASON_CANCELED), or
Packit f0b94e
   *        a fatal error occurred (REASON_ERROR).
Packit f0b94e
   */
Packit f0b94e
  const unsigned short REASON_FINISHED = 0;
Packit f0b94e
  const unsigned short REASON_CANCELED = 1;
Packit f0b94e
  const unsigned short REASON_ERROR = 2;
Packit f0b94e
  void handleCompletion(in unsigned short aReason);
Packit f0b94e
};