akregator/src

feedstoragedummyimpl.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2005 Frank Osterfeld <frank.osterfeld@kdemail.net>
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 TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef AKREGATOR_BACKEND_FEEDSTORAGEDUMMYIMPL_H
25 #define AKREGATOR_BACKEND_FEEDSTORAGEDUMMYIMPL_H
26 
27 #include "feedstorage.h"
28 namespace Akregator {
29 namespace Backend {
30 
31 class StorageDummyImpl;
32 class FeedStorageDummyImpl : public FeedStorage
33 {
34  public:
35  FeedStorageDummyImpl(const TQString& url, StorageDummyImpl* main);
36  virtual ~FeedStorageDummyImpl();
37 
38  virtual void add(FeedStorage* source);
39  virtual void copyArticle(const TQString& guid, FeedStorage* source);
40 
41  virtual void clear();
42  virtual int unread();
43  virtual void setUnread(int unread);
44  virtual int totalCount();
45  virtual int lastFetch();
46  virtual void setLastFetch(int lastFetch);
47 
48  virtual TQStringList articles(const TQString& tag=TQString());
49 
50  virtual TQStringList articles(const Category& cat);
51 
52 
53  virtual bool contains(const TQString& guid);
54  virtual void addEntry(const TQString& guid);
55  virtual void deleteArticle(const TQString& guid);
56  virtual int comments(const TQString& guid);
57  virtual TQString commentsLink(const TQString& guid);
58  virtual void setCommentsLink(const TQString& guid, const TQString& commentsLink);
59  virtual void setComments(const TQString& guid, int comments);
60  virtual bool guidIsHash(const TQString& guid);
61  virtual void setGuidIsHash(const TQString& guid, bool isHash);
62  virtual bool guidIsPermaLink(const TQString& guid);
63  virtual void setGuidIsPermaLink(const TQString& guid, bool isPermaLink);
64  virtual uint hash(const TQString& guid);
65  virtual void setHash(const TQString& guid, uint hash);
66  virtual void setDeleted(const TQString& guid);
67  virtual TQString link(const TQString& guid);
68  virtual void setLink(const TQString& guid, const TQString& link);
69  virtual uint pubDate(const TQString& guid);
70  virtual void setPubDate(const TQString& guid, uint pubdate);
71  virtual int status(const TQString& guid);
72  virtual void setStatus(const TQString& guid, int status);
73  virtual TQString title(const TQString& guid);
74  virtual void setTitle(const TQString& guid, const TQString& title);
75  virtual TQString description(const TQString& guid);
76  virtual void setDescription(const TQString& guid, const TQString& description);
77  virtual void addTag(const TQString& guid, const TQString& tag);
78  virtual void removeTag(const TQString& guid, const TQString& tag);
79  virtual TQStringList tags(const TQString& guid=TQString());
80 
81  virtual void setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length);
82  virtual void removeEnclosure(const TQString& guid);
83  virtual void enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length);
84 
85  virtual void addCategory(const TQString& guid, const Category& category);
86  virtual TQValueList<Category> categories(const TQString& guid=TQString());
87 
88  virtual void setAuthor(const TQString& guid, const TQString& author);
89  virtual TQString author(const TQString& guid);
90 
91  virtual void close();
92  virtual void commit();
93  virtual void rollback();
94 
95  virtual void convertOldArchive();
96  private:
98  int findArticle(const TQString& guid);
99  void setTotalCount(int total);
100  class FeedStorageDummyImplPrivate;
101  FeedStorageDummyImplPrivate* d;
102 };
103 
104 }
105 }
106 #endif // AKREGATOR_FEEDSTORAGEDUMMYIMPL_H