24 #ifndef AKREGATOR_BACKEND_FEEDSTORAGE_H
25 #define AKREGATOR_BACKEND_FEEDSTORAGE_H
30 #include "akregator_export.h"
51 return term == other.term && scheme == other.scheme;
54 bool operator!=( const Category& other) const
56 return !operator==(other);
61 return other.scheme < other.scheme || (other.scheme == other.scheme && term < other.term);
67 class AKREGATOR_EXPORT FeedStorage : public TQObject
71 virtual int unread() = 0;
72 virtual void setUnread( int unread) = 0;
73 virtual int totalCount() = 0;
74 virtual int lastFetch() = 0;
75 virtual void setLastFetch( int lastFetch) = 0;
78 virtual TQStringList articles( const TQString& tagID=TQString()) = 0;
81 virtual TQStringList articles( const Category& cat) = 0;
86 virtual void add(FeedStorage* source) = 0;
89 virtual void copyArticle( const TQString& guid, FeedStorage* source) = 0;
92 virtual void clear() = 0;
95 virtual bool contains( const TQString& guid) = 0;
96 virtual void addEntry( const TQString& guid) = 0;
97 virtual void deleteArticle( const TQString& guid) = 0;
98 virtual int comments( const TQString& guid) = 0;
99 virtual TQString commentsLink( const TQString& guid) = 0;
100 virtual void setCommentsLink( const TQString& guid, const TQString& commentsLink) = 0;
101 virtual void setComments( const TQString& guid, int comments) = 0;
102 virtual bool guidIsHash( const TQString& guid) = 0;
103 virtual void setGuidIsHash( const TQString& guid, bool isHash) = 0;
104 virtual bool guidIsPermaLink( const TQString& guid) = 0;
105 virtual void setGuidIsPermaLink( const TQString& guid, bool isPermaLink) = 0;
106 virtual uint hash( const TQString& guid) = 0;
107 virtual void setHash( const TQString& guid, uint hash) = 0;
108 virtual void setDeleted( const TQString& guid) = 0;
109 virtual TQString link( const TQString& guid) = 0;
110 virtual void setLink( const TQString& guid, const TQString& link) = 0;
111 virtual uint pubDate( const TQString& guid) = 0;
112 virtual void setPubDate( const TQString& guid, uint pubdate) = 0;
113 virtual int status( const TQString& guid) = 0;
114 virtual void setStatus( const TQString& guid, int status) = 0;
115 virtual TQString title( const TQString& guid) = 0;
116 virtual void setTitle( const TQString& guid, const TQString& title) = 0;
117 virtual TQString description( const TQString& guid) = 0;
118 virtual void setDescription( const TQString& guid, const TQString& description) = 0;
120 virtual void addTag( const TQString& guid, const TQString& tag) = 0;
121 virtual void removeTag( const TQString& guid, const TQString& tag) = 0;
124 virtual TQStringList tags( const TQString& guid=TQString()) = 0;
126 virtual void addCategory( const TQString& guid, const Category& category) = 0;
127 virtual TQValueList<Category> categories( const TQString& guid=TQString()) = 0;
129 virtual void setEnclosure( const TQString& guid, const TQString& url, const TQString& type, int length) = 0;
130 virtual void removeEnclosure( const TQString& guid) = 0;
132 virtual void setAuthor( const TQString& , const TQString& ) {}
133 virtual TQString author( const TQString& ) { return TQString(); }
135 virtual void enclosure( const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length) = 0;
136 virtual void close() = 0;
137 virtual void commit() = 0;
138 virtual void rollback() = 0;
140 virtual void convertOldArchive() = 0;
a convenience class to handle categories in the backend
bool operator==(const Category &other) const two categories are equal when scheme and term are equal, name is ignored
bool operator<(const Category &other) const we need this for TQMaps
|