Fix for scratchbox
[googlelatitude] / googlelatitude.h
1 #ifndef GOOGLELATITUDE_H
2 #define GOOGLELATITUDE_H
3
4 #include <QtCore/QObject>
5 #include <QtCore/QSettings>
6 #include <QtCore/QtDebug>
7 #include <QtKOAuth>
8
9 class GoogleLatitude : public QObject {
10     Q_OBJECT
11
12 public:
13     GoogleLatitude(QObject *parent = 0);
14     ~GoogleLatitude();
15
16 public slots:
17     void getAccess();
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
25 private slots:
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"; }
34
35 signals:
36     void notToken();
37     void gotToken();
38     void needAuth();
39
40 private:
41     QSettings OauthSettings;
42     QUrl OAuthGetRequestToken;
43     QUrl OAuthAuthorizeToken;
44     QUrl OAuthGetAccessToken;
45     QUrl CurrentLocation;
46     QUrl UserAuthorization;
47     KQOAuthParameters GoogleOauthAdditional;
48     QString ConsumerKey;
49     QString ConsumerSecretKey;
50     double CurrentLatitude;
51     double CurrentLongitude;
52     double CurrentAccuracy;
53     KQOAuthManager *OauthManager;
54     KQOAuthRequest *OauthRequest;
55 };
56
57 #endif // GOOGLELATITUDE_H