blob: a04d8aa58d8666f2d0cc5a0c279121ea854f15db [file] [log] [blame]
Michael Bestas3a0209e2023-05-04 01:15:47 +03001/*
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
21#ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_
22#define ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_
23
24#include <android/hardware/gnss/2.0/IAGnssRil.h>
25#include <hidl/Status.h>
26#include <location_interface.h>
27
28namespace android {
29namespace hardware {
30namespace gnss {
31namespace V2_0 {
32namespace implementation {
33
34using ::android::hardware::Return;
35using ::android::hardware::Void;
36using ::android::hardware::hidl_vec;
37using ::android::hardware::hidl_string;
38using ::android::sp;
39
40struct Gnss;
41/*
42 * Extended interface for AGNSS RIL support. An Assisted GNSS Radio Interface Layer interface
43 * allows the GNSS chipset to request radio interface layer information from Android platform.
44 * Examples of such information are reference location, unique subscriber ID, phone number string
45 * and network availability changes. Also contains wrapper methods to allow methods from
46 * IAGnssiRilCallback interface to be passed into the conventional implementation of the GNSS HAL.
47 */
48struct AGnssRil : public V2_0::IAGnssRil {
49 AGnssRil(Gnss* gnss);
50 ~AGnssRil();
51
52 /*
53 * Methods from ::android::hardware::gnss::V1_0::IAGnssRil follow.
54 * These declarations were generated from IAGnssRil.hal.
55 */
56 Return<void> setCallback(const sp<V1_0::IAGnssRilCallback>& /*callback*/) override {
57 return Void();
58 }
59 Return<void> setRefLocation(const V1_0::IAGnssRil::AGnssRefLocation& /*agnssReflocation*/) override {
60 return Void();
61 }
62 Return<bool> setSetId(V1_0::IAGnssRil::SetIDType /*type*/, const hidl_string& /*setid*/) override {
63 return false;
64 }
65 Return<bool> updateNetworkAvailability(bool /*available*/,
66 const hidl_string& /*apn*/) override {
67 return false;
68 }
69 Return<bool> updateNetworkState(bool connected, V1_0::IAGnssRil::NetworkType type, bool roaming) override;
70
71 // Methods from ::android::hardware::gnss::V2_0::IAGnssRil follow
72 Return<bool> updateNetworkState_2_0(const V2_0::IAGnssRil::NetworkAttributes& attributes) override;
73
74 private:
75 Gnss* mGnss = nullptr;
76};
77
78} // namespace implementation
79} // namespace V2_0
80} // namespace gnss
81} // namespace hardware
82} // namespace android
83
84#endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSSRIL_H_