changes for formeego, do not use
[googlelatitude] / liblatitudeupdater / 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     void setDaemonMode(bool status);
25     bool getDaemonMode();
26
27 private slots:
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"; }
36
37 signals:
38     void notToken();
39     void gotToken();
40     void needAuth();
41
42 private:
43     QSettings OauthSettings;
44     QUrl OAuthGetRequestToken;
45     QUrl OAuthAuthorizeToken;
46     QUrl OAuthGetAccessToken;
47     QUrl CurrentLocation;
48     QUrl UserAuthorization;
49     KQOAuthParameters GoogleOauthAdditional;
50     QString ConsumerKey;
51     QString ConsumerSecretKey;
52     double CurrentLatitude;
53     double CurrentLongitude;
54     double CurrentAccuracy;
55     KQOAuthManager *OauthManager;
56     KQOAuthRequest *OauthRequest;
57 };
58
59 #endif // GOOGLELATITUDE_H