-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoogleReader.h
78 lines (66 loc) · 2.25 KB
/
googleReader.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
#ifndef FEEDNETWORKING_H
#define FEEDNETWORKING_H
#include "feed.h"
#include <QObject>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QDebug>
#include <QTimer>
class GoogleReader : public QObject {
Q_OBJECT
public:
GoogleReader();
void getFeeds();
void getUnreadFeeds();
void getEntries();
void getNumberOfEntriesFromFeed(QString, int);
void addFeed(QString, QString, QString);
void removeFeed(QString);
void markEntryAsRead(QString);
void addFeedLabel(QString, QString);
void removeFeedLabel(QString, QString);
void getToken();
void markFeedAsRead(QString);
void login();
void login(QString, QString);
private:
QTimer* _timerRefreshSessionID;
QNetworkCookie* _googleCookie;
QString _username;
QString _password;
QString _sessionID;
QString _googleToken;
bool _refreshingSID;
void setCookie();
void makeLogin();
signals:
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);
void signalConnected(bool);
void shareRawFeeds(QByteArray);
void shareRawUnreadFeeds(QByteArray);
void shareRawEntries(QByteArray);
private slots:
void parseToken(QNetworkReply*);
void parseSessionID(QNetworkReply*);
void parseFeeds(QNetworkReply*);
void parseUnreadFeeds(QNetworkReply*);
void parseEntries(QNetworkReply*);
void parseRespondeMarkFeedAsRead(QNetworkReply*);
void parseMarkEntryAsRead(QNetworkReply*);
void parseAddFeedLabel(QNetworkReply*);
void parseRemoveFeedLabel(QNetworkReply*);
void parseAddFeed(QNetworkReply*);
void parseRemoveFeed(QNetworkReply*);
void refreshSID();
};
#endif // FEEDNETWORKING_H