/
facebrick.h
58 lines (49 loc) · 1.64 KB
/
facebrick.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
/*
* Copyright (C) 2010 Robin Burchell <robin.burchell@collabora.co.uk>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FACEBRICK_H
#define FACEBRICK_H
#include <QObject>
class QNetworkAccessManager;
class FBSession;
class FBError;
class GetConnection;
class QFacebook;
class FaceBrick : public QObject
{
Q_OBJECT
public:
static FaceBrick *instance(QString client_id, QString client_secret);
static FaceBrick *instance();
void setToken(QString token);
QString getToken();
QString *getClientId();
void createConnection();
QNetworkAccessManager *networkManager() const;
GetConnection *m_connection;
QFacebook *m_facebook;
QString *m_clientId;
QString *m_clientSecret;
QString m_token;
private slots:
void unableToGetStreamRead();
void errorRequestingPermission(const FBError &error);
private:
FaceBrick(QString client_id, QString client_secret);
QNetworkAccessManager * const m_networkAccessManager;
//FBSession * const m_session;
};
#endif // FACEBRICK_H