• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

akregator

article.h

Go to the documentation of this file.
00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
00005                   2005 Frank Osterfeld <osterfeld@kde.org>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 
00026 #ifndef AKREGATOR_ARTICLE_H
00027 #define AKREGATOR_ARTICLE_H
00028 
00029 #include "akregator_export.h"
00030 #include "types.h"
00031 
00032 #include <syndication/person.h>
00033 
00034 #include <boost/shared_ptr.hpp>
00035 
00036 class QDateTime;
00037 class QString;
00038 
00039 template <class T> class QList;
00040 
00041 typedef unsigned int uint;
00042 
00043 class KUrl;
00044 
00045 namespace Syndication
00046 {
00047     class Item;
00048     typedef boost::shared_ptr<Item> ItemPtr;
00049 }
00050 
00051 namespace Akregator {
00052 
00053 namespace Backend
00054 {
00055     class FeedStorage;
00056 }
00057 class Feed;
00059 class AKREGATORPART_EXPORT Article
00060 {
00061     friend class ArticleDeleteJob;
00062     friend class ArticleModifyJob;
00063     friend class Feed;
00064 
00065 public:
00066         enum ContentOption {
00067             ContentAndOnlyContent, /*< returns the content field even if empty */
00068             DescriptionAsFallback /*< uses the description field as fallback if the content field is empty */
00069         };
00070 
00071         Article();
00075         Article(const QString& guid, Feed* feed);
00079         Article(const Syndication::ItemPtr& article, Feed* feed);
00080 
00081         Article(const Syndication::ItemPtr& article, Backend::FeedStorage* archive);
00082         Article(const Article &other);
00083         ~Article();
00084 
00085         void swap( Article & other ) {
00086             std::swap( d, other.d );
00087         }
00088 
00089         Article &operator=(const Article &other);
00090         bool operator==(const Article &other) const;
00091         bool operator!=(const Article &other) const;
00092 
00093 
00094         bool isNull() const;
00095 
00096         int status() const;
00097 
00098         QString title() const;
00099         KUrl link() const;
00100         QString description() const;
00101 
00102         QString content( ContentOption opt = ContentAndOnlyContent ) const;
00103 
00104         QString guid() const;
00106         bool keep() const;
00107 
00108         bool isDeleted() const;
00109 
00110         void offsetPubDate(int secs);
00111 
00112         Feed* feed() const;
00113 
00116         uint hash() const;
00117 
00120         bool guidIsHash() const;
00121 
00122         bool guidIsPermaLink() const;
00123 
00124         const QDateTime& pubDate() const;
00125 
00126         KUrl commentsLink() const;
00127 
00128         int comments() const;
00129 
00130         QString authorName() const;
00131         QString authorUri() const;
00132         QString authorEMail() const;
00133         QString authorAsHtml() const;
00134         QString authorShort() const;
00135 
00136         bool operator<(const Article &other) const;
00137         bool operator<=(const Article &other) const;
00138         bool operator>(const Article &other) const;
00139         bool operator>=(const Article &other) const;
00140 
00141     private: //only for our friends
00142         void setStatus(int s);
00143         void setDeleted();
00144         void setKeep(bool keep);
00145 
00146     private:
00147         struct Private;
00148         Private* d;
00149 };
00150 
00151 } // namespace Akregator
00152 
00153 #endif // AKREGATOR_ARTICLE_H

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal