First Commit 0.1 debianized
[googlelatitude] / src / googlelatitude.h
1 #ifndef GOOGLELATITUDE_H
2 #define GOOGLELATITUDE_H
3
4 #include <QObject>
5 #include <QNetworkAccessManager>
6 #include <QNetworkRequest>
7 #include <QNetworkReply>
8 #include <QRegExp>
9 #include <QStringList>
10 #include <QDebug>
11
12 class GoogleLatitude : public QObject {
13     Q_OBJECT
14
15 signals:
16     void setOK();
17     void setERROR();
18     void getOK();
19
20 public slots:
21     void get();    
22
23 public:
24     GoogleLatitude();
25     void login(QString username, QString password);
26     void set(double latitude, double longitude, double accuracy=1000.);
27     double get_lat() { return latitude; }
28     double get_lon() { return longitude; }
29     double get_acc() { return accuracy; }
30
31 private slots:
32     void finishedreply(QNetworkReply *r);
33
34 private:
35     // info
36     QString user;
37     QString pass;
38     double latitude;
39     double longitude;
40     double accuracy;
41     // stuff
42     QNetworkAccessManager *worker;
43     QUrl urllogin;
44     QUrl urldologin;
45     QUrl urlupdate;
46     QUrl urlloc;
47 };
48
49 #endif // GOOGLELATITUDE_H