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 | |
| 19 | import @2.0::IGnss; |
| 20 | |
| 21 | import IGnssCallback; |
| 22 | import IGnssMeasurement; |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 23 | import IGnssConfiguration; |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Represents the standard GNSS (Global Navigation Satellite System) interface. |
| 27 | */ |
| 28 | interface IGnss extends @2.0::IGnss { |
| 29 | /** |
| 30 | * Opens the interface and provides the callback routines to the implementation of this |
| 31 | * interface. |
| 32 | * |
| 33 | * The framework calls this method to instruct the GPS engine to prepare for serving requests |
| 34 | * from the framework. The GNSS HAL implementation must respond to all GNSS requests from the |
| 35 | * framework upon successful return from this method until cleanup() method is called to |
| 36 | * close this interface. |
| 37 | * |
| 38 | * @param callback Callback interface for IGnss. |
| 39 | * |
| 40 | * @return success Returns true on success. |
| 41 | */ |
| 42 | setCallback_2_1(IGnssCallback callback) generates (bool success); |
| 43 | |
| 44 | /** |
| 45 | * This method returns the IGnssMeasurement interface. |
| 46 | * |
| 47 | * At least one of getExtensionGnssMeasurement(), getExtensionGnssMeasurement_1_1(), |
| 48 | * getExtensionGnssMeasurement_2_0(), and getExtensionGnssMeasurement_2_1() methods must return |
| 49 | * a non-null handle, and the other methods must return nullptr. |
| 50 | * |
| 51 | * @return gnssMeasurementIface Handle to the IGnssMeasurement interface. |
| 52 | */ |
| 53 | getExtensionGnssMeasurement_2_1() generates (IGnssMeasurement gnssMeasurementIface); |
Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 54 | |
| 55 | /** |
| 56 | * This method returns the IGnssConfiguration interface. |
| 57 | * |
| 58 | * At least one of getExtensionGnssConfiguration(), getExtensionGnssConfiguration_1_1(), |
| 59 | * getExtensionGnssConfiguration_2_0(), and getExtensionGnssConfiguration_2_1() methods must |
| 60 | * return a non-null handle, and the other methods must return nullptr. |
| 61 | * |
| 62 | * @return gnssConfigurationIface Handle to the IGnssConfiguration interface. |
| 63 | */ |
| 64 | getExtensionGnssConfiguration_2_1() generates (IGnssConfiguration gnssConfigurationIface); |
Yu-Han Yang | c06b536 | 2019-10-25 14:14:35 -0700 | [diff] [blame] | 65 | }; |