#ifndef GPS_H
#define GPS_H
+#ifdef Q_WS_MAEMO_5
+
extern "C" {
#include <location/location-gps-device.h>
#include <location/location-gpsd-control.h>
void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps);
+#else
+#include "gpsfake.h"
+#endif
+
#endif // GPS_H
--- /dev/null
+#ifndef GPSFAKE_H
+#define GPSFAKE_H
+
+#include <QObject>
+
+class GpsMaemo5 : public QObject {
+ Q_OBJECT
+
+signals:
+ void getOK();
+ void getOK_acwp();
+ void getOK_agnss();
+
+public slots:
+ void get_acwp() { emit getOK_acwp(); }
+ void get_agnss() { emit getOK_agnss(); }
+
+public:
+ GpsMaemo5(QObject *parent = 0) : QObject(parent) {
+ latitude=0;
+ longitude=0;
+ accuracy=0;
+ }
+ double get_lat() { return latitude; }
+ double get_lon() { return longitude; }
+ double get_acc() { return accuracy; }
+ void stop() {}
+ void restart() {}
+
+private:
+ double latitude;
+ double longitude;
+ double accuracy;
+};
+
+#endif // GPSFAKE_H