blob: 8b6c7811580f542d2cb4e163580335ac761f2d1a [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18#ifndef android_hardware_gnss_V1_1_GnssConfiguration_H_
19#define android_hardware_gnss_V1_1_GnssConfiguration_H_
20
21#include <android/hardware/gnss/1.1/IGnssConfiguration.h>
22#include <hidl/Status.h>
23#include <hardware/gps.h>
24#include <hardware/gps_mtk.h>
25
26namespace android {
27namespace hardware {
28namespace gnss {
29namespace V1_1 {
30namespace implementation {
31
32using ::android::hardware::gnss::V1_1::IGnssConfiguration;
33using ::android::hardware::Return;
34using ::android::hardware::Void;
35using ::android::hardware::hidl_vec;
36using ::android::hardware::hidl_string;
37using ::android::sp;
38
39using BlacklistedSource = V1_1::IGnssConfiguration::BlacklistedSource;
40
41/*
42 * Interface for passing GNSS configuration info from platform to HAL.
43 */
44struct GnssConfiguration : public IGnssConfiguration {
45 GnssConfiguration(const GnssConfigurationInterface_ext* gnssConfigIface);
46
47 /*
48 * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow.
49 * These declarations were generated from IGnssConfiguration.hal.
50 */
51 Return<bool> setSuplVersion(uint32_t version) override;
52 Return<bool> setSuplMode(uint8_t mode) override;
53 Return<bool> setSuplEs(bool enabled) override;
54 Return<bool> setLppProfile(uint8_t lppProfile) override;
55 Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
56 Return<bool> setEmergencySuplPdn(bool enable) override;
57 Return<bool> setGpsLock(uint8_t lock) override;
58
59 // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow.
60 Return<bool> setBlacklist(const hidl_vec<BlacklistedSource>& blacklist) override;
61
62 private:
63 const GnssConfigurationInterface_ext* mGnssConfigIface = nullptr;
64
65};
66
67} // namespace implementation
68} // namespace V1_1
69} // namespace gnss
70} // namespace hardware
71} // namespace android
72
73#endif // android_hardware_gnss_V1_1_GnssConfiguration_H_