-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgooglereadercontroller.h
83 lines (74 loc) · 2.33 KB
/
googlereadercontroller.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef GOOGLEREADERCONTROLLER_H
#define GOOGLEREADERCONTROLLER_H
#include <QObject>
#include "database.h"
#include "googleReader.h"
class GoogleReaderController : public QObject
{
Q_OBJECT
public:
GoogleReaderController();
int getUnreadCountInLabel(QString);
int getUnreadCountInFeed(QString);
void markLabelAsRead(QString);
void markFeedAsRead(QString);
void markEntryAsRead(QString);
void markAllAsRead();
void addFeedLabel(QString,QString);
void removeFeedLabel(QString, QString);
void addFeed(QString, QString, QString);
void removeFeed(QString);
QList<QString> getLabelsList();
Feed* getFeedDB(QString);
QList<Feed*> getFeedsDB();
QList<Feed*> getFeedsInLabelDB(QString);
QString getIdForFeed(QString);
QString getEntryLink(QString);
Entry* getEntry(QString);
QString getFeedIdForEntry(QString);
void login(QString, QString);
void login();
void getFeeds();
void getUnreadFeeds();
void checkIfFetchEntries();
void getEntries();
void getSpecifiedNumberOfEntriesFromFeed(QString, int);
int getTotalUnreadCount();
private:
Database* _database;
GoogleReader* _googleReader;
bool _firstRun;
bool _alreadyFetchingNoEntries;
bool _fetchingEntriesFromHistory;
int _feedsWithNoEntriesCount;
signals:
void signalConnected(bool);
void signalLoginStatus(bool);
void signalStatusLogin(bool);
void signalStatusGetFeeds(bool);
void signalStatusGetEntries(bool);
void signalStatusGetUnreadFeeds(bool);
void signalStatusMarkFeedAsRead(bool);
void signalStatusMarkEntryAsRead(bool);
void signalStatusAddFeedLabel(bool);
void signalStatusRemoveFeedLabel(bool);
void signalStatusAddFeed(bool);
void signalStatusRemoveFeed(bool);
private slots:
void rawGetFeeds(QByteArray);
void rawGetUnreadFeeds(QByteArray);
void rawGetEntries(QByteArray);
void fetchFeedsWithNoEntries();
void statusLogin(bool);
// void statusGetFeeds(bool);
// void statusGetEntries(bool);
// void statusGetUnreadFeeds(bool);
void statusMarkFeedAsRead(bool);
void statusMarkEntryAsRead(bool);
void statusAddFeedLabel(bool);
void statusRemoveFeedLabel(bool);
void statusAddFeed(bool);
void statusRemoveFeed(bool);
void statusConnected(bool);
};
#endif // GOOGLEREADERCONTROLLER_H