Wyatt Riley | ad03ab2 | 2016-12-14 14:54:29 -0800 | [diff] [blame^] | 1 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H |
| 2 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H |
| 3 | |
| 4 | #include <android/hardware/gnss/1.0/IGnssBatching.h> |
| 5 | #include <hardware/fused_location.h> |
| 6 | #include <hidl/MQDescriptor.h> |
| 7 | #include <hidl/Status.h> |
| 8 | |
| 9 | |
| 10 | namespace android { |
| 11 | namespace hardware { |
| 12 | namespace gnss { |
| 13 | namespace V1_0 { |
| 14 | namespace implementation { |
| 15 | |
| 16 | using ::android::hardware::gnss::V1_0::IGnssBatching; |
| 17 | using ::android::hardware::gnss::V1_0::IGnssBatchingCallback; |
| 18 | using ::android::hidl::base::V1_0::IBase; |
| 19 | using ::android::hardware::hidl_array; |
| 20 | using ::android::hardware::hidl_memory; |
| 21 | using ::android::hardware::hidl_string; |
| 22 | using ::android::hardware::hidl_vec; |
| 23 | using ::android::hardware::Return; |
| 24 | using ::android::hardware::Void; |
| 25 | using ::android::sp; |
| 26 | |
| 27 | struct GnssBatching : public IGnssBatching { |
| 28 | GnssBatching(const FlpLocationInterface* flpLocationIface); |
| 29 | |
| 30 | // Methods from ::android::hardware::gnss::V1_0::IGnssBatching follow. |
| 31 | Return<bool> init(const sp<IGnssBatchingCallback>& callback) override; |
| 32 | Return<uint16_t> getBatchSize() override; |
| 33 | Return<bool> start(const IGnssBatching::Options& options ) override; |
| 34 | Return<void> flush() override; |
| 35 | Return<bool> stop() override; |
| 36 | Return<void> cleanup() override; |
| 37 | |
| 38 | private: |
| 39 | const FlpLocationInterface* mFlpLocationIface = nullptr; |
| 40 | }; |
| 41 | |
| 42 | extern "C" IGnssBatching* HIDL_FETCH_IGnssBatching(const char* name); |
| 43 | |
| 44 | } // namespace implementation |
| 45 | } // namespace V1_0 |
| 46 | } // namespace gnss |
| 47 | } // namespace hardware |
| 48 | } // namespace android |
| 49 | |
| 50 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H |