blob: 812f9cc3702e6bafb5c4b9ca348ca73f006130ba [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
19import @2.0::IGnss;
20
21import IGnssCallback;
22import IGnssMeasurement;
23
24/**
25 * Represents the standard GNSS (Global Navigation Satellite System) interface.
26 */
27interface IGnss extends @2.0::IGnss {
28 /**
29 * Opens the interface and provides the callback routines to the implementation of this
30 * interface.
31 *
32 * The framework calls this method to instruct the GPS engine to prepare for serving requests
33 * from the framework. The GNSS HAL implementation must respond to all GNSS requests from the
34 * framework upon successful return from this method until cleanup() method is called to
35 * close this interface.
36 *
37 * @param callback Callback interface for IGnss.
38 *
39 * @return success Returns true on success.
40 */
41 setCallback_2_1(IGnssCallback callback) generates (bool success);
42
43 /**
44 * This method returns the IGnssMeasurement interface.
45 *
46 * At least one of getExtensionGnssMeasurement(), getExtensionGnssMeasurement_1_1(),
47 * getExtensionGnssMeasurement_2_0(), and getExtensionGnssMeasurement_2_1() methods must return
48 * a non-null handle, and the other methods must return nullptr.
49 *
50 * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
51 */
52 getExtensionGnssMeasurement_2_1() generates (IGnssMeasurement gnssMeasurementIface);
53};