blob: f19f8d0566adc1a552250f062b44ab6ea03fa144 [file] [log] [blame]
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -08001/*
2 * Copyright (C) 2018 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.0;
18
gomo1da4b5c2018-12-02 02:49:10 -080019import android.hardware.gnss.measurement_corrections@1.0::IMeasurementCorrections;
Anil Admal4d739e72018-11-14 12:38:57 -080020import android.hardware.gnss.visibility_control@1.0::IGnssVisibilityControl;
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080021import @1.1::IGnss;
22
Pierre Fite-Georgel12ac2b52019-01-17 16:56:17 -080023import GnssLocation;
gomo1da4b5c2018-12-02 02:49:10 -080024import IGnssCallback;
Anil Admal4e50a4c2018-12-19 15:22:13 -080025import IGnssConfiguration;
Yu-Han Yang6999a0f2019-03-14 11:08:43 -070026import IGnssDebug;
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080027import IGnssMeasurement;
Anil Admal3a405c52018-11-14 09:35:14 -080028import IAGnss;
Anil Admalb02bcc12018-11-14 10:23:45 -080029import IAGnssRil;
Anil Admal704bc612019-03-21 18:45:30 +000030import IGnssBatching;
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080031
Anil Admal4d739e72018-11-14 12:38:57 -080032/**
33 * Represents the standard GNSS (Global Navigation Satellite System) interface.
34 *
35 * Due to the introduction of new GNSS HAL package android.hardware.gnss.visibility_control@1.0
36 * the interface @1.0::IGnssNi.hal and @1.0::IGnssNiCallback.hal are deprecated in this version
37 * and are not supported by the framework. The GNSS HAL implementation of this interface
38 * must return nullptr for the following @1.0::IGnss method.
39 * getExtensionGnssNi() generates (IGnssNi gnssNiIface);
40 */
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080041interface IGnss extends @1.1::IGnss {
Anil Admal4e50a4c2018-12-19 15:22:13 -080042 /**
gomo1da4b5c2018-12-02 02:49:10 -080043 * Opens the interface and provides the callback routines to the implementation of this
44 * interface.
45 *
46 * @param callback Callback interface for IGnss.
47 *
48 * @return success Returns true on success.
49 */
50 setCallback_2_0(IGnssCallback callback) generates (bool success);
51
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080052 /**
Anil Admal4e50a4c2018-12-19 15:22:13 -080053 * This method returns the IGnssConfiguration interface.
54 *
55 * @return gnssConfigurationIface Handle to the IGnssConfiguration interface.
56 */
57 getExtensionGnssConfiguration_2_0() generates (IGnssConfiguration gnssConfigurationIface);
58
59 /**
Yu-Han Yang6999a0f2019-03-14 11:08:43 -070060 * This method returns the IGnssDebug interface.
61 *
62 * @return gnssDebugIface Handle to the IGnssDebug interface.
63 */
64 getExtensionGnssDebug_2_0() generates (IGnssDebug gnssDebugIface);
65
66 /**
Anil Admal3a405c52018-11-14 09:35:14 -080067 * This method returns the IAGnss Interface.
68 *
69 * The getExtensionAGnss() must return nullptr as the @1.0::IAGnss interface is
70 * deprecated.
71 *
72 * @return aGnssIface Handle to the IAGnss interface.
73 */
74 getExtensionAGnss_2_0() generates (IAGnss aGnssIface);
75
76 /**
Anil Admalb02bcc12018-11-14 10:23:45 -080077 * This method returns the IAGnssRil Interface.
78 *
79 * @return aGnssRilIface Handle to the IAGnssRil interface.
80 */
81 getExtensionAGnssRil_2_0() generates (IAGnssRil aGnssRilIface);
82
83 /**
Yu-Han Yang9c6c20b2018-11-06 14:12:49 -080084 * This method returns the IGnssMeasurement interface.
85 *
86 * Exactly one of getExtensionGnssMeasurement_1_1() and getExtensionGnssMeasurement_2_0() must
87 * return a non-null handle, and the other method must return nullptr.
88 *
89 * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
90 */
91 getExtensionGnssMeasurement_2_0() generates (IGnssMeasurement gnssMeasurementIface);
gomo1da4b5c2018-12-02 02:49:10 -080092
93 /**
94 * This method returns the IMeasurementCorrections interface.
95 *
96 * @return measurementCorrectionsIface Handle to the IMeasurementCorrections interface.
97 */
Anil Admal4d739e72018-11-14 12:38:57 -080098 getExtensionMeasurementCorrections()
gomo1da4b5c2018-12-02 02:49:10 -080099 generates (IMeasurementCorrections measurementCorrectionsIface);
Anil Admal4d739e72018-11-14 12:38:57 -0800100
101 /**
102 * This method returns the IGnssVisibilityControl interface.
103 *
104 * @return visibilityControlIface Handle to the IGnssVisibilityControl interface.
105 */
106 getExtensionVisibilityControl() generates (IGnssVisibilityControl visibilityControlIface);
Pierre Fite-Georgel12ac2b52019-01-17 16:56:17 -0800107
108 /**
Anil Admal704bc612019-03-21 18:45:30 +0000109 * This method returns the IGnssBatching interface.
110 *
111 * @return batchingIface Handle to the IGnssBatching interface.
112 */
113 getExtensionGnssBatching_2_0() generates (IGnssBatching batchingIface);
114
115 /**
Pierre Fite-Georgel12ac2b52019-01-17 16:56:17 -0800116 * Injects current location from the best available location provider.
117 *
118 * Unlike injectLocation, this method may inject a recent GNSS location from the HAL
119 * implementation, if that is the best available location known to the framework.
120 *
121 * @param location Location information from the best available location provider.
122 *
123 * @return success Returns true if successful.
124 */
125 injectBestLocation_2_0(GnssLocation location) generates (bool success);
Anil Admal4d739e72018-11-14 12:38:57 -0800126};