X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=liblatitudeupdater%2Fgooglelatitude.h;fp=liblatitudeupdater%2Fgooglelatitude.h;h=1f99a24a5ca4ed83d1e1d0e71ae541406fbc3d32;hb=b58ae22b7840fd1c5675fcc01971c9181c2e9b29;hp=0000000000000000000000000000000000000000;hpb=b63a62fbf2b7b3b13dda5898a7ff075ecbda6693;p=googlelatitude diff --git a/liblatitudeupdater/googlelatitude.h b/liblatitudeupdater/googlelatitude.h new file mode 100644 index 0000000..1f99a24 --- /dev/null +++ b/liblatitudeupdater/googlelatitude.h @@ -0,0 +1,57 @@ +#ifndef GOOGLELATITUDE_H +#define GOOGLELATITUDE_H + +#include +#include +#include +#include + +class GoogleLatitude : public QObject { + Q_OBJECT + +public: + GoogleLatitude(QObject *parent = 0); + ~GoogleLatitude(); + +public slots: + void getAccess(); + void getCurrentLocation(); + void sendCurrentLocation(); + void setCurrentLocation(double la, double lo, double ac); + QUrl getUserAuthorization(); + void setAutoConnect(bool status); + bool getAutoConnect(); + +private slots: + void onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret); + void onAuthorizationReceived(QString token, QString verifier); + void onAccessTokenReceived(QString token, QString tokenSecret); + void onRequestReady(QByteArray response); + void onAuthorizedRequestDone() { qDebug() << "* GoogleLatitude::onAuthorizedRequestDone"; } + void onNotToken() { qDebug() << "* GoogleLatitude::onNotToken"; } + void onGotToken() { qDebug() << "* GoogleLatitude::onGotToken"; } + void onNeedAuth() { qDebug() << "* GoogleLatitude::onNeedAuth"; } + +signals: + void notToken(); + void gotToken(); + void needAuth(); + +private: + QSettings OauthSettings; + QUrl OAuthGetRequestToken; + QUrl OAuthAuthorizeToken; + QUrl OAuthGetAccessToken; + QUrl CurrentLocation; + QUrl UserAuthorization; + KQOAuthParameters GoogleOauthAdditional; + QString ConsumerKey; + QString ConsumerSecretKey; + double CurrentLatitude; + double CurrentLongitude; + double CurrentAccuracy; + KQOAuthManager *OauthManager; + KQOAuthRequest *OauthRequest; +}; + +#endif // GOOGLELATITUDE_H