tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mozIStorageStatementCallback.idl (1791B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: sw=2 ts=2 sts=2 expandtab
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "nsISupports.idl"
      8 
      9 interface mozIStorageResultSet;
     10 interface mozIStorageError;
     11 
     12 [scriptable, uuid(29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa)]
     13 interface mozIStorageStatementCallback : nsISupports {
     14 
     15  /**
     16   * Called when some result is obtained from the database.  This function can
     17   * be called more than once with a different storageIResultSet each time for
     18   * any given asynchronous statement.
     19   *
     20   * @param aResultSet
     21   *        The result set containing the data from the database.
     22   */
     23  void handleResult(in mozIStorageResultSet aResultSet);
     24 
     25  /**
     26   * Called when some error occurs while executing the statement.  This function
     27   * may be called more than once with a different storageIError each time for
     28   * any given asynchronous statement.
     29   *
     30   * @param aError
     31   *        An object containing information about the error.
     32   */
     33  void handleError(in mozIStorageError aError);
     34 
     35  /**
     36   * Called when the statement has finished executing.  This function will only
     37   * be called once for any given asynchronous statement.
     38   *
     39   * @param aReason
     40   *        Indicates if the statement is no longer executing because it either
     41   *        finished (REASON_FINISHED), was canceled (REASON_CANCELED), or
     42   *        a fatal error occurred (REASON_ERROR).
     43   */
     44  const unsigned short REASON_FINISHED = 0;
     45  const unsigned short REASON_CANCELED = 1;
     46  const unsigned short REASON_ERROR = 2;
     47  void handleCompletion(in unsigned short aReason);
     48 };