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>
13class OrgFreedesktopGeoClue2ClientInterface;
44 void setError(QGeoPositionInfoSource::Error error);
45 void restoreLastPosition();
46 void saveLastPosition();
48 bool configureClient();
51 void requestUpdateTimeout();
52 void handleNewLocation(
const QDBusObjectPath &oldLocation,
53 const QDBusObjectPath &newLocation);
54 void parseParameters(
const QVariantMap ¶meters);
56 QTimer *m_requestTimer =
nullptr;
57 QtPositioningPrivate::OrgFreedesktopGeoClue2ManagerInterface m_manager;
58 QPointer<QtPositioningPrivate::OrgFreedesktopGeoClue2ClientInterface> m_client;
59 bool m_running =
false;
60 bool m_lastPositionFromSatellite =
false;
61 QGeoPositionInfoSource::Error m_error =
NoError;
62 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