X-Git-Url: http://git.maemo.org/git/?p=googlelatitude;a=blobdiff_plain;f=googlelatitude.h;fp=googlelatitude.h;h=1f99a24a5ca4ed83d1e1d0e71ae541406fbc3d32;hp=0000000000000000000000000000000000000000;hb=05be3d4e9145560968c3afc78c1fcca644cc7a9e;hpb=acfccb1f63dd621809581c09b3f9690e3b2e50f2 diff --git a/googlelatitude.h b/googlelatitude.h new file mode 100644 index 0000000..1f99a24 --- /dev/null +++ b/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