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