blob: a880b3fd2ab162145436942e537469fd3379954d [file] [log] [blame]
Yu-Han Yangc06b5362019-10-25 14:14:35 -07001/*
2 * Copyright (C) 2019 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
17package android.hardware.gnss@2.1;
18
Sasha Kuznetsov31eea852020-01-03 13:06:38 -080019import android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections;
Yu-Han Yangc06b5362019-10-25 14:14:35 -070020import @2.0::IGnss;
Yu-Han Yangc06b5362019-10-25 14:14:35 -070021import IGnssCallback;
22import IGnssMeasurement;
Sasha Kuznetsov845f6d52019-12-04 12:17:50 -080023import IGnssConfiguration;
Sasha Kuznetsov768de572020-02-11 06:00:10 +000024import IGnssAntennaInfo;
Yu-Han Yangc06b5362019-10-25 14:14:35 -070025
26/**
27 * Represents the standard GNSS (Global Navigation Satellite System) interface.
28 */
29interface IGnss extends @2.0::IGnss {
30 /**
31 * Opens the interface and provides the callback routines to the implementation of this
32 * interface.
33 *
34 * The framework calls this method to instruct the GPS engine to prepare for serving requests
35 * from the framework. The GNSS HAL implementation must respond to all GNSS requests from the
36 * framework upon successful return from this method until cleanup() method is called to
37 * close this interface.
38 *
39 * @param callback Callback interface for IGnss.
40 *
41 * @return success Returns true on success.
42 */
43 setCallback_2_1(IGnssCallback callback) generates (bool success);
44
45 /**
46 * This method returns the IGnssMeasurement interface.
47 *
Sasha Kuznetsov935047e2020-02-18 22:30:16 -080048 * getExtensionGnssMeasurement(), getExtensionGnssMeasurement_1_1(),
Yu-Han Yangc06b5362019-10-25 14:14:35 -070049 * getExtensionGnssMeasurement_2_0(), and getExtensionGnssMeasurement_2_1() methods must return
Sasha Kuznetsov935047e2020-02-18 22:30:16 -080050 * non-null. They can all return the same, latest version of IGnssMeasurement.
Yu-Han Yangc06b5362019-10-25 14:14:35 -070051 *
52 * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
53 */
54 getExtensionGnssMeasurement_2_1() generates (IGnssMeasurement gnssMeasurementIface);
Sasha Kuznetsov845f6d52019-12-04 12:17:50 -080055
56 /**
57 * This method returns the IGnssConfiguration interface.
58 *
Sasha Kuznetsov935047e2020-02-18 22:30:16 -080059 * getExtensionGnssConfiguration(), getExtensionGnssConfiguration_1_1(),
Sasha Kuznetsov845f6d52019-12-04 12:17:50 -080060 * getExtensionGnssConfiguration_2_0(), and getExtensionGnssConfiguration_2_1() methods must
Sasha Kuznetsov935047e2020-02-18 22:30:16 -080061 * return non-null. They can all return the same, latest version of IGnssConfiguration.
Sasha Kuznetsov845f6d52019-12-04 12:17:50 -080062 *
63 * @return gnssConfigurationIface Handle to the IGnssConfiguration interface.
64 */
65 getExtensionGnssConfiguration_2_1() generates (IGnssConfiguration gnssConfigurationIface);
Sasha Kuznetsov31eea852020-01-03 13:06:38 -080066
67 /**
68 * This method returns the IMeasurementCorrections interface.
69 *
70 * Both getExtensionMeasurementCorrections and getExtensionMeasurementCorrections_1_1 must
71 * return non-null. Both methods can return the same V1.1 IMeasurementCorrections object.
72 *
73 * @return measurementCorrectionsIface Handle to the IMeasurementCorrections interface.
74 */
Sasha Kuznetsov768de572020-02-11 06:00:10 +000075 getExtensionMeasurementCorrections_1_1()
76 generates (IMeasurementCorrections measurementCorrectionsIface);
77
78 /**
79 * This method returns the IGnssAntennaInfo interface.
80 *
81 * This method must return non-null.
82 *
83 * @return gnssAntennaInfoIface Handle to the IGnssAntennaInfo interface.
84 */
85 getExtensionGnssAntennaInfo() generates (IGnssAntennaInfo gnssAntennaInfoIface);
86};