2 * Maemo5LocationPrivate
4 * @author Toni Jussila <toni.jussila@fudeco.com>
5 * @copyright (c) 2010 Speed Freak team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 #ifndef MAEMO5LOCATIONPRIVATE_H
10 #define MAEMO5LOCATIONPRIVATE_H
12 //We have to declare these header file inside extern, since these modules are actually c modules not c++
15 #include <location/location-gps-device.h>
16 #include <location/location-gpsd-control.h>
17 #include <location/location-distance-utils.h>
21 #include "maemo5location.h"
23 class Maemo5LocationPrivate : public QObject
28 Maemo5LocationPrivate(Maemo5Location* location);
29 ~Maemo5LocationPrivate();
34 friend void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
35 friend void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
36 friend void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
37 friend void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPrivate *gps);
38 friend void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps);
39 friend void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps);
41 static void handleStatus( LocationGPSDeviceStatus status );
43 int get_satellites_in_view() { return satellites_in_view; }
44 int get_satellites_in_use() { return satellites_in_use; }
45 int get_signal_strength() { return signal_strength; }
46 gboolean get_gps_online() { return gps_online; }
47 double get_lat() { return latitude; }
48 double get_lon() { return longitude; }
49 double get_time() { return time; }
50 double get_ept() { return ept; }
51 double get_eph() { return eph; }
52 double get_altitude() { return altitude; }
53 double get_epv() { return epv; }
54 double get_track() { return track; }
55 double get_epd() { return epd; }
56 double get_speed() { return speed; }
57 double get_eps() { return eps; }
58 double get_climb() { return climb; }
59 double get_epc() { return epc; }
60 double distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f);
66 void locationUpdated();
68 void gps_disconnected();
78 int satellites_in_view;
79 int satellites_in_use;
96 Maemo5Location* d_ptr;
98 LocationGPSDControl *control;
99 LocationGPSDevice *device;
102 void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
103 void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
104 void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps);
105 void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPrivate *gps);
106 void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps);
107 void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps);
109 #endif // MAEMO5LOCATIONPRIVATE_H