akregator/src

storagedummyimpl.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2005 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
5  2005 Frank Osterfeld <frank.osterfeld@kdemail.net>
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 TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 
26 #ifndef AKREGATOR_STORAGEDUMMYIMPL_H
27 #define AKREGATOR_STORAGEDUMMYIMPL_H
28 
29 #include "storage.h"
30 
31 namespace Akregator {
32 namespace Backend {
33 
37 class StorageDummyImpl : public Storage
38 {
39  Q_OBJECT
40 
41  public:
42 
45  StorageDummyImpl &operator =(const StorageDummyImpl&);
46  virtual ~StorageDummyImpl();
47  virtual void initialize(const TQStringList& params);
52  virtual bool open(bool autoCommit = false);
53 
58  virtual bool commit();
59 
64  virtual bool rollback();
65 
70  virtual bool close();
71 
75  virtual FeedStorage* archiveFor(const TQString &url);
76  virtual bool autoCommit() const;
77  virtual int unreadFor(const TQString &url);
78  virtual void setUnreadFor(const TQString &url, int unread);
79  virtual int totalCountFor(const TQString &url);
80  virtual void setTotalCountFor(const TQString &url, int total);
81  virtual int lastFetchFor(const TQString& url);
82  virtual void setLastFetchFor(const TQString& url, int lastFetch);
83  virtual TQStringList feeds() const;
84 
85  virtual void storeFeedList(const TQString& opmlStr);
86  virtual TQString restoreFeedList() const;
87 
88  virtual void storeTagSet(const TQString& xmlStr);
89  virtual TQString restoreTagSet() const;
90 
94  virtual void add(Storage* source);
95 
97  virtual void clear();
98 
99  protected slots:
100  virtual void slotCommit();
101 
102  private:
103  class StorageDummyImplPrivate;
104  StorageDummyImplPrivate *d;
105 };
106 
107 }
108 }
109 
110 #endif // STORAGEDummyIMPL_H