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