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

akregator

  • sources
  • kde-4.14
  • kdepim
  • akregator
  • interfaces
article.h
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
5  2005 Frank Osterfeld <osterfeld@kde.org>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of Qt, and distribute the resulting executable,
23  without including the source code for Qt in the source distribution.
24 */
25 
26 #ifndef AKREGATOR_ARTICLE_H
27 #define AKREGATOR_ARTICLE_H
28 
29 #include "akregator_export.h"
30 #include "types.h"
31 
32 #include <syndication/person.h>
33 
34 #ifndef Q_MOC_RUN
35 #include <boost/shared_ptr.hpp>
36 #endif
37 
38 class QDateTime;
39 class QString;
40 
41 template <class T> class QList;
42 
43 typedef unsigned int uint;
44 
45 class KUrl;
46 
47 namespace Syndication
48 {
49  class Enclosure;
50  class Item;
51  typedef boost::shared_ptr<Item> ItemPtr;
52 }
53 
54 namespace Akregator {
55 
56 namespace Backend
57 {
58  class FeedStorage;
59 }
60 
61 class Feed;
63 class AKREGATOR_EXPORT Article
64 {
65  friend class ArticleDeleteJob;
66  friend class ArticleModifyJob;
67  friend class Feed;
68 
69 public:
70  enum ContentOption {
71  ContentAndOnlyContent, /*< returns the content field even if empty */
72  DescriptionAsFallback /*< uses the description field as fallback if the content field is empty */
73  };
74 
75  Article();
79  Article(const QString& guid, Feed* feed);
83  Article(const Syndication::ItemPtr& article, Feed* feed);
84 
85  Article(const Syndication::ItemPtr& article, Backend::FeedStorage* archive);
86  Article(const Article &other);
87  ~Article();
88 
89  void swap( Article & other ) {
90  std::swap( d, other.d );
91  }
92 
93  Article &operator=(const Article &other);
94  bool operator==(const Article &other) const;
95  bool operator!=(const Article &other) const;
96 
97 
98  bool isNull() const;
99 
100  int status() const;
101 
102  QString title() const;
103  KUrl link() const;
104  QString description() const;
105 
106  QString content( ContentOption opt = ContentAndOnlyContent ) const;
107 
108  QString guid() const;
110  bool keep() const;
111 
112  bool isDeleted() const;
113 
114  void offsetPubDate(int secs);
115 
116  Feed* feed() const;
117 
120  uint hash() const;
121 
124  bool guidIsHash() const;
125 
126  bool guidIsPermaLink() const;
127 
128  QDateTime pubDate() const;
129 
130  KUrl commentsLink() const;
131 
132  int comments() const;
133 
134  QString authorName() const;
135  QString authorUri() const;
136  QString authorEMail() const;
137  QString authorAsHtml() const;
138  QString authorShort() const;
139 
140  boost::shared_ptr<const Syndication::Enclosure> enclosure() const;
141 
142  bool operator<(const Article &other) const;
143  bool operator<=(const Article &other) const;
144  bool operator>(const Article &other) const;
145  bool operator>=(const Article &other) const;
146 
147  private: //only for our friends
148  void setStatus(int s);
149  void setDeleted();
150  void setKeep(bool keep);
151 
152  private:
153  struct Private;
154  Private* d;
155 };
156 
157 } // namespace Akregator
158 
159 #endif // AKREGATOR_ARTICLE_H
Akregator::Article::ContentOption
ContentOption
Definition: article.h:70
Syndication::ItemPtr
boost::shared_ptr< Item > ItemPtr
Definition: article.h:50
types.h
AKREGATOR_EXPORT
#define AKREGATOR_EXPORT
Definition: akregator_export.h:35
uint
unsigned int uint
Definition: article.h:41
Akregator::Article::ContentAndOnlyContent
Definition: article.h:71
Akregator::ArticleModifyJob
Definition: articlejobs.h:88
Akregator::Backend::FeedStorage
Definition: feedstorage.h:66
QString
QList
Definition: article.h:41
Akregator::Article::swap
void swap(Article &other)
Definition: article.h:89
Akregator::ArticleDeleteJob
Definition: articlejobs.h:69
akregator_export.h
Akregator::Feed
represents a feed
Definition: feed.h:53
Akregator::Article
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:63
QDateTime
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akregator

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal