Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsIFeedElementBase.idl"
8 interface nsIURI;
9 interface nsIWritablePropertyBag2;
10 interface nsIArray;
11 interface nsIFeedTextConstruct;
13 /**
14 * A shared base for feeds and items, which are pretty similar,
15 * but they have some divergent attributes and require
16 * different convenience methods.
17 */
18 [scriptable, uuid(577a1b4c-b3d4-4c76-9cf8-753e6606114f)]
19 interface nsIFeedContainer : nsIFeedElementBase
20 {
21 /**
22 * Many feeds contain an ID distinct from their URI, and
23 * entries have standard fields for this in all major formats.
24 */
25 attribute AString id;
27 /**
28 * The fields found in the document. Common Atom
29 * and RSS fields are normalized. This includes some namespaced
30 * extensions such as dc:subject and content:encoded.
31 * Consumers can avoid normalization by checking the feed type
32 * and accessing specific fields.
33 *
34 * Common namespaces are accessed using prefixes, like get("dc:subject");.
35 * See nsIFeedResult::registerExtensionPrefix.
36 */
37 attribute nsIWritablePropertyBag2 fields;
39 /**
40 * Sometimes there's no title, or the title contains markup, so take
41 * care in decoding the attribute.
42 */
43 attribute nsIFeedTextConstruct title;
45 /**
46 * Returns the primary link for the feed or entry.
47 */
48 attribute nsIURI link;
50 /**
51 * Returns all links for a feed or entry.
52 */
53 attribute nsIArray links;
55 /**
56 * Returns the categories found in a feed or entry.
57 */
58 attribute nsIArray categories;
60 /**
61 * The rights or license associated with a feed or entry.
62 */
63 attribute nsIFeedTextConstruct rights;
65 /**
66 * A list of nsIFeedPersons that authored the feed.
67 */
68 attribute nsIArray authors;
70 /**
71 * A list of nsIFeedPersons that contributed to the feed.
72 */
73 attribute nsIArray contributors;
75 /**
76 * The date the feed was updated, in RFC822 form. Parsable by JS
77 * and mail code.
78 */
79 attribute AString updated;
81 /**
82 * Syncs a container's fields with its convenience attributes.
83 */
84 void normalize();
85 };