-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.h
46 lines (35 loc) · 1.05 KB
/
database.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef DATABASE_H
#define DATABASE_H
#include <QObject>
#include "feed.h"
class Database : public QObject
{
Q_OBJECT
public:
explicit Database(QObject *parent = 0);
int getUnreadCountInLabel(QString);
int getUnreadCountInFeed(QString);
int getTotalUnreadCount() { return _numberOfNewEntries; }
void markFeedAsRead(QString);
void markEntryAsRead(QString);
void markLabelAsRead(QString);
void removeFeed(QString);
void addFeedLabel(QString, QString);
void removeFeedLabel(QString, QString);
void setNumberOfNewEntries(QString, int);
void addFeeds(QByteArray);
void addEntries(QByteArray);
void addUnreadFeeds(QByteArray);
QString getIdForFeed(QString);
QString getEntryLink(QString);
QString getFeedIdForEntry(QString);
Entry* getEntry(QString);
Feed* getFeed(QString);
QList<Feed*> getDatabase() { return _storage; }
QList<Feed*> getFeedsInLabel(QString);
QList<QString> getLabelsList();
private:
int _numberOfNewEntries;
QList<Feed*> _storage;
};
#endif // DATABASE_H