• 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
feedstorage.h
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2005 Frank Osterfeld <osterfeld@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 #ifndef AKREGATOR_BACKEND_FEEDSTORAGE_H
25 #define AKREGATOR_BACKEND_FEEDSTORAGE_H
26 
27 #include <QtCore/QObject>
28 #include <QtCore/QList>
29 
30 class QString;
31 class QStringList;
32 
33 
34 namespace Akregator {
35 namespace Backend {
36 
38 class Category
39 {
40  public:
41 
42  QString term;
43  QString scheme;
44  QString name;
45 
48  bool operator==(const Category& other) const
49  {
50  return term == other.term && scheme == other.scheme;
51  }
52 
53  bool operator!=(const Category& other) const
54  {
55  return !operator==(other);
56  }
58  bool operator<(const Category& other) const
59  {
60  return other.scheme < other.scheme || (other.scheme == other.scheme && term < other.term);
61  }
62 };
63 
64 class Storage;
65 
66 class FeedStorage : public QObject //krazy:exclude=qobject
67 {
68  public:
69 
70  virtual int unread() const = 0;
71  virtual void setUnread(int unread) = 0;
72  virtual int totalCount() const = 0;
73  virtual int lastFetch() const = 0;
74  virtual void setLastFetch(int lastFetch) = 0;
75 
77  virtual QStringList articles(const QString& tagID=QString()) const = 0;
78 
80  virtual QStringList articles(const Category& cat) const = 0;
81 
85  virtual void add(FeedStorage* source) = 0;
86 
88  virtual void copyArticle(const QString& guid, FeedStorage* source) = 0;
89 
91  virtual void clear() = 0;
92 
93 
94  virtual bool contains(const QString& guid) const = 0;
95  virtual void addEntry(const QString& guid) = 0;
96  virtual void deleteArticle(const QString& guid) = 0;
97  virtual int comments(const QString& guid) const = 0;
98  virtual QString commentsLink(const QString& guid) const = 0;
99  virtual void setCommentsLink(const QString& guid, const QString& commentsLink) = 0;
100  virtual void setComments(const QString& guid, int comments) = 0;
101  virtual bool guidIsHash(const QString& guid) const = 0;
102  virtual void setGuidIsHash(const QString& guid, bool isHash) = 0;
103  virtual bool guidIsPermaLink(const QString& guid) const = 0;
104  virtual void setGuidIsPermaLink(const QString& guid, bool isPermaLink) = 0;
105  virtual uint hash(const QString& guid) const = 0;
106  virtual void setHash(const QString& guid, uint hash) = 0;
107  virtual void setDeleted(const QString& guid) = 0;
108  virtual QString link(const QString& guid) const = 0;
109  virtual void setLink(const QString& guid, const QString& link) = 0;
110  virtual uint pubDate(const QString& guid) const = 0;
111  virtual void setPubDate(const QString& guid, uint pubdate) = 0;
112  virtual int status(const QString& guid) const = 0;
113  virtual void setStatus(const QString& guid, int status) = 0;
114  virtual QString title(const QString& guid) const = 0;
115  virtual void setTitle(const QString& guid, const QString& title) = 0;
116  virtual QString description(const QString& guid) const = 0;
117  virtual void setDescription(const QString& guid, const QString& description) = 0;
118  virtual QString content(const QString& guid) const = 0;
119  virtual void setContent(const QString& guid, const QString& content) = 0;
120 
121  virtual void addTag(const QString& guid, const QString& tag) = 0;
122  virtual void removeTag(const QString& guid, const QString& tag) = 0;
123 
125  virtual QStringList tags(const QString& guid=QString()) const = 0;
126 
127  virtual void addCategory(const QString& guid, const Category& category) = 0;
128  virtual QList<Category> categories(const QString& guid=QString()) const = 0;
129 
130  virtual void setEnclosure(const QString& guid, const QString& url, const QString& type, int length) = 0;
131  virtual void removeEnclosure(const QString& guid) = 0;
132 
133  virtual void setAuthorName(const QString& /*guid*/, const QString& name) = 0;
134  virtual void setAuthorUri(const QString& /*guid*/, const QString& uri) = 0;
135  virtual void setAuthorEMail(const QString& /*guid*/, const QString& email) = 0;
136 
137  virtual QString authorName(const QString& guid) const = 0;
138  virtual QString authorUri(const QString& guid) const = 0;
139  virtual QString authorEMail(const QString& guid) const = 0;
140 
141  virtual void enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length) const = 0;
142  virtual void close() = 0;
143  virtual void commit() = 0;
144  virtual void rollback() = 0;
145 
146  virtual void convertOldArchive() = 0;
147 };
148 
149 } // namespace Backend
150 } // namespace Akregator
151 
152 #endif // AKREGATOR_BACKEND_FEEDSTORAGE_H
Akregator::Backend::FeedStorage::removeTag
virtual void removeTag(const QString &guid, const QString &tag)=0
Akregator::Backend::FeedStorage::hash
virtual uint hash(const QString &guid) const =0
Akregator::Backend::FeedStorage::setEnclosure
virtual void setEnclosure(const QString &guid, const QString &url, const QString &type, int length)=0
Akregator::Backend::FeedStorage::tags
virtual QStringList tags(const QString &guid=QString()) const =0
returns the tags of a given article.
Akregator::Backend::FeedStorage::articles
virtual QStringList articles(const QString &tagID=QString()) const =0
returns the guids of all articles in this storage.
Akregator::Backend::FeedStorage::close
virtual void close()=0
Akregator::Backend::FeedStorage::status
virtual int status(const QString &guid) const =0
Akregator::Backend::FeedStorage::authorName
virtual QString authorName(const QString &guid) const =0
Akregator::Backend::FeedStorage::setCommentsLink
virtual void setCommentsLink(const QString &guid, const QString &commentsLink)=0
Akregator::Backend::FeedStorage::guidIsHash
virtual bool guidIsHash(const QString &guid) const =0
Akregator::Backend::FeedStorage::unread
virtual int unread() const =0
Akregator::Backend::FeedStorage::deleteArticle
virtual void deleteArticle(const QString &guid)=0
uint
unsigned int uint
Definition: article.h:41
Akregator::Backend::Category::operator!=
bool operator!=(const Category &other) const
Definition: feedstorage.h:53
Akregator::Backend::FeedStorage::setLastFetch
virtual void setLastFetch(int lastFetch)=0
Akregator::Backend::FeedStorage::setGuidIsPermaLink
virtual void setGuidIsPermaLink(const QString &guid, bool isPermaLink)=0
Akregator::Backend::FeedStorage::content
virtual QString content(const QString &guid) const =0
QObject::name
const char * name() const
Akregator::Backend::FeedStorage::setDeleted
virtual void setDeleted(const QString &guid)=0
Akregator::Backend::FeedStorage::setUnread
virtual void setUnread(int unread)=0
Akregator::Backend::FeedStorage::title
virtual QString title(const QString &guid) const =0
Akregator::Backend::FeedStorage::comments
virtual int comments(const QString &guid) const =0
Akregator::Backend::FeedStorage::setLink
virtual void setLink(const QString &guid, const QString &link)=0
QObject
Akregator::Backend::Category::scheme
QString scheme
Definition: feedstorage.h:43
Akregator::Backend::FeedStorage::copyArticle
virtual void copyArticle(const QString &guid, FeedStorage *source)=0
reads an article from another storage and adds it to this storage
Akregator::Backend::FeedStorage::addCategory
virtual void addCategory(const QString &guid, const Category &category)=0
Akregator::Backend::FeedStorage
Definition: feedstorage.h:66
Akregator::Backend::FeedStorage::commit
virtual void commit()=0
QString
QList
Definition: article.h:41
Akregator::Backend::FeedStorage::setTitle
virtual void setTitle(const QString &guid, const QString &title)=0
Akregator::Backend::FeedStorage::contains
virtual bool contains(const QString &guid) const =0
QStringList
Akregator::Backend::FeedStorage::pubDate
virtual uint pubDate(const QString &guid) const =0
Akregator::Backend::FeedStorage::guidIsPermaLink
virtual bool guidIsPermaLink(const QString &guid) const =0
Akregator::Backend::FeedStorage::enclosure
virtual void enclosure(const QString &guid, bool &hasEnclosure, QString &url, QString &type, int &length) const =0
Akregator::Backend::Category::operator<
bool operator<(const Category &other) const
we need this for QMaps
Definition: feedstorage.h:58
Akregator::Backend::FeedStorage::setPubDate
virtual void setPubDate(const QString &guid, uint pubdate)=0
Akregator::Backend::Category::operator==
bool operator==(const Category &other) const
two categories are equal when scheme and term are equal, name is ignored
Definition: feedstorage.h:48
Akregator::Backend::FeedStorage::add
virtual void add(FeedStorage *source)=0
Appends all articles from another storage.
Akregator::Backend::FeedStorage::setComments
virtual void setComments(const QString &guid, int comments)=0
Akregator::Backend::FeedStorage::totalCount
virtual int totalCount() const =0
Akregator::Backend::FeedStorage::convertOldArchive
virtual void convertOldArchive()=0
Akregator::Backend::FeedStorage::removeEnclosure
virtual void removeEnclosure(const QString &guid)=0
Akregator::Backend::FeedStorage::clear
virtual void clear()=0
deletes all articles from the archive
Akregator::Backend::FeedStorage::authorUri
virtual QString authorUri(const QString &guid) const =0
Akregator::Backend::FeedStorage::setDescription
virtual void setDescription(const QString &guid, const QString &description)=0
Akregator::Backend::FeedStorage::rollback
virtual void rollback()=0
Akregator::Backend::FeedStorage::addEntry
virtual void addEntry(const QString &guid)=0
Akregator::Backend::FeedStorage::setAuthorName
virtual void setAuthorName(const QString &, const QString &name)=0
Akregator::Backend::FeedStorage::authorEMail
virtual QString authorEMail(const QString &guid) const =0
Akregator::Backend::FeedStorage::lastFetch
virtual int lastFetch() const =0
Akregator::Backend::FeedStorage::setContent
virtual void setContent(const QString &guid, const QString &content)=0
Akregator::Backend::FeedStorage::categories
virtual QList< Category > categories(const QString &guid=QString()) const =0
Akregator::Backend::FeedStorage::commentsLink
virtual QString commentsLink(const QString &guid) const =0
Akregator::Backend::FeedStorage::link
virtual QString link(const QString &guid) const =0
Akregator::Backend::FeedStorage::addTag
virtual void addTag(const QString &guid, const QString &tag)=0
Akregator::Backend::FeedStorage::setHash
virtual void setHash(const QString &guid, uint hash)=0
Akregator::Backend::FeedStorage::setAuthorEMail
virtual void setAuthorEMail(const QString &, const QString &email)=0
Akregator::Backend::FeedStorage::setStatus
virtual void setStatus(const QString &guid, int status)=0
Akregator::Backend::FeedStorage::setAuthorUri
virtual void setAuthorUri(const QString &, const QString &uri)=0
Akregator::Backend::Category
a convenience class to handle categories in the backend
Definition: feedstorage.h:38
Akregator::Backend::Category::name
QString name
Definition: feedstorage.h:44
Akregator::Backend::FeedStorage::setGuidIsHash
virtual void setGuidIsHash(const QString &guid, bool isHash)=0
Akregator::Backend::FeedStorage::description
virtual QString description(const QString &guid) const =0
Akregator::Backend::Category::term
QString term
Definition: feedstorage.h:42
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