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();
24 void setDaemonMode(bool status);
28 void onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret);
29 void onAuthorizationReceived(QString token, QString verifier);
30 void onAccessTokenReceived(QString token, QString tokenSecret);
31 void onRequestReady(QByteArray response);
32 void onAuthorizedRequestDone() { qDebug() << "* GoogleLatitude::onAuthorizedRequestDone"; }
33 void onNotToken() { qDebug() << "* GoogleLatitude::onNotToken"; }
34 void onGotToken() { qDebug() << "* GoogleLatitude::onGotToken"; }
35 void onNeedAuth() { qDebug() << "* GoogleLatitude::onNeedAuth"; }
43 QSettings OauthSettings;
44 QUrl OAuthGetRequestToken;
45 QUrl OAuthAuthorizeToken;
46 QUrl OAuthGetAccessToken;
48 QUrl UserAuthorization;
49 KQOAuthParameters GoogleOauthAdditional;
51 QString ConsumerSecretKey;
52 double CurrentLatitude;
53 double CurrentLongitude;
54 double CurrentAccuracy;
55 KQOAuthManager *OauthManager;
56 KQOAuthRequest *OauthRequest;
59 #endif // GOOGLELATITUDE_H