minor bugfix
[googlelatitude] / src / gps.h
1 #ifndef GPS_H
2 #define GPS_H
3
4 #include <QObject>
5
6 #ifdef Q_WS_MAEMO_5
7
8 extern "C" {
9 #include <location/location-gps-device.h>
10 #include <location/location-gpsd-control.h>
11 }
12
13 class GpsMaemo5 : public QObject {
14     Q_OBJECT
15
16 signals:
17     void getOK();
18     void getOK_acwp();
19     void getOK_agnss();
20
21 public slots:
22     void get_acwp();
23     void get_agnss();
24
25 public:
26     GpsMaemo5(QObject *parent = 0);
27     double get_lat() { return latitude; }
28     double get_lon() { return longitude; }
29     double get_acc() { return accuracy; }
30     void stop();
31     void restart();
32     friend void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps);
33
34 private:
35     double latitude;
36     double longitude;
37     double accuracy;
38
39     int usegps;
40
41     GMainLoop *loop;
42     LocationGPSDControl *control;
43     LocationGPSDevice *device;
44
45 };
46
47 void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps);
48
49 #endif
50 #endif // GPS_H