1 #ifndef GOOGLELATITUDE_H
2 #define GOOGLELATITUDE_H
4 #include <QtCore/QObject>
5 #include <QtCore/QSettings>
6 #include <QtCore/QtDebug>
9 class GoogleLatitude : public QObject {
13 GoogleLatitude(QObject *parent = 0);
18 void getCurrentLocation();
19 void sendCurrentLocation();
20 void setCurrentLocation(double la, double lo, double ac);
21 QUrl getUserAuthorization();
22 void setAutoConnect(bool status);
23 bool getAutoConnect();
26 void onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret);
27 void onAuthorizationReceived(QString token, QString verifier);
28 void onAccessTokenReceived(QString token, QString tokenSecret);
29 void onRequestReady(QByteArray response);
30 void onAuthorizedRequestDone() { qDebug() << "* GoogleLatitude::onAuthorizedRequestDone"; }
31 void onNotToken() { qDebug() << "* GoogleLatitude::onNotToken"; }
32 void onGotToken() { qDebug() << "* GoogleLatitude::onGotToken"; }
33 void onNeedAuth() { qDebug() << "* GoogleLatitude::onNeedAuth"; }
41 QSettings OauthSettings;
42 QUrl OAuthGetRequestToken;
43 QUrl OAuthAuthorizeToken;
44 QUrl OAuthGetAccessToken;
46 QUrl UserAuthorization;
47 KQOAuthParameters GoogleOauthAdditional;
49 QString ConsumerSecretKey;
50 double CurrentLatitude;
51 double CurrentLongitude;
52 double CurrentAccuracy;
53 KQOAuthManager *OauthManager;
54 KQOAuthRequest *OauthRequest;
57 #endif // GOOGLELATITUDE_H