syndication/rss2
document.h
00001 /* 00002 * This file is part of the syndication library 00003 * 00004 * Copyright (C) 2005 Frank Osterfeld <osterfeld@kde.org> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 * 00021 */ 00022 00023 #ifndef SYNDICATION_RSS2_DOCUMENT_H 00024 #define SYNDICATION_RSS2_DOCUMENT_H 00025 00026 #include <syndication/specificdocument.h> 00027 #include <syndication/elementwrapper.h> 00028 00029 #include <ctime> 00030 00031 class QDomDocument; 00032 class QDomElement; 00033 class QString; 00034 00035 template <class T> class QList; 00036 template <class T> class QSet; 00037 00038 namespace Syndication { 00039 namespace RSS2 { 00040 00041 class Category; 00042 class Cloud; 00043 class Document; 00044 class Image; 00045 class Item; 00046 class TextInput; 00047 typedef boost::shared_ptr<Document> DocumentPtr; 00048 00055 class SYNDICATION_EXPORT Document : public Syndication::SpecificDocument, 00056 public Syndication::ElementWrapper 00057 { 00058 public: 00059 00068 static Document fromXML(const QDomDocument& document); 00069 00074 Document(); 00075 00079 Document(const Document& other); 00080 00084 virtual ~Document(); 00085 00092 Document& operator=(const Document& other); 00093 00099 virtual bool accept(DocumentVisitor* visitor); 00100 00106 bool isValid() const; 00107 00113 QString title() const; 00114 00120 QString link() const; 00121 00127 QString description() const; 00128 00132 QList<Item> items() const; 00133 00138 QString language() const; 00139 00149 QString copyright() const; 00150 00156 QString managingEditor() const; 00157 00164 QString webMaster() const; 00165 00178 time_t pubDate() const; 00179 00186 time_t lastBuildDate() const; 00187 00193 QList<Category> categories() const; 00194 00201 QString generator() const; 00202 00212 QString docs() const; 00213 00221 Cloud cloud() const; 00222 00229 int ttl() const; 00230 00237 Image image() const; 00238 00244 TextInput textInput() const; 00245 00250 QSet<int> skipHours() const; 00251 00253 enum DayOfWeek 00254 { 00255 00256 Monday = 0, 00257 Tuesday = 1, 00258 Wednesday = 2, 00259 Thursday = 3, 00260 Friday = 4, 00261 Saturday = 5, 00262 Sunday = 6 00263 }; 00264 00269 QSet<DayOfWeek> skipDays() const; 00270 00275 QList<QDomElement> unhandledElements() const; 00276 00283 QString debugInfo() const; 00284 00285 //@cond PRIVATE 00293 void getItemTitleFormatInfo(bool* isCDATA, bool* containsMarkup) const; 00294 00302 void getItemDescriptionFormatInfo(bool* isCDATA, bool* containsMarkup) const; 00303 //@endcond 00304 00305 private: 00311 explicit Document(const QDomElement& element); 00312 00313 class DocumentPrivate; 00314 boost::shared_ptr<DocumentPrivate> d; 00315 00316 }; 00317 00318 } // namespace RSS2 00319 } // namespace Syndication 00320 00321 #endif // SYNDICATION_RSS2_DOCUMENT_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:58 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:58 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.