GnssNi.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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_GNSSNI_H
  21. #define ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H
  22. #include <android/hardware/gnss/1.0/IGnssNi.h>
  23. #include <hidl/Status.h>
  24. namespace android {
  25. namespace hardware {
  26. namespace gnss {
  27. namespace V1_0 {
  28. namespace implementation {
  29. using ::android::hardware::gnss::V1_0::IGnssNi;
  30. using ::android::hardware::gnss::V1_0::IGnssNiCallback;
  31. using ::android::hardware::Return;
  32. using ::android::hardware::Void;
  33. using ::android::hardware::hidl_vec;
  34. using ::android::hardware::hidl_string;
  35. using ::android::sp;
  36. struct Gnss;
  37. struct GnssNi : public IGnssNi {
  38. GnssNi(Gnss* gnss);
  39. ~GnssNi() = default;
  40. /*
  41. * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow.
  42. * These declarations were generated from IGnssNi.hal.
  43. */
  44. Return<void> setCallback(const sp<IGnssNiCallback>& callback) override;
  45. Return<void> respond(int32_t notifId,
  46. IGnssNiCallback::GnssUserResponseType userResponse) override;
  47. private:
  48. sp<IGnssNiCallback> mGnssNiCbIface = nullptr;
  49. Gnss* mGnss = nullptr;
  50. };
  51. } // namespace implementation
  52. } // namespace V1_0
  53. } // namespace gnss
  54. } // namespace hardware
  55. } // namespace android
  56. #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H