blob: 96681b6102236fd4fec1c8820d4a326bf83008cf [file] [log] [blame]
Michael Bestas58e7cab2023-05-12 04:05:32 +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
22#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H
23#define ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H
24
25#include <android/hardware/gnss/1.1/IGnssConfiguration.h>
26#include <hidl/Status.h>
27
28namespace android {
29namespace hardware {
30namespace gnss {
31namespace V1_1 {
32namespace implementation {
33
34using ::android::hardware::gnss::V1_1::IGnssConfiguration;
35using ::android::hardware::Return;
36using ::android::hardware::Void;
37using ::android::hardware::hidl_vec;
38using ::android::hardware::hidl_string;
39using ::android::sp;
40
41/*
42 * Interface for passing GNSS configuration info from platform to HAL.
43 */
44struct Gnss;
45struct GnssConfiguration : public IGnssConfiguration {
46 GnssConfiguration(Gnss* gnss);
47 ~GnssConfiguration() = default;
48
49 /*
50 * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow.
51 * These declarations were generated from IGnssConfiguration.hal.
52 */
53 Return<bool> setSuplVersion(uint32_t version) override;
54 Return<bool> setSuplMode(uint8_t mode) override;
55 Return<bool> setSuplEs(bool enabled) override;
56 Return<bool> setLppProfile(uint8_t lppProfile) override;
57 Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
58 Return<bool> setEmergencySuplPdn(bool enable) override;
59 Return<bool> setGpsLock(uint8_t lock) override;
60
61 // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow.
62 Return<bool> setBlacklist(
63 const hidl_vec<GnssConfiguration::BlacklistedSource>& blacklist) override;
64
65 private:
66 Gnss* mGnss = nullptr;
67 bool setBlacklistedSource(
68 GnssSvIdSource& copyToSource,
69 const GnssConfiguration::BlacklistedSource& copyFromSource);
70};
71
72} // namespace implementation
73} // namespace V1_1
74} // namespace gnss
75} // namespace hardware
76} // namespace android
77
78#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H