michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMEventTarget.idl" michael@0: michael@0: interface nsIDOMWindow; michael@0: interface nsIDOMDOMCursor; michael@0: interface nsICursorContinueCallback; michael@0: michael@0: [scriptable, builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)] michael@0: interface nsIDOMDOMRequest : nsIDOMEventTarget michael@0: { michael@0: readonly attribute DOMString readyState; // "pending" or "done" michael@0: michael@0: readonly attribute jsval result; michael@0: michael@0: // DOMError michael@0: readonly attribute nsISupports error; michael@0: michael@0: [implicit_jscontext] attribute jsval onsuccess; michael@0: [implicit_jscontext] attribute jsval onerror; michael@0: }; michael@0: michael@0: [scriptable, builtinclass, uuid(df58d5d6-4b02-4e4c-9b29-adbff06c6206)] michael@0: interface nsIDOMRequestService : nsISupports michael@0: { michael@0: nsIDOMDOMRequest createRequest(in nsIDOMWindow window); michael@0: /* michael@0: * @param aCallback michael@0: * Called when `continue()' is called in the cursor, should be used to michael@0: * notify the data provider that content wants the next result. michael@0: */ michael@0: nsIDOMDOMCursor createCursor(in nsIDOMWindow window, michael@0: in nsICursorContinueCallback aCallback); michael@0: michael@0: void fireSuccess(in nsIDOMDOMRequest request, in jsval result); michael@0: void fireError(in nsIDOMDOMRequest request, in DOMString error); michael@0: void fireDetailedError(in nsIDOMDOMRequest request, in nsISupports error); michael@0: void fireSuccessAsync(in nsIDOMDOMRequest request, in jsval result); michael@0: void fireErrorAsync(in nsIDOMDOMRequest request, in DOMString error); michael@0: void fireDone(in nsIDOMDOMCursor cursor); michael@0: };