blob: ce3764786856476b390b7b47a1701ea2210571ec [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;
21
22import IGnssCallback;
23import IGnssMeasurement;
Sasha Kuznetsov845f6d52019-12-04 12:17:50 -080024import IGnssConfiguration;
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 *
48 * At least one of getExtensionGnssMeasurement(), getExtensionGnssMeasurement_1_1(),
49 * getExtensionGnssMeasurement_2_0(), and getExtensionGnssMeasurement_2_1() methods must return
50 * a non-null handle, and the other methods must return nullptr.
51 *
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 *
59 * At least one of getExtensionGnssConfiguration(), getExtensionGnssConfiguration_1_1(),
60 * getExtensionGnssConfiguration_2_0(), and getExtensionGnssConfiguration_2_1() methods must
61 * return a non-null handle, and the other methods must return nullptr.
62 *
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 */
75 getExtensionMeasurementCorrections_1_1() generates (IMeasurementCorrections measurementCorrectionsIface);
Yu-Han Yangc06b5362019-10-25 14:14:35 -070076};