summaryrefslogtreecommitdiff
path: root/android/location_api/MeasurementAPIClient.h
diff options
context:
space:
mode:
authorBaili Feng <bailif@codeaurora.org>2018-01-08 16:21:29 +0800
committerBaili Feng <bailif@codeaurora.org>2018-04-10 08:24:34 +0800
commitd856a9414d745634c9dff7650a4d3dc48b8563f0 (patch)
tree5a596bcff98c58d78025c40170f6bddb7888c0f7 /android/location_api/MeasurementAPIClient.h
parentab95d2dc2e128793d6616f65916e40d25a82cedd (diff)
downloadgps-d856a9414d745634c9dff7650a4d3dc48b8563f0.tar.gz
hidl gnss hal 1.1 implementation
Implement new apis for IGnss 1.1 Change-Id: I2c98c32355f6d9681d51b709697e49ec735fe1cf CRs-fixed: 2133458
Diffstat (limited to 'android/location_api/MeasurementAPIClient.h')
-rw-r--r--android/location_api/MeasurementAPIClient.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/android/location_api/MeasurementAPIClient.h b/android/location_api/MeasurementAPIClient.h
index 8de1326..117ad54 100644
--- a/android/location_api/MeasurementAPIClient.h
+++ b/android/location_api/MeasurementAPIClient.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -31,18 +31,17 @@
#define MEASUREMENT_API_CLINET_H
#include <mutex>
-#include <android/hardware/gnss/1.0/IGnssMeasurement.h>
-#include <android/hardware/gnss/1.0/IGnssMeasurementCallback.h>
+#include <android/hardware/gnss/1.1/IGnssMeasurement.h>
+#include <android/hardware/gnss/1.1/IGnssMeasurementCallback.h>
#include <LocationAPIClientBase.h>
#include <hidl/Status.h>
namespace android {
namespace hardware {
namespace gnss {
-namespace V1_0 {
+namespace V1_1 {
namespace implementation {
-using ::android::hardware::gnss::V1_0::IGnssMeasurement;
using ::android::sp;
class MeasurementAPIClient : public LocationAPIClientBase
@@ -54,21 +53,26 @@ public:
MeasurementAPIClient& operator=(const MeasurementAPIClient&) = delete;
// for GpsMeasurementInterface
- Return<IGnssMeasurement::GnssMeasurementStatus> measurementSetCallback(
+ Return<V1_0::IGnssMeasurement::GnssMeasurementStatus> measurementSetCallback(
+ const sp<V1_0::IGnssMeasurementCallback>& callback);
+ Return<V1_0::IGnssMeasurement::GnssMeasurementStatus> measurementSetCallback_1_1(
const sp<IGnssMeasurementCallback>& callback);
void measurementClose();
+ Return<IGnssMeasurement::GnssMeasurementStatus> startTracking();
// callbacks we are interested in
void onGnssMeasurementsCb(GnssMeasurementsNotification gnssMeasurementsNotification) final;
private:
- sp<IGnssMeasurementCallback> mGnssMeasurementCbIface;
std::mutex mMutex;
+ sp<V1_0::IGnssMeasurementCallback> mGnssMeasurementCbIface;
+ sp<IGnssMeasurementCallback> mGnssMeasurementCbIface_1_1;
+
bool mTracking;
};
} // namespace implementation
-} // namespace V1_0
+} // namespace V1_1
} // namespace gnss
} // namespace hardware
} // namespace android