diff options
Diffstat (limited to 'WebCore/platform/gtk/GeolocationServiceGtk.h')
-rw-r--r-- | WebCore/platform/gtk/GeolocationServiceGtk.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/WebCore/platform/gtk/GeolocationServiceGtk.h b/WebCore/platform/gtk/GeolocationServiceGtk.h index 02aff2d..90699ad 100644 --- a/WebCore/platform/gtk/GeolocationServiceGtk.h +++ b/WebCore/platform/gtk/GeolocationServiceGtk.h @@ -21,11 +21,18 @@ #define GeolocationServiceGtk_h #include "GeolocationService.h" +#include "Geoposition.h" +#include "PositionError.h" +#include "RefPtr.h" + +#include <geoclue/geoclue-master.h> +#include <geoclue/geoclue-position.h> namespace WebCore { class GeolocationServiceGtk : public GeolocationService { public: GeolocationServiceGtk(GeolocationServiceClient*); + ~GeolocationServiceGtk(); virtual bool startUpdating(PositionOptions*); virtual void stopUpdating(); @@ -35,6 +42,29 @@ namespace WebCore { Geoposition* lastPosition() const; PositionError* lastError() const; + + private: + void updateLocationInformation(); + void setError(PositionError::ErrorCode, const char* message); + void updatePosition(); + + static void position_changed(GeocluePosition*, GeocluePositionFields, int, double, double, double, GeoclueAccuracy*, GeolocationServiceGtk*); + + private: + RefPtr<Geoposition> m_lastPosition; + RefPtr<PositionError> m_lastError; + + // state objects + GeoclueMasterClient* m_geoclueClient; + GeocluePosition* m_geocluePosition; + + // Error and Position state + double m_latitude; + double m_longitude; + double m_altitude; + double m_accuracy; + double m_altitudeAccuracy; + int m_timestamp; }; } |