akregator/src

storagedummyimpl.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2005 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
00005                   2005 Frank Osterfeld <frank.osterfeld@kdemail.net>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 
00026 #ifndef AKREGATOR_STORAGEDUMMYIMPL_H
00027 #define AKREGATOR_STORAGEDUMMYIMPL_H
00028 
00029 #include "storage.h"
00030 
00031 namespace Akregator {
00032 namespace Backend {
00033 
00037 class StorageDummyImpl : public Storage
00038 {
00039     Q_OBJECT
00040     public:
00041 
00042         StorageDummyImpl();     
00043         StorageDummyImpl(const StorageDummyImpl&);
00044         StorageDummyImpl &operator =(const StorageDummyImpl&);
00045         virtual ~StorageDummyImpl();
00046         virtual void initialize(const QStringList& params);
00051         virtual bool open(bool autoCommit = false);
00052 
00057         virtual bool commit();
00058 
00063         virtual bool rollback();
00064 
00069         virtual bool close();
00070 
00074         virtual FeedStorage* archiveFor(const QString &url);
00075         virtual bool autoCommit() const;
00076         virtual int unreadFor(const QString &url);
00077         virtual void setUnreadFor(const QString &url, int unread);
00078         virtual int totalCountFor(const QString &url);
00079         virtual void setTotalCountFor(const QString &url, int total);
00080         virtual int lastFetchFor(const QString& url);
00081         virtual void setLastFetchFor(const QString& url, int lastFetch);
00082         virtual QStringList feeds() const;
00083 
00084         virtual void storeFeedList(const QString& opmlStr);
00085         virtual QString restoreFeedList() const;
00086 
00087         virtual void storeTagSet(const QString& xmlStr);
00088         virtual QString restoreTagSet() const;
00089 
00093         virtual void add(Storage* source);
00094         
00096         virtual void clear();
00097         
00098     protected slots:
00099         virtual void slotCommit();
00100         
00101     private:
00102         class StorageDummyImplPrivate;
00103         StorageDummyImplPrivate *d;
00104 };
00105 
00106 }
00107 }
00108 
00109 #endif // STORAGEDummyIMPL_H
KDE Home | KDE Accessibility Home | Description of Access Keys