fix the maximal unstable
[googlelatitude] / src / glatitude.h
1 #ifndef GLATITUDE_H
2 #define GLATITUDE_H
3
4 #include <QtNetwork>
5
6 class GoogleLatitude : public QObject {
7     Q_OBJECT
8
9 signals:
10     void OK();
11     void ERROR();
12
13 public:
14     GoogleLatitude(QObject *parent = 0);
15     void login(QString username, QString password);
16     void set(double la, double lo, double ac=1000.);
17     void freq(int f=120);
18     void reset();
19     double get_lat() { return latitude; }
20     double get_lon() { return longitude; }
21     double get_acc() { return accuracy; }
22
23 private slots:
24     void finishedreply(QNetworkReply *r);
25
26 private:
27     // info
28     QString user;
29     QString pass;
30     double latitude;
31     double longitude;
32     double accuracy;
33     int interval;
34     // stuff
35     QNetworkAccessManager *worker;
36     QUrl urllogin;
37     QUrl urldologin;
38     QUrl urlupdate;
39     unsigned int lastupdate;
40     bool login_error;
41 };
42
43 #endif // GLATITUDE_H