Investigating leaks in bug 463263, backout bug 453403.
[wine-gecko.git] / storage / public / mozIStorageStatementCallback.idl
blobf4e33d269021bc0bd839b1990cf6300dfebc3d43
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=2 sts=2 expandtab
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is
19 * Mozilla Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 2008
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Shawn Wilsher <me@shawnwilsher.com> (Original Author)
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #include "nsISupports.idl"
42 interface mozIStorageResultSet;
43 interface mozIStorageError;
45 [scriptable, uuid(29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa)]
46 interface mozIStorageStatementCallback : nsISupports {
48 /**
49 * Called when some result is obtained from the database. This function can
50 * be called more than once with a different storageIResultSet each time for
51 * any given asynchronous statement.
53 * @param aResultSet
54 * The result set containing the data from the database.
56 void handleResult(in mozIStorageResultSet aResultSet);
58 /**
59 * Called when some error occurs while executing the statement. This function
60 * may be called more than once with a different storageIError each time for
61 * any given asynchronous statement.
63 * @param aError
64 * An object containing information about the error.
66 void handleError(in mozIStorageError aError);
68 /**
69 * Called when the statement has finished executing. This function will only
70 * be called once for any given asynchronous statement.
72 * @param aReason
73 * Indicates if the statement is no longer executing because it either
74 * finished (REASON_FINISHED), was canceled (REASON_CANCELED), or
75 * a fatal error occurred (REASON_ERROR).
77 const unsigned short REASON_FINISHED = 0;
78 const unsigned short REASON_CANCELED = 1;
79 const unsigned short REASON_ERROR = 2;
80 void handleCompletion(in unsigned short aReason);