diff options
author | Baili Feng <bailif@codeaurora.org> | 2018-01-08 16:21:29 +0800 |
---|---|---|
committer | Baili Feng <bailif@codeaurora.org> | 2018-04-10 08:24:34 +0800 |
commit | d856a9414d745634c9dff7650a4d3dc48b8563f0 (patch) | |
tree | 5a596bcff98c58d78025c40170f6bddb7888c0f7 /android/location_api/GnssAPIClient.h | |
parent | ab95d2dc2e128793d6616f65916e40d25a82cedd (diff) | |
download | gps-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/GnssAPIClient.h')
-rw-r--r-- | android/location_api/GnssAPIClient.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/android/location_api/GnssAPIClient.h b/android/location_api/GnssAPIClient.h index b5cffb1..1589f39 100644 --- a/android/location_api/GnssAPIClient.h +++ b/android/location_api/GnssAPIClient.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 @@ -30,16 +30,17 @@ #ifndef GNSS_API_CLINET_H #define GNSS_API_CLINET_H + #include <mutex> -#include <android/hardware/gnss/1.0/IGnss.h> -#include <android/hardware/gnss/1.0/IGnssCallback.h> +#include <android/hardware/gnss/1.1/IGnss.h> +#include <android/hardware/gnss/1.1/IGnssCallback.h> #include <android/hardware/gnss/1.0/IGnssNiCallback.h> #include <LocationAPIClientBase.h> namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::sp; @@ -47,28 +48,28 @@ using ::android::sp; class GnssAPIClient : public LocationAPIClientBase { public: - GnssAPIClient(const sp<IGnssCallback>& gpsCb, - const sp<IGnssNiCallback>& niCb); + GnssAPIClient(const sp<V1_0::IGnssCallback>& gpsCb, + const sp<V1_0::IGnssNiCallback>& niCb); virtual ~GnssAPIClient(); GnssAPIClient(const GnssAPIClient&) = delete; GnssAPIClient& operator=(const GnssAPIClient&) = delete; // for GpsInterface - void gnssUpdateCallbacks(const sp<IGnssCallback>& gpsCb, - const sp<IGnssNiCallback>& niCb); + void gnssUpdateCallbacks(const sp<V1_0::IGnssCallback>& gpsCb, + const sp<V1_0::IGnssNiCallback>& niCb); bool gnssStart(); bool gnssStop(); - bool gnssSetPositionMode(IGnss::GnssPositionMode mode, - IGnss::GnssPositionRecurrence recurrence, + bool gnssSetPositionMode(V1_0::IGnss::GnssPositionMode mode, + V1_0::IGnss::GnssPositionRecurrence recurrence, uint32_t minIntervalMs, uint32_t preferredAccuracyMeters, uint32_t preferredTimeMs); // for GpsNiInterface - void gnssNiRespond(int32_t notifId, IGnssNiCallback::GnssUserResponseType userResponse); + void gnssNiRespond(int32_t notifId, V1_0::IGnssNiCallback::GnssUserResponseType userResponse); // these apis using LocationAPIControlClient - void gnssDeleteAidingData(IGnss::GnssAidingData aidingDataFlags); + void gnssDeleteAidingData(V1_0::IGnss::GnssAidingData aidingDataFlags); void gnssEnable(LocationTechnologyType techType); void gnssDisable(); void gnssConfigurationUpdate(const GnssConfig& gnssConfig); @@ -89,17 +90,18 @@ public: void onStopTrackingCb(LocationError error) final; private: - sp<IGnssCallback> mGnssCbIface; - sp<IGnssNiCallback> mGnssNiCbIface; + sp<V1_0::IGnssCallback> mGnssCbIface; + sp<V1_0::IGnssNiCallback> mGnssNiCbIface; std::mutex mMutex; LocationAPIControlClient* mControlClient; LocationCapabilitiesMask mLocationCapabilitiesMask; bool mLocationCapabilitiesCached; + LocationOptions mLocationOptions; }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android |