diff options
Diffstat (limited to 'android/2.0/location_api/BatchingAPIClient.h')
-rw-r--r-- | android/2.0/location_api/BatchingAPIClient.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/android/2.0/location_api/BatchingAPIClient.h b/android/2.0/location_api/BatchingAPIClient.h index 33a8c2e..7198341 100644 --- a/android/2.0/location_api/BatchingAPIClient.h +++ b/android/2.0/location_api/BatchingAPIClient.h @@ -30,8 +30,9 @@ #ifndef BATCHING_API_CLINET_H #define BATCHING_API_CLINET_H -#include <android/hardware/gnss/1.0/IGnssBatching.h> -#include <android/hardware/gnss/1.0/IGnssBatchingCallback.h> +#include <mutex> +#include <android/hardware/gnss/2.0/IGnssBatching.h> +#include <android/hardware/gnss/2.0/IGnssBatchingCallback.h> #include <pthread.h> #include <LocationAPIClientBase.h> @@ -46,6 +47,9 @@ class BatchingAPIClient : public LocationAPIClientBase { public: BatchingAPIClient(const sp<V1_0::IGnssBatchingCallback>& callback); + BatchingAPIClient(const sp<V2_0::IGnssBatchingCallback>& callback); + void gnssUpdateCallbacks(const sp<V1_0::IGnssBatchingCallback>& callback); + void gnssUpdateCallbacks_2_0(const sp<V2_0::IGnssBatchingCallback>& callback); ~BatchingAPIClient(); int getBatchSize(); int startSession(const V1_0::IGnssBatching::Options& options); @@ -61,9 +65,12 @@ public: void onBatchingCb(size_t count, Location* location, BatchingOptions batchOptions) final; private: + void setCallbacks(); + std::mutex mMutex; sp<V1_0::IGnssBatchingCallback> mGnssBatchingCbIface; uint32_t mDefaultId; LocationCapabilitiesMask mLocationCapabilitiesMask; + sp<V2_0::IGnssBatchingCallback> mGnssBatchingCbIface_2_0; }; } // namespace implementation |