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 TQt, and distribute the resulting executable, 00023 without including the source code for TQt 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 00041 public: 00042 00043 StorageDummyImpl(); 00044 StorageDummyImpl(const StorageDummyImpl&); 00045 StorageDummyImpl &operator =(const StorageDummyImpl&); 00046 virtual ~StorageDummyImpl(); 00047 virtual void initialize(const TQStringList& params); 00052 virtual bool open(bool autoCommit = false); 00053 00058 virtual bool commit(); 00059 00064 virtual bool rollback(); 00065 00070 virtual bool close(); 00071 00075 virtual FeedStorage* archiveFor(const TQString &url); 00076 virtual bool autoCommit() const; 00077 virtual int unreadFor(const TQString &url); 00078 virtual void setUnreadFor(const TQString &url, int unread); 00079 virtual int totalCountFor(const TQString &url); 00080 virtual void setTotalCountFor(const TQString &url, int total); 00081 virtual int lastFetchFor(const TQString& url); 00082 virtual void setLastFetchFor(const TQString& url, int lastFetch); 00083 virtual TQStringList feeds() const; 00084 00085 virtual void storeFeedList(const TQString& opmlStr); 00086 virtual TQString restoreFeedList() const; 00087 00088 virtual void storeTagSet(const TQString& xmlStr); 00089 virtual TQString restoreTagSet() const; 00090 00094 virtual void add(Storage* source); 00095 00097 virtual void clear(); 00098 00099 protected slots: 00100 virtual void slotCommit(); 00101 00102 private: 00103 class StorageDummyImplPrivate; 00104 StorageDummyImplPrivate *d; 00105 }; 00106 00107 } 00108 } 00109 00110 #endif // STORAGEDummyIMPL_H