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:
J. Ryan Stinnett 2021-05-07 14:07:40 +01:00
parent 48a6e90b4f
commit 71dc4e9bf9
11 changed files with 1626 additions and 1637 deletions

File diff suppressed because it is too large Load diff

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(3b8aae33-80e2-4efa-99c8-a6c5b99f76ea)]
interface nsIFeed : nsIFeedContainer interface nsIFeed : nsIFeedContainer
{ {
/** /**
* Uses description, subtitle, and extensions * Uses description, subtitle, and extensions
* to generate a summary. * to generate a summary.
*/ */
attribute nsIFeedTextConstruct subtitle; attribute nsIFeedTextConstruct subtitle;
// All content classifies as a "feed" - it is the transport. // All content classifies as a "feed" - it is the transport.
const unsigned long TYPE_FEED = 0; const unsigned long TYPE_FEED = 0;
const unsigned long TYPE_AUDIO = 1; const unsigned long TYPE_AUDIO = 1;
const unsigned long TYPE_IMAGE = 2; const unsigned long TYPE_IMAGE = 2;
const unsigned long TYPE_VIDEO = 4; const unsigned long TYPE_VIDEO = 4;
/** /**
* The type of feed. For example, a podcast would be TYPE_AUDIO. * The type of feed. For example, a podcast would be TYPE_AUDIO.
*/ */
readonly attribute unsigned long type; readonly attribute unsigned long type;
/** /**
* The total number of enclosures found in the feed. * The total number of enclosures found in the feed.
*/ */
attribute long enclosureCount; attribute long enclosureCount;
/** /**
* The items or entries in feed. * The items or entries in feed.
*/ */
attribute nsIArray items; attribute nsIArray items;
/** /**
* No one really knows what cloud is for. * No one really knows what cloud is for.
* *
* It supposedly enables some sort of interaction with an XML-RPC or * It supposedly enables some sort of interaction with an XML-RPC or
* SOAP service. * SOAP service.
*/ */
attribute nsIWritablePropertyBag2 cloud; attribute nsIWritablePropertyBag2 cloud;
/** /**
* Information about the software that produced the feed. * Information about the software that produced the feed.
*/ */
attribute nsIFeedGenerator generator; attribute nsIFeedGenerator generator;
/** /**
* An image url and some metadata (as defined by RSS2). * An image url and some metadata (as defined by RSS2).
* *
*/ */
attribute nsIWritablePropertyBag2 image; attribute nsIWritablePropertyBag2 image;
/** /**
* No one really knows what textInput is for. * No one really knows what textInput is for.
* *
* See * See
* <http://www.cadenhead.org/workbench/news/2894/rss-joy-textinput> * <http://www.cadenhead.org/workbench/news/2894/rss-joy-textinput>
* for more details. * for more details.
*/ */
attribute nsIWritablePropertyBag2 textInput; attribute nsIWritablePropertyBag2 textInput;
/** /**
* Days to skip fetching. This field was supposed to designate * Days to skip fetching. This field was supposed to designate
* intervals for feed fetching. It's not generally implemented. For * intervals for feed fetching. It's not generally implemented. For
* example, if this array contained "Monday", aggregators should not * example, if this array contained "Monday", aggregators should not
* fetch the feed on Mondays. * fetch the feed on Mondays.
*/ */
attribute nsIArray skipDays; attribute nsIArray skipDays;
/** /**
* Hours to skip fetching. This field was supposed to designate * Hours to skip fetching. This field was supposed to designate
* intervals for feed fetching. It's not generally implemented. See * intervals for feed fetching. It's not generally implemented. See
* <http://blogs.law.harvard.edu/tech/rss> for more information. * <http://blogs.law.harvard.edu/tech/rss> for more information.
*/ */
attribute nsIArray skipHours; attribute nsIArray skipHours;
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(577a1b4c-b3d4-4c76-9cf8-753e6606114f)]
interface nsIFeedContainer : nsIFeedElementBase interface nsIFeedContainer : nsIFeedElementBase
{ {
/** /**
* Many feeds contain an ID distinct from their URI, and * Many feeds contain an ID distinct from their URI, and
* entries have standard fields for this in all major formats. * entries have standard fields for this in all major formats.
*/ */
attribute AString id; attribute AString id;
/** /**
* The fields found in the document. Common Atom * The fields found in the document. Common Atom
* and RSS fields are normalized. This includes some namespaced * and RSS fields are normalized. This includes some namespaced
* extensions such as dc:subject and content:encoded. * extensions such as dc:subject and content:encoded.
* Consumers can avoid normalization by checking the feed type * Consumers can avoid normalization by checking the feed type
* and accessing specific fields. * and accessing specific fields.
* *
* Common namespaces are accessed using prefixes, like get("dc:subject");. * Common namespaces are accessed using prefixes, like get("dc:subject");.
* See nsIFeedResult::registerExtensionPrefix. * See nsIFeedResult::registerExtensionPrefix.
*/ */
attribute nsIWritablePropertyBag2 fields; attribute nsIWritablePropertyBag2 fields;
/** /**
* Sometimes there's no title, or the title contains markup, so take * Sometimes there's no title, or the title contains markup, so take
* care in decoding the attribute. * care in decoding the attribute.
*/ */
attribute nsIFeedTextConstruct title; attribute nsIFeedTextConstruct title;
/** /**
* Returns the primary link for the feed or entry. * Returns the primary link for the feed or entry.
*/ */
attribute nsIURI link; attribute nsIURI link;
/** /**
* Returns all links for a feed or entry. * Returns all links for a feed or entry.
*/ */
attribute nsIArray links; attribute nsIArray links;
/** /**
* Returns the categories found in a feed or entry. * Returns the categories found in a feed or entry.
*/ */
attribute nsIArray categories; attribute nsIArray categories;
/** /**
* The rights or license associated with a feed or entry. * The rights or license associated with a feed or entry.
*/ */
attribute nsIFeedTextConstruct rights; attribute nsIFeedTextConstruct rights;
/** /**
* A list of nsIFeedPersons that authored the feed. * A list of nsIFeedPersons that authored the feed.
*/ */
attribute nsIArray authors; attribute nsIArray authors;
/** /**
* A list of nsIFeedPersons that contributed to the feed. * A list of nsIFeedPersons that contributed to the feed.
*/ */
attribute nsIArray contributors; attribute nsIArray contributors;
/** /**
* The date the feed was updated, in RFC822 form. Parsable by JS * The date the feed was updated, in RFC822 form. Parsable by JS
* and mail code. * and mail code.
*/ */
attribute AString updated; attribute AString updated;
/** /**
* Syncs a container's fields with its convenience attributes. * Syncs a container's fields with its convenience attributes.
*/ */
void normalize(); void normalize();
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(5215291e-fa0a-40c2-8ce7-e86cd1a1d3fa)]
interface nsIFeedElementBase : nsISupports interface nsIFeedElementBase : nsISupports
{ {
/** /**
* The attributes found on the element. Most interfaces provide convenience * The attributes found on the element. Most interfaces provide convenience
* accessors for their standard fields, so this useful only when looking for * accessors for their standard fields, so this useful only when looking for
* an extension. * an extension.
*/ */
attribute nsISAXAttributes attributes; attribute nsISAXAttributes attributes;
/** /**
* The baseURI for the Entry or Feed. * The baseURI for the Entry or Feed.
*/ */
attribute nsIURI baseURI; attribute nsIURI baseURI;
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(31bfd5b4-8ff5-4bfd-a8cb-b3dfbd4f0a5b)]
interface nsIFeedEntry : nsIFeedContainer { interface nsIFeedEntry : nsIFeedContainer {
/** /**
* Uses description, subtitle, summary, content and extensions * Uses description, subtitle, summary, content and extensions
* to generate a summary. * to generate a summary.
* *
*/ */
attribute nsIFeedTextConstruct summary; attribute nsIFeedTextConstruct summary;
/** /**
* The date the entry was published, in RFC822 form. Parsable by JS * The date the entry was published, in RFC822 form. Parsable by JS
* and mail code. * and mail code.
*/ */
attribute AString published; attribute AString published;
/** /**
* Uses atom:content and content:encoded to provide * Uses atom:content and content:encoded to provide
* a 'full text' view of an entry. * a 'full text' view of an entry.
* *
*/ */
attribute nsIFeedTextConstruct content; attribute nsIFeedTextConstruct content;
/** /**
* Enclosures are podcasts, photocasts, etc. * Enclosures are podcasts, photocasts, etc.
*/ */
attribute nsIArray enclosures; attribute nsIArray enclosures;
/** /**
* Enclosures, etc. that might be displayed inline. * Enclosures, etc. that might be displayed inline.
*/ */
attribute nsIArray mediaContent; attribute nsIArray mediaContent;
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(0fecd56b-bd92-481b-a486-b8d489cdd385)]
interface nsIFeedGenerator : nsIFeedElementBase interface nsIFeedGenerator : nsIFeedElementBase
{ {
/** /**
* The name of the software. * The name of the software.
*/ */
attribute AString agent; attribute AString agent;
/** /**
* The version of the software. * The version of the software.
*/ */
attribute AString version; attribute AString version;
/** /**
* A URI associated with the software. * A URI associated with the software.
*/ */
attribute nsIURI uri; attribute nsIURI uri;
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(4d2ebe88-36eb-4e20-bcd1-997b3c1f24ce)]
interface nsIFeedResultListener : nsISupports interface nsIFeedResultListener : nsISupports
{ {
/** /**
* Always called, even after an error. There could be new feed-level * Always called, even after an error. There could be new feed-level
* data available at this point, if it followed or was interspersed * data available at this point, if it followed or was interspersed
* with the items. Fire-and-Forget implementations only need this. * with the items. Fire-and-Forget implementations only need this.
* *
* @param result * @param result
* An object implementing nsIFeedResult representing the feed * An object implementing nsIFeedResult representing the feed
* and its metadata. * and its metadata.
*/ */
void handleResult(in nsIFeedResult result); void handleResult(in nsIFeedResult result);
}; };
@ -34,54 +33,54 @@ interface nsIFeedResultListener : nsISupports
[scriptable, uuid(ebfd5de5-713c-40c0-ad7c-f095117fa580)] [scriptable, uuid(ebfd5de5-713c-40c0-ad7c-f095117fa580)]
interface nsIFeedProgressListener : nsIFeedResultListener { interface nsIFeedProgressListener : nsIFeedResultListener {
/** /**
* ReportError will be called in the event of fatal * ReportError will be called in the event of fatal
* XML errors, or if the document is not a feed. The bozo * 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. * bit will be set if the error was due to a fatal error.
* *
* @param errorText * @param errorText
* A short description of the error. * A short description of the error.
* @param lineNumber * @param lineNumber
* The line on which the error occurred. * The line on which the error occurred.
*/ */
void reportError(in AString errorText, in long lineNumber, void reportError(in AString errorText, in long lineNumber,
in boolean bozo); in boolean bozo);
/** /**
* StartFeed will be called as soon as a reasonable start to * StartFeed will be called as soon as a reasonable start to
* a feed is detected. * a feed is detected.
* *
* @param result * @param result
* An object implementing nsIFeedResult representing the feed * An object implementing nsIFeedResult representing the feed
* and its metadata. At this point, the result has version * and its metadata. At this point, the result has version
* information. * information.
*/ */
void handleStartFeed(in nsIFeedResult result); void handleStartFeed(in nsIFeedResult result);
/** /**
* Called when the first entry/item is encountered. In Atom, all * Called when the first entry/item is encountered. In Atom, all
* feed data is required to preceed the entries. In RSS, the data * 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, * usually does. If the type is one of the entry/item-only types,
* this event will not be called. * this event will not be called.
* *
* @param result * @param result
* An object implementing nsIFeedResult representing the feed * An object implementing nsIFeedResult representing the feed
* and its metadata. At this point, the result will likely have * and its metadata. At this point, the result will likely have
* most of its feed-level metadata. * most of its feed-level metadata.
*/ */
void handleFeedAtFirstEntry(in nsIFeedResult result); void handleFeedAtFirstEntry(in nsIFeedResult result);
/** /**
* Called after each entry/item. If the document is a standalone * Called after each entry/item. If the document is a standalone
* item or entry, this HandleFeedAtFirstEntry will not have been * item or entry, this HandleFeedAtFirstEntry will not have been
* called. Also, this entry's parent field will be null. * called. Also, this entry's parent field will be null.
* *
* @param entry * @param entry
* An object implementing nsIFeedEntry that represents the latest * An object implementing nsIFeedEntry that represents the latest
* entry encountered. * entry encountered.
* @param result * @param result
* An object implementing nsIFeedResult representing the feed * An object implementing nsIFeedResult representing the feed
* and its metadata. * and its metadata.
*/ */
void handleEntry(in nsIFeedEntry entry, in nsIFeedResult result); void handleEntry(in nsIFeedEntry entry, in nsIFeedResult result);
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(29cbd45f-f2d3-4b28-b557-3ab7a61ecde4)]
interface nsIFeedPerson : nsIFeedElementBase interface nsIFeedPerson : nsIFeedElementBase
{ {
/** /**
* The name of the person. * The name of the person.
*/ */
attribute AString name; attribute AString name;
/** /**
* An email address associated with the person. * An email address associated with the person.
*/ */
attribute AString email; attribute AString email;
/** /**
* A URI associated with the person (e.g. a homepage). * A URI associated with the person (e.g. a homepage).
*/ */
attribute nsIURI uri; attribute nsIURI uri;
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(8a0b2908-21b0-45d7-b14d-30df0f92afc7)]
interface nsIFeedProcessor : nsIStreamListener { interface nsIFeedProcessor : nsIStreamListener {
/** /**
* The listener that will respond to feed events. * The listener that will respond to feed events.
*/ */
attribute nsIFeedResultListener listener; attribute nsIFeedResultListener listener;
// Level is where to listen for the extension, a constant: FEED, // Level is where to listen for the extension, a constant: FEED,
// ENTRY, BOTH. // ENTRY, BOTH.
// //
// XXX todo void registerExtensionHandler(in // XXX todo void registerExtensionHandler(in
// nsIFeedExtensionHandler, in long level); // nsIFeedExtensionHandler, in long level);
/** /**
* Parse a feed asynchronously. The caller must then call the * Parse a feed asynchronously. The caller must then call the
* nsIFeedProcessor's nsIStreamListener methods to drive the * nsIFeedProcessor's nsIStreamListener methods to drive the
* parse. Do not call the other parse methods during an asynchronous * parse. Do not call the other parse methods during an asynchronous
* parse. * parse.
* *
* @param requestObserver The observer to notify on start/stop. This * @param requestObserver The observer to notify on start/stop. This
* argument can be null. * argument can be null.
* @param uri The base URI. * @param uri The base URI.
*/ */
void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri); void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri);
}; };

View file

@ -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 /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -15,51 +14,51 @@ interface nsIURI;
[scriptable, uuid(7a180b78-0f46-4569-8c22-f3d720ea1c57)] [scriptable, uuid(7a180b78-0f46-4569-8c22-f3d720ea1c57)]
interface nsIFeedResult : nsISupports { interface nsIFeedResult : nsISupports {
/** /**
* The Feed parser will set the bozo bit when a feed triggers a fatal * 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 * error during XML parsing. There may be entries and feed metadata
* that were parsed before the error. Thanks to Tim Bray for * that were parsed before the error. Thanks to Tim Bray for
* suggesting this terminology. * suggesting this terminology.
* <http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim> * <http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim>
*/ */
attribute boolean bozo; attribute boolean bozo;
/** /**
* The parsed feed or entry. * The parsed feed or entry.
* *
* Will be null if a non-feed is processed. * Will be null if a non-feed is processed.
*/ */
attribute nsIFeedContainer doc; attribute nsIFeedContainer doc;
/** /**
* The address from which the feed was fetched. * The address from which the feed was fetched.
*/ */
attribute nsIURI uri; attribute nsIURI uri;
/** /**
* Feed Version: * Feed Version:
* atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03, * atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03,
* atomEntry, rssItem * atomEntry, rssItem
* *
* Will be null if a non-feed is processed. * Will be null if a non-feed is processed.
*/ */
attribute AString version; attribute AString version;
/** /**
* An XSLT stylesheet available to transform the source of the * An XSLT stylesheet available to transform the source of the
* feed. Some feeds include this information in a processing * feed. Some feeds include this information in a processing
* instruction. It's generally intended for clients with specific * instruction. It's generally intended for clients with specific
* feed capabilities. * feed capabilities.
*/ */
attribute nsIURI stylesheet; attribute nsIURI stylesheet;
/** /**
* HTTP response headers that accompanied the feed. * HTTP response headers that accompanied the feed.
*/ */
attribute nsIProperties headers; attribute nsIProperties headers;
/** /**
* Registers a prefix used to access an extension in the feed/entry * Registers a prefix used to access an extension in the feed/entry
*/ */
void registerExtensionPrefix(in AString aNamespace, in AString aPrefix); void registerExtensionPrefix(in AString aNamespace, in AString aPrefix);
}; };

View file

@ -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 /* 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 * 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/. */ * 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)] [scriptable, uuid(fc97a2a9-d649-4494-931e-db81a156c873)]
interface nsIFeedTextConstruct : nsISupports interface nsIFeedTextConstruct : nsISupports
{ {
/** /**
* If the text construct contains (X)HTML, relative references in * If the text construct contains (X)HTML, relative references in
* the content should be resolved against this base URI. * the content should be resolved against this base URI.
*/ */
attribute nsIURI base; attribute nsIURI base;
/** /**
* The language of the text. For example, "en-US" for US English. * The language of the text. For example, "en-US" for US English.
*/ */
attribute AString lang; attribute AString lang;
/** /**
* One of "text", "html", or "xhtml". If the type is (x)html, a '<' * One of "text", "html", or "xhtml". If the type is (x)html, a '<'
* character represents markup. To display that character, an escape * character represents markup. To display that character, an escape
* such as &lt; must be used. If the type is "text", the '<' * such as &lt; must be used. If the type is "text", the '<'
* character represents the character itself, and such text should * character represents the character itself, and such text should
* not be embedded in markup without escaping it first. * not be embedded in markup without escaping it first.
*/ */
attribute AString type; attribute AString type;
/** /**
* The content of the text construct. * The content of the text construct.
*/ */
attribute AString text; attribute AString text;
/** /**
* Returns the text of the text construct, with all markup stripped * Returns the text of the text construct, with all markup stripped
* and all entities decoded. If the type attribute's value is "text", * and all entities decoded. If the type attribute's value is "text",
* this function returns the value of the text attribute unchanged. * this function returns the value of the text attribute unchanged.
*/ */
AString plainText(); AString plainText();
/** /**
* Return an nsIDocumentFragment containing the text and markup. * Return an nsIDocumentFragment containing the text and markup.
*/ */
DocumentFragment createDocumentFragment(in Element element); DocumentFragment createDocumentFragment(in Element element);
}; };