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