Home | History | Annotate | Download | only in default
      1 /*
      2  * Copyright (C) 2016 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 
     18 #ifndef android_hardware_gnss_V1_0_GnssConfiguration_H_
     19 #define android_hardware_gnss_V1_0_GnssConfiguration_H_
     20 
     21 #include <android/hardware/gnss/1.0/IGnssConfiguration.h>
     22 #include <hardware/gps.h>
     23 #include <hidl/Status.h>
     24 
     25 namespace android {
     26 namespace hardware {
     27 namespace gnss {
     28 namespace V1_0 {
     29 namespace implementation {
     30 
     31 using ::android::hardware::gnss::V1_0::IGnssConfiguration;
     32 using ::android::hardware::Return;
     33 using ::android::hardware::Void;
     34 using ::android::hardware::hidl_vec;
     35 using ::android::hardware::hidl_string;
     36 using ::android::sp;
     37 
     38 /*
     39  * Interface for passing GNSS configuration info from platform to HAL.
     40  */
     41 struct GnssConfiguration : public IGnssConfiguration {
     42     GnssConfiguration(const GnssConfigurationInterface* gnssConfigIface);
     43 
     44     /*
     45      * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow.
     46      * These declarations were generated from IGnssConfiguration.hal.
     47      */
     48     Return<bool> setSuplVersion(uint32_t version) override;
     49     Return<bool> setSuplMode(uint8_t mode) override;
     50     Return<bool> setSuplEs(bool enabled) override;
     51     Return<bool> setLppProfile(uint8_t lppProfile) override;
     52     Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
     53     Return<bool> setEmergencySuplPdn(bool enable) override;
     54     Return<bool> setGpsLock(uint8_t lock) override;
     55 
     56  private:
     57     const GnssConfigurationInterface* mGnssConfigIface = nullptr;
     58 };
     59 
     60 }  // namespace implementation
     61 }  // namespace V1_0
     62 }  // namespace gnss
     63 }  // namespace hardware
     64 }  // namespace android
     65 
     66 #endif  // android_hardware_gnss_V1_0_GnssConfiguration_H_
     67