blob: 62ac5808974f0f4b064806e4ca44247cda671e7e [file] [log] [blame]
Anil Admal704bc612019-03-21 18:45:30 +00001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <android/hardware/gnss/2.0/IGnssBatching.h>
20#include <hidl/MQDescriptor.h>
21#include <hidl/Status.h>
22
23namespace android {
24namespace hardware {
25namespace gnss {
26namespace V2_0 {
27namespace implementation {
28
29using ::android::sp;
30using ::android::hardware::hidl_array;
31using ::android::hardware::hidl_memory;
32using ::android::hardware::hidl_string;
33using ::android::hardware::hidl_vec;
34using ::android::hardware::Return;
35using ::android::hardware::Void;
36
37struct GnssBatching : public IGnssBatching {
38 // Methods from ::android::hardware::gnss::V1_0::IGnssBatching follow.
39 Return<bool> init(const sp<V1_0::IGnssBatchingCallback>& callback) override;
40 Return<uint16_t> getBatchSize() override;
41 Return<bool> start(const V1_0::IGnssBatching::Options& options) override;
42 Return<void> flush() override;
43 Return<bool> stop() override;
44 Return<void> cleanup() override;
45
46 // Methods from V2_0::IGnssBatching follow.
47 Return<bool> init_2_0(const sp<V2_0::IGnssBatchingCallback>& callback) override;
48
49 private:
50 static sp<IGnssBatchingCallback> sCallback;
51};
52
53} // namespace implementation
54} // namespace V2_0
55} // namespace gnss
56} // namespace hardware
57} // namespace android