blob: ac3aa99b05a9ae9e7928cb573391ce4479fe22eb [file] [log] [blame]
Wyatt Rileyad03ab22016-12-14 14:54:29 -08001#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
10namespace android {
11namespace hardware {
12namespace gnss {
13namespace V1_0 {
14namespace implementation {
15
16using ::android::hardware::gnss::V1_0::IGnssBatching;
17using ::android::hardware::gnss::V1_0::IGnssBatchingCallback;
18using ::android::hidl::base::V1_0::IBase;
19using ::android::hardware::hidl_array;
20using ::android::hardware::hidl_memory;
21using ::android::hardware::hidl_string;
22using ::android::hardware::hidl_vec;
23using ::android::hardware::Return;
24using ::android::hardware::Void;
25using ::android::sp;
26
27struct 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
42extern "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