GeolocationControllerClientBlackBerry.h [plain text]
#ifndef GeolocationControllerClientBlackBerry_h
#define GeolocationControllerClientBlackBerry_h
#include <BlackBerryPlatformGeoTracker.h>
#include <BlackBerryPlatformGeoTrackerListener.h>
#include <GeolocationClient.h>
#include <RefPtr.h>
namespace BlackBerry {
namespace WebKit {
class WebPagePrivate;
}
}
namespace WebCore {
class GeolocationControllerClientBlackBerry : public GeolocationClient, public BlackBerry::Platform::GeoTrackerListener {
public:
GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
virtual void geolocationDestroyed();
virtual void startUpdating();
virtual void stopUpdating();
virtual GeolocationPosition* lastPosition();
virtual void setEnableHighAccuracy(bool);
virtual void requestPermission(Geolocation*);
virtual void cancelPermissionRequest(Geolocation*);
virtual void onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid, double altitudeAccuracy,
bool altitudeAccuracyValid, double speed, bool speedValid, double heading, bool headingValid);
virtual void onLocationError(const char* error);
virtual void onPermission(void* context, bool isAllowed);
BlackBerry::Platform::GeoTracker* tracker() const { return m_tracker; }
private:
BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
BlackBerry::Platform::GeoTracker* m_tracker;
RefPtr<GeolocationPosition> m_lastPosition;
bool m_accuracy;
};
}
#endif // GeolocationControllerClientBlackBerry_h