25 #ifndef AKREGATOR_BACKEND_STORAGE_H
26 #define AKREGATOR_BACKEND_STORAGE_H
30 #include "akregator_export.h"
44 class AKREGATOR_EXPORT
Storage :
public TQObject
49 static void setInstance(
Storage* instance);
61 virtual bool open(
bool autoCommit =
false) = 0;
84 virtual FeedStorage*
archiveFor(
const TQString &url) = 0;
85 virtual bool autoCommit()
const = 0;
86 virtual int unreadFor(
const TQString &url) = 0;
87 virtual void setUnreadFor(
const TQString &url,
int unread) = 0;
88 virtual int totalCountFor(
const TQString &url) = 0;
89 virtual void setTotalCountFor(
const TQString &url,
int total) = 0;
90 virtual int lastFetchFor(
const TQString& url) = 0;
91 virtual void setLastFetchFor(
const TQString& url,
int lastFetch) = 0;
98 virtual TQString restoreFeedList()
const = 0;
100 virtual void storeTagSet(
const TQString& xmlStr) = 0;
101 virtual TQString restoreTagSet()
const = 0;
105 virtual TQStringList
feeds()
const = 0;
Storage is the main interface to the article archive.
virtual void add(Storage *source)=0
adds all feed storages from a source to this storage existing articles are replaced
virtual bool rollback()=0
Rollback changes made in feeds and articles, reverting to last committed values.
virtual bool commit()=0
Commit changes made in feeds and articles, making them persistent.
virtual void initialize(const TQStringList ¶ms)=0
initializes the storage object with given parameters
virtual void clear()=0
deletes all feed storages in this archive
virtual bool close()=0
Closes storage, freeing all allocated resources.
virtual bool open(bool autoCommit=false)=0
Open storage and prepare it for work.
virtual void storeFeedList(const TQString &opmlStr)=0
stores the feed list in the storage backend.
virtual FeedStorage * archiveFor(const TQString &url)=0
virtual TQStringList feeds() const =0
returns a list of all feeds (URLs) stored in this archive