AGnssRil.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (c) 2017-2018, 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_V1_0_AGNSSRIL_H_
  21. #define ANDROID_HARDWARE_GNSS_V1_0_AGNSSRIL_H_
  22. #include <android/hardware/gnss/1.0/IAGnssRil.h>
  23. #include <hidl/Status.h>
  24. #include <location_interface.h>
  25. namespace android {
  26. namespace hardware {
  27. namespace gnss {
  28. namespace V1_1 {
  29. namespace implementation {
  30. using ::android::hardware::gnss::V1_0::IAGnssRil;
  31. using ::android::hardware::gnss::V1_0::IAGnssRilCallback;
  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. struct Gnss;
  38. /*
  39. * Extended interface for AGNSS RIL support. An Assisted GNSS Radio Interface Layer interface
  40. * allows the GNSS chipset to request radio interface layer information from Android platform.
  41. * Examples of such information are reference location, unique subscriber ID, phone number string
  42. * and network availability changes. Also contains wrapper methods to allow methods from
  43. * IAGnssiRilCallback interface to be passed into the conventional implementation of the GNSS HAL.
  44. */
  45. struct AGnssRil : public IAGnssRil {
  46. AGnssRil(Gnss* gnss);
  47. ~AGnssRil();
  48. /*
  49. * Methods from ::android::hardware::gnss::V1_0::IAGnssRil follow.
  50. * These declarations were generated from IAGnssRil.hal.
  51. */
  52. Return<void> setCallback(const sp<IAGnssRilCallback>& /*callback*/) override {
  53. return Void();
  54. }
  55. Return<void> setRefLocation(const IAGnssRil::AGnssRefLocation& /*agnssReflocation*/) override {
  56. return Void();
  57. }
  58. Return<bool> setSetId(IAGnssRil::SetIDType /*type*/, const hidl_string& /*setid*/) override {
  59. return false;
  60. }
  61. Return<bool> updateNetworkAvailability(bool /*available*/,
  62. const hidl_string& /*apn*/) override {
  63. return false;
  64. }
  65. Return<bool> updateNetworkState(bool connected, NetworkType type, bool roaming) override;
  66. private:
  67. Gnss* mGnss = nullptr;
  68. };
  69. } // namespace implementation
  70. } // namespace V1_1
  71. } // namespace gnss
  72. } // namespace hardware
  73. } // namespace android
  74. #endif // ANDROID_HARDWARE_GNSS_V1_0_AGNSSRIL_H_