2010-06-23 23:46:08 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-06-28 20:46:21 +04:00
|
|
|
interface nsIDOMEventListener;
|
2010-06-28 22:51:06 +04:00
|
|
|
interface nsIIDBObjectStore;
|
2010-06-28 20:46:21 +04:00
|
|
|
interface nsIIDBRequest;
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBDatabase;
|
|
|
|
interface nsIDOMDOMStringList;
|
2012-06-25 23:15:17 +04:00
|
|
|
interface nsIDOMDOMError;
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* IDBDTransaction interface. See
|
2010-06-28 20:46:21 +04:00
|
|
|
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
|
|
|
|
* for more information.
|
2010-06-23 23:46:08 +04:00
|
|
|
*/
|
2012-08-31 07:45:16 +04:00
|
|
|
[scriptable, builtinclass, uuid(3197172b-2f56-4837-9427-5e5d4b20a363)]
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBTransaction : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute nsIIDBDatabase db;
|
|
|
|
|
2012-03-13 08:44:45 +04:00
|
|
|
// "readonly", "readwrite" or "versionchange"
|
|
|
|
readonly attribute DOMString mode;
|
2010-06-23 23:46:08 +04:00
|
|
|
|
2012-06-25 23:15:17 +04:00
|
|
|
readonly attribute nsIDOMDOMError error;
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
readonly attribute nsIDOMDOMStringList objectStoreNames;
|
2010-06-28 20:46:21 +04:00
|
|
|
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBObjectStore
|
2011-11-08 03:37:16 +04:00
|
|
|
objectStore([Null(Stringify)] in DOMString name);
|
2010-06-28 20:46:21 +04:00
|
|
|
|
|
|
|
// Don't commit the transaction.
|
|
|
|
void abort();
|
|
|
|
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onerror;
|
2010-11-11 02:26:03 +03:00
|
|
|
|
2010-06-28 20:46:21 +04:00
|
|
|
// Event listener that fires when the transaction is completed
|
|
|
|
// successfully. Receives an Event.
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval oncomplete;
|
2010-06-28 20:46:21 +04:00
|
|
|
|
|
|
|
// Event listener that fires when the transaction is aborted.
|
|
|
|
// Receives an Event.
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onabort;
|
2010-06-23 23:46:08 +04:00
|
|
|
};
|