-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoauth.h
34 lines (31 loc) · 880 Bytes
/
oauth.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
#ifndef OAUTH_H
#define OAUTH_H
#include <QObject>
#include <kQOAuth/kqoauthrequest.h>
#include <kQOAuth/kqoauthmanager.h>
#include <settings.h>
class OAuth : public QObject
{
Q_OBJECT
public:
explicit OAuth(QObject *parent = 0);
~OAuth();
void init();
void deinit();
static OAuth* instance();
signals:
void browserAuth(QString url);
void requestDone();
public slots:
void getAccess();
void onTemporaryTokenReceived(QString token, QString tokenSecret);
void onAuthorizationReceived(QString token, QString verifier);
void onAccessTokenReceived(QString token, QString store_url);
void onRequestReady(QByteArray response);
void onReceivedToken(QString oauth_token, QString oauth_token_secret);
private:
KQOAuthRequest* mOauthRequest;
KQOAuthManager* mOauthManager;
static OAuth* m_instance;
};
#endif // OAUTH_H