Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.gnss@2.1; |
| 18 | |
Sasha Kuznetsov | 31eea85 | 2020-01-03 13:06:38 -0800 | [diff] [blame] | 19 | import android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections; |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 20 | import @2.0::IGnss; |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 21 | import IGnssCallback; |
| 22 | import IGnssMeasurement; |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 23 | import IGnssConfiguration; |
Sasha Kuznetsov | 768de57 | 2020-02-11 06:00:10 +0000 | [diff] [blame] | 24 | import IGnssAntennaInfo; |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * Represents the standard GNSS (Global Navigation Satellite System) interface. |
| 28 | */ |
| 29 | interface 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 Kuznetsov | 935047e | 2020-02-18 22:30:16 -0800 | [diff] [blame] | 48 | * getExtensionGnssMeasurement(), getExtensionGnssMeasurement_1_1(), |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 49 | * getExtensionGnssMeasurement_2_0(), and getExtensionGnssMeasurement_2_1() methods must return |
Sasha Kuznetsov | 935047e | 2020-02-18 22:30:16 -0800 | [diff] [blame] | 50 | * non-null. They can all return the same, latest version of IGnssMeasurement. |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 51 | * |
| 52 | * @return gnssMeasurementIface Handle to the IGnssMeasurement interface. |
| 53 | */ |
| 54 | getExtensionGnssMeasurement_2_1() generates (IGnssMeasurement gnssMeasurementIface); |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * This method returns the IGnssConfiguration interface. |
| 58 | * |
Sasha Kuznetsov | 935047e | 2020-02-18 22:30:16 -0800 | [diff] [blame] | 59 | * getExtensionGnssConfiguration(), getExtensionGnssConfiguration_1_1(), |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 60 | * getExtensionGnssConfiguration_2_0(), and getExtensionGnssConfiguration_2_1() methods must |
Sasha Kuznetsov | 935047e | 2020-02-18 22:30:16 -0800 | [diff] [blame] | 61 | * return non-null. They can all return the same, latest version of IGnssConfiguration. |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 62 | * |
| 63 | * @return gnssConfigurationIface Handle to the IGnssConfiguration interface. |
| 64 | */ |
| 65 | getExtensionGnssConfiguration_2_1() generates (IGnssConfiguration gnssConfigurationIface); |
Sasha Kuznetsov | 31eea85 | 2020-01-03 13:06:38 -0800 | [diff] [blame] | 66 | |
| 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 Kuznetsov | 768de57 | 2020-02-11 06:00:10 +0000 | [diff] [blame] | 75 | 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 | }; |