/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef GonkGPSGeolocationProvider_h #define GonkGPSGeolocationProvider_h #include // for GpsInterface #include "nsIGeolocationProvider.h" class GonkGPSGeolocationProvider : public nsIGeolocationProvider { public: NS_DECL_ISUPPORTS NS_DECL_NSIGEOLOCATIONPROVIDER static already_AddRefed GetSingleton(); already_AddRefed GetLocationCallback(); private: /* Client should use GetSingleton() to get the provider instance. */ GonkGPSGeolocationProvider(); GonkGPSGeolocationProvider(const GonkGPSGeolocationProvider &); GonkGPSGeolocationProvider & operator = (const GonkGPSGeolocationProvider &); ~GonkGPSGeolocationProvider(); const GpsInterface* GetGPSInterface(); static GonkGPSGeolocationProvider* sSingleton; bool mStarted; const GpsInterface* mGpsInterface; nsCOMPtr mLocationCallback; }; #endif /* GonkGPSGeolocationProvider_h */