Convert feed processor indentation to Zotero style
This adjust feed processor indentation to match Zotero conventions for tabs and continuous indents in blocks.
This commit is contained in:
parent
48a6e90b4f
commit
71dc4e9bf9
11 changed files with 1626 additions and 1637 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -14,73 +13,73 @@ interface nsIFeedGenerator;
|
|||
[scriptable, uuid(3b8aae33-80e2-4efa-99c8-a6c5b99f76ea)]
|
||||
interface nsIFeed : nsIFeedContainer
|
||||
{
|
||||
/**
|
||||
* Uses description, subtitle, and extensions
|
||||
* to generate a summary.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct subtitle;
|
||||
/**
|
||||
* Uses description, subtitle, and extensions
|
||||
* to generate a summary.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct subtitle;
|
||||
|
||||
// All content classifies as a "feed" - it is the transport.
|
||||
const unsigned long TYPE_FEED = 0;
|
||||
const unsigned long TYPE_AUDIO = 1;
|
||||
const unsigned long TYPE_IMAGE = 2;
|
||||
const unsigned long TYPE_VIDEO = 4;
|
||||
// All content classifies as a "feed" - it is the transport.
|
||||
const unsigned long TYPE_FEED = 0;
|
||||
const unsigned long TYPE_AUDIO = 1;
|
||||
const unsigned long TYPE_IMAGE = 2;
|
||||
const unsigned long TYPE_VIDEO = 4;
|
||||
|
||||
/**
|
||||
* The type of feed. For example, a podcast would be TYPE_AUDIO.
|
||||
*/
|
||||
readonly attribute unsigned long type;
|
||||
|
||||
/**
|
||||
* The total number of enclosures found in the feed.
|
||||
*/
|
||||
attribute long enclosureCount;
|
||||
/**
|
||||
* The type of feed. For example, a podcast would be TYPE_AUDIO.
|
||||
*/
|
||||
readonly attribute unsigned long type;
|
||||
|
||||
/**
|
||||
* The total number of enclosures found in the feed.
|
||||
*/
|
||||
attribute long enclosureCount;
|
||||
|
||||
/**
|
||||
* The items or entries in feed.
|
||||
*/
|
||||
attribute nsIArray items;
|
||||
/**
|
||||
* The items or entries in feed.
|
||||
*/
|
||||
attribute nsIArray items;
|
||||
|
||||
/**
|
||||
* No one really knows what cloud is for.
|
||||
*
|
||||
* It supposedly enables some sort of interaction with an XML-RPC or
|
||||
* SOAP service.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 cloud;
|
||||
/**
|
||||
* No one really knows what cloud is for.
|
||||
*
|
||||
* It supposedly enables some sort of interaction with an XML-RPC or
|
||||
* SOAP service.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 cloud;
|
||||
|
||||
/**
|
||||
* Information about the software that produced the feed.
|
||||
*/
|
||||
attribute nsIFeedGenerator generator;
|
||||
/**
|
||||
* Information about the software that produced the feed.
|
||||
*/
|
||||
attribute nsIFeedGenerator generator;
|
||||
|
||||
/**
|
||||
* An image url and some metadata (as defined by RSS2).
|
||||
*
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 image;
|
||||
/**
|
||||
* An image url and some metadata (as defined by RSS2).
|
||||
*
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 image;
|
||||
|
||||
/**
|
||||
* No one really knows what textInput is for.
|
||||
*
|
||||
* See
|
||||
* <http://www.cadenhead.org/workbench/news/2894/rss-joy-textinput>
|
||||
* for more details.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 textInput;
|
||||
/**
|
||||
* No one really knows what textInput is for.
|
||||
*
|
||||
* See
|
||||
* <http://www.cadenhead.org/workbench/news/2894/rss-joy-textinput>
|
||||
* for more details.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 textInput;
|
||||
|
||||
/**
|
||||
* Days to skip fetching. This field was supposed to designate
|
||||
* intervals for feed fetching. It's not generally implemented. For
|
||||
* example, if this array contained "Monday", aggregators should not
|
||||
* fetch the feed on Mondays.
|
||||
*/
|
||||
attribute nsIArray skipDays;
|
||||
/**
|
||||
* Days to skip fetching. This field was supposed to designate
|
||||
* intervals for feed fetching. It's not generally implemented. For
|
||||
* example, if this array contained "Monday", aggregators should not
|
||||
* fetch the feed on Mondays.
|
||||
*/
|
||||
attribute nsIArray skipDays;
|
||||
|
||||
/**
|
||||
* Hours to skip fetching. This field was supposed to designate
|
||||
* intervals for feed fetching. It's not generally implemented. See
|
||||
* <http://blogs.law.harvard.edu/tech/rss> for more information.
|
||||
*/
|
||||
attribute nsIArray skipHours;
|
||||
* Hours to skip fetching. This field was supposed to designate
|
||||
* intervals for feed fetching. It's not generally implemented. See
|
||||
* <http://blogs.law.harvard.edu/tech/rss> for more information.
|
||||
*/
|
||||
attribute nsIArray skipHours;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -18,68 +17,68 @@ interface nsIFeedTextConstruct;
|
|||
[scriptable, uuid(577a1b4c-b3d4-4c76-9cf8-753e6606114f)]
|
||||
interface nsIFeedContainer : nsIFeedElementBase
|
||||
{
|
||||
/**
|
||||
* Many feeds contain an ID distinct from their URI, and
|
||||
* entries have standard fields for this in all major formats.
|
||||
*/
|
||||
attribute AString id;
|
||||
/**
|
||||
* Many feeds contain an ID distinct from their URI, and
|
||||
* entries have standard fields for this in all major formats.
|
||||
*/
|
||||
attribute AString id;
|
||||
|
||||
/**
|
||||
* The fields found in the document. Common Atom
|
||||
* and RSS fields are normalized. This includes some namespaced
|
||||
* extensions such as dc:subject and content:encoded.
|
||||
* Consumers can avoid normalization by checking the feed type
|
||||
* and accessing specific fields.
|
||||
*
|
||||
* Common namespaces are accessed using prefixes, like get("dc:subject");.
|
||||
* See nsIFeedResult::registerExtensionPrefix.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 fields;
|
||||
/**
|
||||
* The fields found in the document. Common Atom
|
||||
* and RSS fields are normalized. This includes some namespaced
|
||||
* extensions such as dc:subject and content:encoded.
|
||||
* Consumers can avoid normalization by checking the feed type
|
||||
* and accessing specific fields.
|
||||
*
|
||||
* Common namespaces are accessed using prefixes, like get("dc:subject");.
|
||||
* See nsIFeedResult::registerExtensionPrefix.
|
||||
*/
|
||||
attribute nsIWritablePropertyBag2 fields;
|
||||
|
||||
/**
|
||||
* Sometimes there's no title, or the title contains markup, so take
|
||||
* care in decoding the attribute.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct title;
|
||||
/**
|
||||
* Sometimes there's no title, or the title contains markup, so take
|
||||
* care in decoding the attribute.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct title;
|
||||
|
||||
/**
|
||||
* Returns the primary link for the feed or entry.
|
||||
*/
|
||||
attribute nsIURI link;
|
||||
/**
|
||||
* Returns the primary link for the feed or entry.
|
||||
*/
|
||||
attribute nsIURI link;
|
||||
|
||||
/**
|
||||
* Returns all links for a feed or entry.
|
||||
*/
|
||||
attribute nsIArray links;
|
||||
/**
|
||||
* Returns all links for a feed or entry.
|
||||
*/
|
||||
attribute nsIArray links;
|
||||
|
||||
/**
|
||||
* Returns the categories found in a feed or entry.
|
||||
*/
|
||||
attribute nsIArray categories;
|
||||
/**
|
||||
* Returns the categories found in a feed or entry.
|
||||
*/
|
||||
attribute nsIArray categories;
|
||||
|
||||
/**
|
||||
* The rights or license associated with a feed or entry.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct rights;
|
||||
/**
|
||||
* The rights or license associated with a feed or entry.
|
||||
*/
|
||||
attribute nsIFeedTextConstruct rights;
|
||||
|
||||
/**
|
||||
* A list of nsIFeedPersons that authored the feed.
|
||||
*/
|
||||
attribute nsIArray authors;
|
||||
/**
|
||||
* A list of nsIFeedPersons that authored the feed.
|
||||
*/
|
||||
attribute nsIArray authors;
|
||||
|
||||
/**
|
||||
* A list of nsIFeedPersons that contributed to the feed.
|
||||
*/
|
||||
attribute nsIArray contributors;
|
||||
/**
|
||||
* A list of nsIFeedPersons that contributed to the feed.
|
||||
*/
|
||||
attribute nsIArray contributors;
|
||||
|
||||
/**
|
||||
* The date the feed was updated, in RFC822 form. Parsable by JS
|
||||
* and mail code.
|
||||
*/
|
||||
attribute AString updated;
|
||||
/**
|
||||
* The date the feed was updated, in RFC822 form. Parsable by JS
|
||||
* and mail code.
|
||||
*/
|
||||
attribute AString updated;
|
||||
|
||||
/**
|
||||
* Syncs a container's fields with its convenience attributes.
|
||||
*/
|
||||
void normalize();
|
||||
/**
|
||||
* Syncs a container's fields with its convenience attributes.
|
||||
*/
|
||||
void normalize();
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -14,15 +13,15 @@ interface nsIURI;
|
|||
[scriptable, uuid(5215291e-fa0a-40c2-8ce7-e86cd1a1d3fa)]
|
||||
interface nsIFeedElementBase : nsISupports
|
||||
{
|
||||
/**
|
||||
* The attributes found on the element. Most interfaces provide convenience
|
||||
* accessors for their standard fields, so this useful only when looking for
|
||||
* an extension.
|
||||
*/
|
||||
attribute nsISAXAttributes attributes;
|
||||
/**
|
||||
* The attributes found on the element. Most interfaces provide convenience
|
||||
* accessors for their standard fields, so this useful only when looking for
|
||||
* an extension.
|
||||
*/
|
||||
attribute nsISAXAttributes attributes;
|
||||
|
||||
/**
|
||||
* The baseURI for the Entry or Feed.
|
||||
*/
|
||||
attribute nsIURI baseURI;
|
||||
/**
|
||||
* The baseURI for the Entry or Feed.
|
||||
*/
|
||||
attribute nsIURI baseURI;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -14,33 +13,33 @@ interface nsIArray;
|
|||
[scriptable, uuid(31bfd5b4-8ff5-4bfd-a8cb-b3dfbd4f0a5b)]
|
||||
interface nsIFeedEntry : nsIFeedContainer {
|
||||
|
||||
/**
|
||||
* Uses description, subtitle, summary, content and extensions
|
||||
* to generate a summary.
|
||||
*
|
||||
*/
|
||||
attribute nsIFeedTextConstruct summary;
|
||||
/**
|
||||
* Uses description, subtitle, summary, content and extensions
|
||||
* to generate a summary.
|
||||
*
|
||||
*/
|
||||
attribute nsIFeedTextConstruct summary;
|
||||
|
||||
/**
|
||||
* The date the entry was published, in RFC822 form. Parsable by JS
|
||||
* and mail code.
|
||||
*/
|
||||
attribute AString published;
|
||||
/**
|
||||
* The date the entry was published, in RFC822 form. Parsable by JS
|
||||
* and mail code.
|
||||
*/
|
||||
attribute AString published;
|
||||
|
||||
/**
|
||||
* Uses atom:content and content:encoded to provide
|
||||
* a 'full text' view of an entry.
|
||||
*
|
||||
*/
|
||||
attribute nsIFeedTextConstruct content;
|
||||
/**
|
||||
* Uses atom:content and content:encoded to provide
|
||||
* a 'full text' view of an entry.
|
||||
*
|
||||
*/
|
||||
attribute nsIFeedTextConstruct content;
|
||||
|
||||
/**
|
||||
* Enclosures are podcasts, photocasts, etc.
|
||||
*/
|
||||
attribute nsIArray enclosures;
|
||||
/**
|
||||
* Enclosures are podcasts, photocasts, etc.
|
||||
*/
|
||||
attribute nsIArray enclosures;
|
||||
|
||||
/**
|
||||
* Enclosures, etc. that might be displayed inline.
|
||||
*/
|
||||
attribute nsIArray mediaContent;
|
||||
/**
|
||||
* Enclosures, etc. that might be displayed inline.
|
||||
*/
|
||||
attribute nsIArray mediaContent;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -13,18 +12,18 @@ interface nsIURI;
|
|||
[scriptable, uuid(0fecd56b-bd92-481b-a486-b8d489cdd385)]
|
||||
interface nsIFeedGenerator : nsIFeedElementBase
|
||||
{
|
||||
/**
|
||||
* The name of the software.
|
||||
*/
|
||||
attribute AString agent;
|
||||
/**
|
||||
* The name of the software.
|
||||
*/
|
||||
attribute AString agent;
|
||||
|
||||
/**
|
||||
* The version of the software.
|
||||
*/
|
||||
attribute AString version;
|
||||
/**
|
||||
* The version of the software.
|
||||
*/
|
||||
attribute AString version;
|
||||
|
||||
/**
|
||||
* A URI associated with the software.
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
/**
|
||||
* A URI associated with the software.
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -14,16 +13,16 @@ interface nsIFeedEntry;
|
|||
[scriptable, uuid(4d2ebe88-36eb-4e20-bcd1-997b3c1f24ce)]
|
||||
interface nsIFeedResultListener : nsISupports
|
||||
{
|
||||
/**
|
||||
* Always called, even after an error. There could be new feed-level
|
||||
* data available at this point, if it followed or was interspersed
|
||||
* with the items. Fire-and-Forget implementations only need this.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata.
|
||||
*/
|
||||
void handleResult(in nsIFeedResult result);
|
||||
/**
|
||||
* Always called, even after an error. There could be new feed-level
|
||||
* data available at this point, if it followed or was interspersed
|
||||
* with the items. Fire-and-Forget implementations only need this.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata.
|
||||
*/
|
||||
void handleResult(in nsIFeedResult result);
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,54 +33,54 @@ interface nsIFeedResultListener : nsISupports
|
|||
[scriptable, uuid(ebfd5de5-713c-40c0-ad7c-f095117fa580)]
|
||||
interface nsIFeedProgressListener : nsIFeedResultListener {
|
||||
|
||||
/**
|
||||
* ReportError will be called in the event of fatal
|
||||
* XML errors, or if the document is not a feed. The bozo
|
||||
* bit will be set if the error was due to a fatal error.
|
||||
*
|
||||
* @param errorText
|
||||
* A short description of the error.
|
||||
* @param lineNumber
|
||||
* The line on which the error occurred.
|
||||
*/
|
||||
void reportError(in AString errorText, in long lineNumber,
|
||||
in boolean bozo);
|
||||
|
||||
/**
|
||||
* StartFeed will be called as soon as a reasonable start to
|
||||
* a feed is detected.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata. At this point, the result has version
|
||||
* information.
|
||||
*/
|
||||
void handleStartFeed(in nsIFeedResult result);
|
||||
/**
|
||||
* ReportError will be called in the event of fatal
|
||||
* XML errors, or if the document is not a feed. The bozo
|
||||
* bit will be set if the error was due to a fatal error.
|
||||
*
|
||||
* @param errorText
|
||||
* A short description of the error.
|
||||
* @param lineNumber
|
||||
* The line on which the error occurred.
|
||||
*/
|
||||
void reportError(in AString errorText, in long lineNumber,
|
||||
in boolean bozo);
|
||||
|
||||
/**
|
||||
* StartFeed will be called as soon as a reasonable start to
|
||||
* a feed is detected.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata. At this point, the result has version
|
||||
* information.
|
||||
*/
|
||||
void handleStartFeed(in nsIFeedResult result);
|
||||
|
||||
/**
|
||||
* Called when the first entry/item is encountered. In Atom, all
|
||||
* feed data is required to preceed the entries. In RSS, the data
|
||||
* usually does. If the type is one of the entry/item-only types,
|
||||
* this event will not be called.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata. At this point, the result will likely have
|
||||
* most of its feed-level metadata.
|
||||
*/
|
||||
void handleFeedAtFirstEntry(in nsIFeedResult result);
|
||||
/**
|
||||
* Called when the first entry/item is encountered. In Atom, all
|
||||
* feed data is required to preceed the entries. In RSS, the data
|
||||
* usually does. If the type is one of the entry/item-only types,
|
||||
* this event will not be called.
|
||||
*
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata. At this point, the result will likely have
|
||||
* most of its feed-level metadata.
|
||||
*/
|
||||
void handleFeedAtFirstEntry(in nsIFeedResult result);
|
||||
|
||||
/**
|
||||
* Called after each entry/item. If the document is a standalone
|
||||
* item or entry, this HandleFeedAtFirstEntry will not have been
|
||||
* called. Also, this entry's parent field will be null.
|
||||
*
|
||||
* @param entry
|
||||
* An object implementing nsIFeedEntry that represents the latest
|
||||
* entry encountered.
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata.
|
||||
*/
|
||||
void handleEntry(in nsIFeedEntry entry, in nsIFeedResult result);
|
||||
/**
|
||||
* Called after each entry/item. If the document is a standalone
|
||||
* item or entry, this HandleFeedAtFirstEntry will not have been
|
||||
* called. Also, this entry's parent field will be null.
|
||||
*
|
||||
* @param entry
|
||||
* An object implementing nsIFeedEntry that represents the latest
|
||||
* entry encountered.
|
||||
* @param result
|
||||
* An object implementing nsIFeedResult representing the feed
|
||||
* and its metadata.
|
||||
*/
|
||||
void handleEntry(in nsIFeedEntry entry, in nsIFeedResult result);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -13,18 +12,18 @@ interface nsIURI;
|
|||
[scriptable, uuid(29cbd45f-f2d3-4b28-b557-3ab7a61ecde4)]
|
||||
interface nsIFeedPerson : nsIFeedElementBase
|
||||
{
|
||||
/**
|
||||
* The name of the person.
|
||||
*/
|
||||
attribute AString name;
|
||||
/**
|
||||
* The name of the person.
|
||||
*/
|
||||
attribute AString name;
|
||||
|
||||
/**
|
||||
* An email address associated with the person.
|
||||
*/
|
||||
attribute AString email;
|
||||
/**
|
||||
* An email address associated with the person.
|
||||
*/
|
||||
attribute AString email;
|
||||
|
||||
/**
|
||||
* A URI associated with the person (e.g. a homepage).
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
/**
|
||||
* A URI associated with the person (e.g. a homepage).
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -16,26 +15,26 @@ interface nsIInputStream;
|
|||
[scriptable, uuid(8a0b2908-21b0-45d7-b14d-30df0f92afc7)]
|
||||
interface nsIFeedProcessor : nsIStreamListener {
|
||||
|
||||
/**
|
||||
* The listener that will respond to feed events.
|
||||
*/
|
||||
attribute nsIFeedResultListener listener;
|
||||
/**
|
||||
* The listener that will respond to feed events.
|
||||
*/
|
||||
attribute nsIFeedResultListener listener;
|
||||
|
||||
// Level is where to listen for the extension, a constant: FEED,
|
||||
// ENTRY, BOTH.
|
||||
//
|
||||
// XXX todo void registerExtensionHandler(in
|
||||
// nsIFeedExtensionHandler, in long level);
|
||||
|
||||
/**
|
||||
* Parse a feed asynchronously. The caller must then call the
|
||||
* nsIFeedProcessor's nsIStreamListener methods to drive the
|
||||
* parse. Do not call the other parse methods during an asynchronous
|
||||
* parse.
|
||||
*
|
||||
* @param requestObserver The observer to notify on start/stop. This
|
||||
* argument can be null.
|
||||
* @param uri The base URI.
|
||||
*/
|
||||
void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri);
|
||||
// Level is where to listen for the extension, a constant: FEED,
|
||||
// ENTRY, BOTH.
|
||||
//
|
||||
// XXX todo void registerExtensionHandler(in
|
||||
// nsIFeedExtensionHandler, in long level);
|
||||
|
||||
/**
|
||||
* Parse a feed asynchronously. The caller must then call the
|
||||
* nsIFeedProcessor's nsIStreamListener methods to drive the
|
||||
* parse. Do not call the other parse methods during an asynchronous
|
||||
* parse.
|
||||
*
|
||||
* @param requestObserver The observer to notify on start/stop. This
|
||||
* argument can be null.
|
||||
* @param uri The base URI.
|
||||
*/
|
||||
void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -14,52 +13,52 @@ interface nsIURI;
|
|||
*/
|
||||
[scriptable, uuid(7a180b78-0f46-4569-8c22-f3d720ea1c57)]
|
||||
interface nsIFeedResult : nsISupports {
|
||||
|
||||
/**
|
||||
* The Feed parser will set the bozo bit when a feed triggers a fatal
|
||||
* error during XML parsing. There may be entries and feed metadata
|
||||
* that were parsed before the error. Thanks to Tim Bray for
|
||||
* suggesting this terminology.
|
||||
* <http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim>
|
||||
*/
|
||||
attribute boolean bozo;
|
||||
|
||||
/**
|
||||
* The parsed feed or entry.
|
||||
*
|
||||
* Will be null if a non-feed is processed.
|
||||
*/
|
||||
attribute nsIFeedContainer doc;
|
||||
|
||||
/**
|
||||
* The Feed parser will set the bozo bit when a feed triggers a fatal
|
||||
* error during XML parsing. There may be entries and feed metadata
|
||||
* that were parsed before the error. Thanks to Tim Bray for
|
||||
* suggesting this terminology.
|
||||
* <http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim>
|
||||
*/
|
||||
attribute boolean bozo;
|
||||
|
||||
/**
|
||||
* The parsed feed or entry.
|
||||
*
|
||||
* Will be null if a non-feed is processed.
|
||||
*/
|
||||
attribute nsIFeedContainer doc;
|
||||
|
||||
/**
|
||||
* The address from which the feed was fetched.
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
/**
|
||||
* The address from which the feed was fetched.
|
||||
*/
|
||||
attribute nsIURI uri;
|
||||
|
||||
/**
|
||||
* Feed Version:
|
||||
* atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03,
|
||||
* atomEntry, rssItem
|
||||
*
|
||||
* Will be null if a non-feed is processed.
|
||||
*/
|
||||
attribute AString version;
|
||||
/**
|
||||
* Feed Version:
|
||||
* atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03,
|
||||
* atomEntry, rssItem
|
||||
*
|
||||
* Will be null if a non-feed is processed.
|
||||
*/
|
||||
attribute AString version;
|
||||
|
||||
/**
|
||||
* An XSLT stylesheet available to transform the source of the
|
||||
* feed. Some feeds include this information in a processing
|
||||
* instruction. It's generally intended for clients with specific
|
||||
* feed capabilities.
|
||||
*/
|
||||
attribute nsIURI stylesheet;
|
||||
/**
|
||||
* An XSLT stylesheet available to transform the source of the
|
||||
* feed. Some feeds include this information in a processing
|
||||
* instruction. It's generally intended for clients with specific
|
||||
* feed capabilities.
|
||||
*/
|
||||
attribute nsIURI stylesheet;
|
||||
|
||||
/**
|
||||
* HTTP response headers that accompanied the feed.
|
||||
*/
|
||||
attribute nsIProperties headers;
|
||||
/**
|
||||
* HTTP response headers that accompanied the feed.
|
||||
*/
|
||||
attribute nsIProperties headers;
|
||||
|
||||
/**
|
||||
* Registers a prefix used to access an extension in the feed/entry
|
||||
*/
|
||||
void registerExtensionPrefix(in AString aNamespace, in AString aPrefix);
|
||||
/**
|
||||
* Registers a prefix used to access an extension in the feed/entry
|
||||
*/
|
||||
void registerExtensionPrefix(in AString aNamespace, in AString aPrefix);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
@ -18,41 +17,41 @@ webidl Element;
|
|||
[scriptable, uuid(fc97a2a9-d649-4494-931e-db81a156c873)]
|
||||
interface nsIFeedTextConstruct : nsISupports
|
||||
{
|
||||
/**
|
||||
* If the text construct contains (X)HTML, relative references in
|
||||
* the content should be resolved against this base URI.
|
||||
*/
|
||||
attribute nsIURI base;
|
||||
/**
|
||||
* If the text construct contains (X)HTML, relative references in
|
||||
* the content should be resolved against this base URI.
|
||||
*/
|
||||
attribute nsIURI base;
|
||||
|
||||
/**
|
||||
* The language of the text. For example, "en-US" for US English.
|
||||
*/
|
||||
attribute AString lang;
|
||||
/**
|
||||
* The language of the text. For example, "en-US" for US English.
|
||||
*/
|
||||
attribute AString lang;
|
||||
|
||||
/**
|
||||
* One of "text", "html", or "xhtml". If the type is (x)html, a '<'
|
||||
* character represents markup. To display that character, an escape
|
||||
* such as < must be used. If the type is "text", the '<'
|
||||
* character represents the character itself, and such text should
|
||||
* not be embedded in markup without escaping it first.
|
||||
*/
|
||||
attribute AString type;
|
||||
/**
|
||||
* One of "text", "html", or "xhtml". If the type is (x)html, a '<'
|
||||
* character represents markup. To display that character, an escape
|
||||
* such as < must be used. If the type is "text", the '<'
|
||||
* character represents the character itself, and such text should
|
||||
* not be embedded in markup without escaping it first.
|
||||
*/
|
||||
attribute AString type;
|
||||
|
||||
/**
|
||||
* The content of the text construct.
|
||||
*/
|
||||
attribute AString text;
|
||||
/**
|
||||
* The content of the text construct.
|
||||
*/
|
||||
attribute AString text;
|
||||
|
||||
/**
|
||||
* Returns the text of the text construct, with all markup stripped
|
||||
* and all entities decoded. If the type attribute's value is "text",
|
||||
* this function returns the value of the text attribute unchanged.
|
||||
*/
|
||||
AString plainText();
|
||||
/**
|
||||
* Returns the text of the text construct, with all markup stripped
|
||||
* and all entities decoded. If the type attribute's value is "text",
|
||||
* this function returns the value of the text attribute unchanged.
|
||||
*/
|
||||
AString plainText();
|
||||
|
||||
/**
|
||||
* Return an nsIDocumentFragment containing the text and markup.
|
||||
*/
|
||||
DocumentFragment createDocumentFragment(in Element element);
|
||||
/**
|
||||
* Return an nsIDocumentFragment containing the text and markup.
|
||||
*/
|
||||
DocumentFragment createDocumentFragment(in Element element);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue