Home | History | Annotate | Download | only in default
      1 /*
      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 
     23 namespace android {
     24 namespace hardware {
     25 namespace gnss {
     26 namespace V2_0 {
     27 namespace implementation {
     28 
     29 using ::android::sp;
     30 using ::android::hardware::hidl_array;
     31 using ::android::hardware::hidl_memory;
     32 using ::android::hardware::hidl_string;
     33 using ::android::hardware::hidl_vec;
     34 using ::android::hardware::Return;
     35 using ::android::hardware::Void;
     36 
     37 struct 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
     58