new version
[googlelatitude] / src / gps.h
1 #ifndef GPS_H
2 #define GPS_H
3
4 #include <QObject>
5
6 extern "C" {
7 #include <location/location-gps-device.h>
8 #include <location/location-gpsd-control.h>
9 }
10
11 class GpsMaemo5 : public QObject {
12     Q_OBJECT
13
14 signals:
15     void fix();
16
17 public:
18     GpsMaemo5(QObject *parent = 0);
19     double get_lat() { return latitude; }
20     double get_lon() { return longitude; }
21     double get_acc() { return accuracy; }
22     friend void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps);
23
24 private:
25     double latitude;
26     double longitude;
27     double accuracy;
28
29     GMainLoop *loop;
30     LocationGPSDControl *control;
31     LocationGPSDevice *device;
32 };
33
34 void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps);
35
36 #endif // GPS_H