AGnssRil.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  3. * Not a Contribution
  4. */
  5. /*
  6. * Copyright (C) 2016 The Android Open Source Project
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. #ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_
  21. #define ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_
  22. #include <android/hardware/gnss/2.0/IAGnssRil.h>
  23. #include <hidl/Status.h>
  24. #include <location_interface.h>
  25. namespace android {
  26. namespace hardware {
  27. namespace gnss {
  28. namespace V2_0 {
  29. namespace implementation {
  30. using ::android::hardware::Return;
  31. using ::android::hardware::Void;
  32. using ::android::hardware::hidl_vec;
  33. using ::android::hardware::hidl_string;
  34. using ::android::sp;
  35. struct Gnss;
  36. /*
  37. * Extended interface for AGNSS RIL support. An Assisted GNSS Radio Interface Layer interface
  38. * allows the GNSS chipset to request radio interface layer information from Android platform.
  39. * Examples of such information are reference location, unique subscriber ID, phone number string
  40. * and network availability changes. Also contains wrapper methods to allow methods from
  41. * IAGnssiRilCallback interface to be passed into the conventional implementation of the GNSS HAL.
  42. */
  43. struct AGnssRil : public V2_0::IAGnssRil {
  44. AGnssRil(Gnss* gnss);
  45. ~AGnssRil();
  46. /*
  47. * Methods from ::android::hardware::gnss::V1_0::IAGnssRil follow.
  48. * These declarations were generated from IAGnssRil.hal.
  49. */
  50. Return<void> setCallback(const sp<V1_0::IAGnssRilCallback>& /*callback*/) override {
  51. return Void();
  52. }
  53. Return<void> setRefLocation(const V1_0::IAGnssRil::AGnssRefLocation& /*agnssReflocation*/) override {
  54. return Void();
  55. }
  56. Return<bool> setSetId(V1_0::IAGnssRil::SetIDType /*type*/, const hidl_string& /*setid*/) override {
  57. return false;
  58. }
  59. Return<bool> updateNetworkAvailability(bool /*available*/,
  60. const hidl_string& /*apn*/) override {
  61. return false;
  62. }
  63. Return<bool> updateNetworkState(bool connected, V1_0::IAGnssRil::NetworkType type, bool roaming) override;
  64. // Methods from ::android::hardware::gnss::V2_0::IAGnssRil follow
  65. Return<bool> updateNetworkState_2_0(const V2_0::IAGnssRil::NetworkAttributes& attributes) override;
  66. private:
  67. Gnss* mGnss = nullptr;
  68. };
  69. } // namespace implementation
  70. } // namespace V2_0
  71. } // namespace gnss
  72. } // namespace hardware
  73. } // namespace android
  74. #endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_