GnssConfiguration.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
  3. * Not a Contribution
  4. */
  5. /* Copyright (C) 2016 The Android Open Source Project
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H
  20. #define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H
  21. #include <android/hardware/gnss/1.0/IGnssConfiguration.h>
  22. #include <hidl/Status.h>
  23. namespace android {
  24. namespace hardware {
  25. namespace gnss {
  26. namespace V1_0 {
  27. namespace implementation {
  28. using ::android::hardware::gnss::V1_0::IGnssConfiguration;
  29. using ::android::hardware::Return;
  30. using ::android::hardware::Void;
  31. using ::android::hardware::hidl_vec;
  32. using ::android::hardware::hidl_string;
  33. using ::android::sp;
  34. /*
  35. * Interface for passing GNSS configuration info from platform to HAL.
  36. */
  37. struct Gnss;
  38. struct GnssConfiguration : public IGnssConfiguration {
  39. GnssConfiguration(Gnss* gnss);
  40. ~GnssConfiguration() = default;
  41. /*
  42. * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow.
  43. * These declarations were generated from IGnssConfiguration.hal.
  44. */
  45. Return<bool> setSuplVersion(uint32_t version) override;
  46. Return<bool> setSuplMode(uint8_t mode) override;
  47. Return<bool> setSuplEs(bool enabled) override;
  48. Return<bool> setLppProfile(uint8_t lppProfileMask) override;
  49. Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
  50. Return<bool> setEmergencySuplPdn(bool enable) override;
  51. Return<bool> setGpsLock(uint8_t lock) override;
  52. private:
  53. Gnss* mGnss = nullptr;
  54. };
  55. } // namespace implementation
  56. } // namespace V1_0
  57. } // namespace gnss
  58. } // namespace hardware
  59. } // namespace android
  60. #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H