-
[hikingdiary] / src / maemo5locationprivate.h
1 #ifndef MAEMO5LOCATIONPRIVATE_H
2 #define MAEMO5LOCATIONPRIVATE_H
3
4 //We have to declare these header file inside extern, since these modules are actually c modules not c++
5 extern "C"
6 {
7 #include <location-gps-device.h>
8 #include <location-gpsd-control.h>
9 }
10
11 #include <QObject>
12 #include "maemo5location.h"
13
14 class Maemo5LocationPrivate : public QObject
15 {
16     Q_OBJECT
17     public:
18         Maemo5LocationPrivate(Maemo5Location* location);
19         ~Maemo5LocationPrivate();
20         void get_acwp();
21         void get_agnss();
22         friend void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
23         friend void gps_data_connected(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
24         double get_lat() { return latitude; }
25         double get_lon() { return longitude; }
26     signals:
27         void awcp();
28         void agnss();
29         void locationUpdated();
30         void connected();
31     private:
32         void stop();
33         void restart();
34     //private data
35     private:
36         double latitude;
37         double longitude;
38
39         Maemo5Location* d_ptr;
40         GMainLoop *loop;
41         int usegps;
42         LocationGPSDControl *control;
43         LocationGPSDevice *device;
44 };
45
46 void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
47 void gps_data_connected(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
48 #endif // MAEMO5LOCATIONPRIVATE_H