4#ifndef QGEOPOSITIONINFOSOURCE_GEOCLUE2_P_H
5#define QGEOPOSITIONINFOSOURCE_GEOCLUE2_P_H
7#include <QtPositioning/QGeoPositionInfoSource>
8#include <QtCore/QPointer>
9#include <manager_interface.h>
11class OrgFreedesktopGeoClue2ClientInterface;
40 void setError(QGeoPositionInfoSource::Error error);
41 void restoreLastPosition();
42 void saveLastPosition();
44 bool configureClient();
47 void requestUpdateTimeout();
48 void handleNewLocation(
const QDBusObjectPath &oldLocation,
49 const QDBusObjectPath &newLocation);
50 void parseParameters(
const QVariantMap ¶meters);
52 QTimer *m_requestTimer =
nullptr;
53 OrgFreedesktopGeoClue2ManagerInterface m_manager;
54 QPointer<OrgFreedesktopGeoClue2ClientInterface> m_client;
55 bool m_running =
false;
56 bool m_lastPositionFromSatellite =
false;
57 QGeoPositionInfoSource::Error m_error =
NoError;
58 QGeoPositionInfo m_lastPosition;
void startUpdates() override
Starts emitting updates at regular intervals as specified by setUpdateInterval().
~QGeoPositionInfoSourceGeoclue2()
PositioningMethods supportedPositioningMethods() const override
Returns the positioning methods available to this source.
Error error() const override
Returns the type of error that last occurred.
void requestUpdate(int timeout=5000) override
Attempts to get the current position and emit positionUpdated() with this information.
QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly=false) const override
Returns an update containing the last known position, or a null update if none is available.
void stopUpdates() override
Stops emitting updates at regular intervals.
int minimumUpdateInterval() const override
void setPreferredPositioningMethods(PositioningMethods methods) override
void setUpdateInterval(int msec) override