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

akregator

  • sources
  • kde-4.12
  • 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 #include <boost/shared_ptr.hpp>
35 
36 class QDateTime;
37 class QString;
38 
39 template <class T> class QList;
40 
41 typedef unsigned int uint;
42 
43 class KUrl;
44 
45 namespace Syndication
46 {
47  class Enclosure;
48  class Item;
49  typedef boost::shared_ptr<Item> ItemPtr;
50 }
51 
52 namespace Akregator {
53 
54 namespace Backend
55 {
56  class FeedStorage;
57 }
58 
59 class Feed;
61 class AKREGATOR_EXPORT Article
62 {
63  friend class ArticleDeleteJob;
64  friend class ArticleModifyJob;
65  friend class Feed;
66 
67 public:
68  enum ContentOption {
69  ContentAndOnlyContent, /*< returns the content field even if empty */
70  DescriptionAsFallback /*< uses the description field as fallback if the content field is empty */
71  };
72 
73  Article();
77  Article(const QString& guid, Feed* feed);
81  Article(const Syndication::ItemPtr& article, Feed* feed);
82 
83  Article(const Syndication::ItemPtr& article, Backend::FeedStorage* archive);
84  Article(const Article &other);
85  ~Article();
86 
87  void swap( Article & other ) {
88  std::swap( d, other.d );
89  }
90 
91  Article &operator=(const Article &other);
92  bool operator==(const Article &other) const;
93  bool operator!=(const Article &other) const;
94 
95 
96  bool isNull() const;
97 
98  int status() const;
99 
100  QString title() const;
101  KUrl link() const;
102  QString description() const;
103 
104  QString content( ContentOption opt = ContentAndOnlyContent ) const;
105 
106  QString guid() const;
108  bool keep() const;
109 
110  bool isDeleted() const;
111 
112  void offsetPubDate(int secs);
113 
114  Feed* feed() const;
115 
118  uint hash() const;
119 
122  bool guidIsHash() const;
123 
124  bool guidIsPermaLink() const;
125 
126  QDateTime pubDate() const;
127 
128  KUrl commentsLink() const;
129 
130  int comments() const;
131 
132  QString authorName() const;
133  QString authorUri() const;
134  QString authorEMail() const;
135  QString authorAsHtml() const;
136  QString authorShort() const;
137 
138  boost::shared_ptr<const Syndication::Enclosure> enclosure() const;
139 
140  bool operator<(const Article &other) const;
141  bool operator<=(const Article &other) const;
142  bool operator>(const Article &other) const;
143  bool operator>=(const Article &other) const;
144 
145  private: //only for our friends
146  void setStatus(int s);
147  void setDeleted();
148  void setKeep(bool keep);
149 
150  private:
151  struct Private;
152  Private* d;
153 };
154 
155 } // namespace Akregator
156 
157 #endif // AKREGATOR_ARTICLE_H
Akregator::Article::ContentOption
ContentOption
Definition: article.h:68
Syndication::ItemPtr
boost::shared_ptr< Item > ItemPtr
Definition: article.h:48
types.h
AKREGATOR_EXPORT
#define AKREGATOR_EXPORT
Definition: akregator_export.h:35
uint
unsigned int uint
Definition: article.h:39
Akregator::Article::ContentAndOnlyContent
Definition: article.h:69
Akregator::ArticleModifyJob
Definition: articlejobs.h:86
Akregator::Backend::FeedStorage
Definition: feedstorage.h:66
Akregator::Article::swap
void swap(Article &other)
Definition: article.h:87
Akregator::ArticleDeleteJob
Definition: articlejobs.h:67
akregator_export.h
Akregator::Feed
represents a feed
Definition: feed.h:52
Akregator::Article
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:61
QList
Definition: article.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 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

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