diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-12-24 21:34:23 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-24 15:54:28 -0800 |
commit | ee5d93e155ec58c82cb0f1225dc2f5b34f9e78ce (patch) | |
tree | cd69ebd7fa999ab7ae06d002543b38939cb8f9de /qt-ui/socialnetworks.h | |
parent | c8c17dc01ec66f8bc5641dbe93768aa8f4a9b364 (diff) | |
download | subsurface-ee5d93e155ec58c82cb0f1225dc2f5b34f9e78ce.tar.gz |
Changed Facebook stuff to socialnetworks.h/cpp
All Facebook related stuff now is on SocialNetworks.h/cpp
this makes it much easier to implement things and looking
for bugs.
working:
- logging in
- getting user id
- getting album id ( or creating it )
*much* more testing is needed, of course.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/socialnetworks.h')
-rw-r--r-- | qt-ui/socialnetworks.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/qt-ui/socialnetworks.h b/qt-ui/socialnetworks.h new file mode 100644 index 000000000..ed7804afa --- /dev/null +++ b/qt-ui/socialnetworks.h @@ -0,0 +1,31 @@ +#ifndef FACEBOOKMANAGER_H +#define FACEBOOKMANAGER_H + +#include <QObject> +#include <QUrl> + +class FacebookManager : public QObject +{ + Q_OBJECT +public: + static FacebookManager *instance(); + void requestAlbumId(); + void requestUserId(); + void sync(); + QUrl connectUrl(); + bool loggedIn(); +signals: + void justLoggedIn(); + void justLoggedOut(); + +public slots: + void tryLogin(const QUrl& loginResponse); + void logout(); + void setDesiredAlbumName(const QString& albumName); + +private: + explicit FacebookManager(QObject *parent = 0); + QString albumName; +}; + +#endif // FACEBOOKMANAGER_H |