summaryrefslogtreecommitdiff
path: root/android/location_api/GnssAPIClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'android/location_api/GnssAPIClient.h')
-rw-r--r--android/location_api/GnssAPIClient.h32
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