/usr/include/syndication/atom/document.h is in kdepimlibs5-dev 4:4.14.10-7+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | /*
* This file is part of the syndication library
*
* Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef SYNDICATION_ATOM_DOCUMENT_H
#define SYNDICATION_ATOM_DOCUMENT_H
#include <syndication/specificdocument.h>
#include <syndication/elementwrapper.h>
#include <ctime>
template <class T> class QList;
namespace Syndication {
class DocumentVisitor;
namespace Atom {
class Category;
class Entry;
class EntryDocument;
class FeedDocument;
class Generator;
class Link;
class Person;
//@cond PRIVATE
typedef boost::shared_ptr<EntryDocument> EntryDocumentPtr;
typedef boost::shared_ptr<FeedDocument> FeedDocumentPtr;
//@endcond
/**
* An Atom 1.0 Feed Document, containing metadata describing the
* feed and a number of entries.
*
* @author Frank Osterfeld
*/
class SYNDICATION_EXPORT FeedDocument : public Syndication::SpecificDocument, public ElementWrapper
{
public:
/**
* default constructor, creates a null feed, which
* is invalid.
* @see isValid()
*/
FeedDocument();
/**
* creates a FeedDocument wrapping an atom:feed element.
* @param element a DOM element, should be a atom:feed document
* (although not enforced), otherwise this object will not parse
* anything useful
*/
explicit FeedDocument(const QDomElement& element);
/**
* Used by visitors for double dispatch. See DocumentVisitor
* for more information.
* @param visitor the visitor calling the method
*/
bool accept(DocumentVisitor* visitor);
/**
* a list of persons who are the authors of this feed.
* According to the Atom 1.0 spec, a feed must have an
* author unless all entries in it have one.
*/
QList<Person> authors() const;
/**
* a list of persons who contribute to this feed. (optional)
*/
QList<Person> contributors() const;
/**
* a list of categories this feed is assigned to (optional)
*/
QList<Category> categories() const;
/**
* URL of an image serving as a feed icon (optional)
*
* @return icon URL, or a null string if not specified in the feed.
*/
QString icon() const;
/**
* URL of an image serving as a feed logo (optional)
*
* @return image URL, or a null string if not specified in the feed.
*/
QString logo() const;
/**
* a string that unambigously identifies the feed (required)
*
* @return the ID of the feed. As defined in the Atom spec it must be
* a valid URI (which is neither checked nor enforced by this parser)
*
*/
QString id() const;
/**
* copyright information (optional)
*
* @return copyright information for the feed (intended for human
* readers), or a null string if not specified
*/
QString rights() const;
/**
* feed title (required).
*
* @return title string as HTML.
*/
QString title() const;
/**
* description or subtitle of the feed (optional).
*
* @return subtitle string as HTML, or a null string
* if not specified in the feed.
*/
QString subtitle() const;
/**
* description of the agent used to generate the feed. See
* Generator for more information (optional).
*
* @return description of the generator, or a null Generator object
* if not specified in the feed.
*/
Generator generator() const;
/**
* The datetime of the last modification of the feed content.
*
* @return the modification date in seconds since epoch
*/
time_t updated() const;
/**
* a list of links. See Link for more information on
* link types.
*/
QList<Link> links() const;
/**
* a list of the entries (items) in this feed.
*/
QList<Entry> entries() const;
/**
* returns all child elements of this feed not covered by this class.
* This can be used to access additional metadata from Atom extensions.
*/
QList<QDomElement> unhandledElements() const;
/**
* returns a description of this feed document for debugging
* purposes.
*
* @return debug string
*/
QString debugInfo() const;
/**
* returns whether this document is valid or not.
* Invalid documents do not contain any useful
* information.
*/
bool isValid() const;
};
/**
* An Atom 1.0 Entry Document, containing a single Atom entry outside
* of the context of a feed.
*
* @author Frank Osterfeld
*/
class SYNDICATION_EXPORT EntryDocument : public Syndication::SpecificDocument, public Syndication::ElementWrapper
{
public:
/**
* default constructor, creates a null document, which is invalid.
* @see isValid()
*/
EntryDocument();
/**
* creates an Atom Entry Document wrapping an atom:entry element.
* @param element a DOM element, should be a atom:entry element
* (although not enforced), otherwise this object will not parse
* anything useful
*/
explicit EntryDocument(const QDomElement& element);
/**
* Used by visitors for double dispatch. See DocumentVisitor
* for more information.
* @param visitor the visitor calling the method
*/
bool accept(DocumentVisitor* visitor);
/**
* returns the single entry described in the source.
*
* @return the entry
*/
Entry entry() const;
/**
* returns a description of this entry document for debugging
* purposes.
*
* @return debug string
*/
QString debugInfo() const;
/**
* returns whether this document is valid or not.
* Invalid documents do not contain any useful
* information.
*/
bool isValid() const;
};
} // namespace Atom
} // namespace Syndication
#endif // SYNDICATION_ATOM_DOCUMENT_H
|