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 22:51:06 +04:00
|
|
|
interface nsIIDBObjectStore;
|
2010-06-28 20:46:49 +04:00
|
|
|
interface nsIIDBRequest;
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBTransaction;
|
2010-06-28 20:46:49 +04:00
|
|
|
interface nsIDOMDOMStringList;
|
2010-11-11 02:26:03 +03:00
|
|
|
interface nsIDOMEventListener;
|
2010-06-23 23:46:08 +04:00
|
|
|
|
2012-03-13 08:44:48 +04:00
|
|
|
dictionary IDBObjectStoreParameters
|
2011-12-27 22:01:28 +04:00
|
|
|
{
|
2012-03-13 08:44:48 +04:00
|
|
|
jsval keyPath;
|
|
|
|
boolean autoIncrement;
|
2011-12-27 22:01:28 +04:00
|
|
|
};
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
/**
|
|
|
|
* IDBDatabase interface. See
|
2010-06-28 20:46:49 +04:00
|
|
|
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBDatabase
|
|
|
|
* for more information.
|
2010-06-23 23:46:08 +04:00
|
|
|
*/
|
2012-08-31 07:45:16 +04:00
|
|
|
[scriptable, builtinclass, uuid(89299bf8-e078-4ebc-abda-d97fe5618602)]
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBDatabase : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
readonly attribute unsigned long long version;
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
readonly attribute nsIDOMDOMStringList objectStoreNames;
|
2010-06-28 20:46:49 +04:00
|
|
|
|
2010-12-21 19:02:01 +03:00
|
|
|
[implicit_jscontext]
|
2010-10-19 21:58:52 +04:00
|
|
|
nsIIDBObjectStore
|
2011-11-08 03:37:16 +04:00
|
|
|
createObjectStore([Null(Stringify)] in DOMString name,
|
2012-06-03 20:33:52 +04:00
|
|
|
/* IDBObjectStoreParameters */
|
2010-12-21 19:02:01 +03:00
|
|
|
[optional /* none */] in jsval options);
|
2010-06-28 20:46:49 +04:00
|
|
|
|
2010-10-19 21:58:52 +04:00
|
|
|
void
|
2011-11-08 03:37:16 +04:00
|
|
|
deleteObjectStore([Null(Stringify)] in DOMString name);
|
2010-06-28 20:46:49 +04:00
|
|
|
|
2012-03-13 08:44:45 +04:00
|
|
|
// mode can be either "readonly" or "readwrite"
|
2010-08-27 00:57:25 +04:00
|
|
|
[optional_argc, implicit_jscontext]
|
2010-06-28 20:46:49 +04:00
|
|
|
nsIIDBTransaction
|
2011-11-03 19:57:30 +04:00
|
|
|
transaction(in jsval storeNames, // js array of strings
|
2012-03-13 08:44:45 +04:00
|
|
|
[optional /* "readonly" */] in DOMString mode);
|
2010-10-19 21:58:52 +04:00
|
|
|
|
2012-06-29 20:48:34 +04:00
|
|
|
[implicit_jscontext]
|
2012-06-03 20:33:52 +04:00
|
|
|
nsIIDBRequest
|
|
|
|
mozCreateFileHandle(in DOMString name,
|
|
|
|
[optional] in DOMString type);
|
|
|
|
|
2010-10-19 21:58:52 +04:00
|
|
|
void
|
|
|
|
close();
|
2010-11-11 02:26:03 +03:00
|
|
|
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onabort;
|
2011-11-23 18:15:15 +04:00
|
|
|
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onerror;
|
2010-11-11 02:26:03 +03:00
|
|
|
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onversionchange;
|
2010-06-23 23:46:08 +04:00
|
|
|
};
|