no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / storage / mozIStorageStatementCallback.idl
blobe3b888a714dea3c4ac8034a158debc34774ccee0
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/. */
7 #include "nsISupports.idl"
9 interface mozIStorageResultSet;
10 interface mozIStorageError;
12 [scriptable, uuid(29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa)]
13 interface mozIStorageStatementCallback : nsISupports {
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.
20 * @param aResultSet
21 * The result set containing the data from the database.
23 void handleResult(in mozIStorageResultSet aResultSet);
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.
30 * @param aError
31 * An object containing information about the error.
33 void handleError(in mozIStorageError aError);
35 /**
36 * Called when the statement has finished executing. This function will only
37 * be called once for any given asynchronous statement.
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).
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);