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 nsIIDBRequest;
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
/**
|
|
|
|
* IDBCursor interface. See
|
|
|
|
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more
|
|
|
|
* information.
|
|
|
|
*/
|
2012-06-29 20:48:34 +04:00
|
|
|
[scriptable, builtinclass, uuid(148579a3-6b28-4b2a-92c3-ff5719e8e03e)]
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBCursor : nsISupports
|
|
|
|
{
|
2012-03-13 08:44:45 +04:00
|
|
|
// "next", "nextunique", "prev" or "prevunique"
|
|
|
|
readonly attribute DOMString direction;
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2010-12-10 05:14:09 +03:00
|
|
|
readonly attribute nsISupports source;
|
|
|
|
|
2011-11-03 19:57:30 +04:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute jsval key;
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2010-06-29 02:22:41 +04:00
|
|
|
[implicit_jscontext]
|
2011-02-11 10:47:00 +03:00
|
|
|
readonly attribute jsval primaryKey;
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2010-12-10 05:15:00 +03:00
|
|
|
// Calling continue means that the same onsuccess function will be called
|
|
|
|
// again with the new key/value (or null if no more matches).
|
2010-12-16 00:21:07 +03:00
|
|
|
[implicit_jscontext]
|
2010-12-10 05:15:00 +03:00
|
|
|
void continue([optional /* undefined */] in jsval key);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
|
|
|
// Success fires IDBTransactionEvent, result == key
|
2010-06-29 02:22:41 +04:00
|
|
|
[implicit_jscontext]
|
|
|
|
nsIIDBRequest update(in jsval value);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
|
|
|
// Success fires IDBTransactionEvent, result == null
|
2010-12-16 00:21:11 +03:00
|
|
|
[implicit_jscontext]
|
2010-11-11 02:25:57 +03:00
|
|
|
nsIIDBRequest delete();
|
2011-11-08 03:37:19 +04:00
|
|
|
|
|
|
|
void
|
2012-06-29 20:48:34 +04:00
|
|
|
advance(in long long count);
|
2010-06-23 23:46:08 +04:00
|
|
|
};
|