toolkit/components/feeds/nsIFeedListener.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7 interface nsIFeedResult;
michael@0 8 interface nsIFeedEntry;
michael@0 9
michael@0 10 /**
michael@0 11 * nsIFeedResultListener defines a callback used when feed processing
michael@0 12 * completes.
michael@0 13 */
michael@0 14 [scriptable, uuid(4d2ebe88-36eb-4e20-bcd1-997b3c1f24ce)]
michael@0 15 interface nsIFeedResultListener : nsISupports
michael@0 16 {
michael@0 17 /**
michael@0 18 * Always called, even after an error. There could be new feed-level
michael@0 19 * data available at this point, if it followed or was interspersed
michael@0 20 * with the items. Fire-and-Forget implementations only need this.
michael@0 21 *
michael@0 22 * @param result
michael@0 23 * An object implementing nsIFeedResult representing the feed
michael@0 24 * and its metadata.
michael@0 25 */
michael@0 26 void handleResult(in nsIFeedResult result);
michael@0 27 };
michael@0 28
michael@0 29
michael@0 30 /**
michael@0 31 * nsIFeedProgressListener defines callbacks used during feed
michael@0 32 * processing.
michael@0 33 */
michael@0 34 [scriptable, uuid(ebfd5de5-713c-40c0-ad7c-f095117fa580)]
michael@0 35 interface nsIFeedProgressListener : nsIFeedResultListener {
michael@0 36
michael@0 37 /**
michael@0 38 * ReportError will be called in the event of fatal
michael@0 39 * XML errors, or if the document is not a feed. The bozo
michael@0 40 * bit will be set if the error was due to a fatal error.
michael@0 41 *
michael@0 42 * @param errorText
michael@0 43 * A short description of the error.
michael@0 44 * @param lineNumber
michael@0 45 * The line on which the error occurred.
michael@0 46 */
michael@0 47 void reportError(in AString errorText, in long lineNumber,
michael@0 48 in boolean bozo);
michael@0 49
michael@0 50 /**
michael@0 51 * StartFeed will be called as soon as a reasonable start to
michael@0 52 * a feed is detected.
michael@0 53 *
michael@0 54 * @param result
michael@0 55 * An object implementing nsIFeedResult representing the feed
michael@0 56 * and its metadata. At this point, the result has version
michael@0 57 * information.
michael@0 58 */
michael@0 59 void handleStartFeed(in nsIFeedResult result);
michael@0 60
michael@0 61 /**
michael@0 62 * Called when the first entry/item is encountered. In Atom, all
michael@0 63 * feed data is required to preceed the entries. In RSS, the data
michael@0 64 * usually does. If the type is one of the entry/item-only types,
michael@0 65 * this event will not be called.
michael@0 66 *
michael@0 67 * @param result
michael@0 68 * An object implementing nsIFeedResult representing the feed
michael@0 69 * and its metadata. At this point, the result will likely have
michael@0 70 * most of its feed-level metadata.
michael@0 71 */
michael@0 72 void handleFeedAtFirstEntry(in nsIFeedResult result);
michael@0 73
michael@0 74 /**
michael@0 75 * Called after each entry/item. If the document is a standalone
michael@0 76 * item or entry, this HandleFeedAtFirstEntry will not have been
michael@0 77 * called. Also, this entry's parent field will be null.
michael@0 78 *
michael@0 79 * @param entry
michael@0 80 * An object implementing nsIFeedEntry that represents the latest
michael@0 81 * entry encountered.
michael@0 82 * @param result
michael@0 83 * An object implementing nsIFeedResult representing the feed
michael@0 84 * and its metadata.
michael@0 85 */
michael@0 86 void handleEntry(in nsIFeedEntry entry, in nsIFeedResult result);
michael@0 87 };

mercurial