- connect(worker, SIGNAL(finished(QNetworkReply *)), this, SLOT(finishedreply(QNetworkReply *)));
- gloc();
+ connect(worker, SIGNAL(finished(QNetworkReply *)), this, SLOT(gloc_reply(QNetworkReply *)));
+#endif // Q_WS_MAEMO_5
+}
+
+void GpsMaemo5::refresh() {
+ if ( stopgps ) return;
+ qDebug() << "GpsMaemo5: refresh";
+
+ QTimer::singleShot(interval*1000, this, SLOT(refresh()));
+ QTimer::singleShot(wait*1000, this, SLOT(stop()));
+
+#ifdef Q_WS_MAEMO_5
+ g_object_set(G_OBJECT(control), "preferred-method", LOCATION_METHOD_ACWP, NULL);
+ if (usegps) {
+ g_object_set(G_OBJECT(control), "preferred-method", LOCATION_METHOD_AGNSS, NULL);
+ }
+ location_gpsd_control_start(control);
+#else
+ worker->post(QNetworkRequest(urlloc), QByteArray("{version:\"1.1.0\"}"));