blob: 896be1802f2f123486e8c9577dd266260d1b8462 [file] [log] [blame]
Anil Admal3a405c52018-11-14 09:35:14 -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
19/** Callback structure for the AGNSS interface. */
20interface IAGnssCallback {
21 /** AGNSS service type **/
22 enum AGnssType : uint8_t {
23 SUPL = 1,
24 C2K = 2,
25 SUPL_EIMS = 3,
26 SUPL_IMS = 4,
27 };
28
29 enum AGnssStatusValue : uint8_t {
30 /** GNSS requests data connection for AGNSS. */
31 REQUEST_AGNSS_DATA_CONN = 1,
32 /** GNSS releases the AGNSS data connection. */
33 RELEASE_AGNSS_DATA_CONN = 2,
34 /** AGNSS data connection initiated */
35 AGNSS_DATA_CONNECTED = 3,
36 /** AGNSS data connection completed */
37 AGNSS_DATA_CONN_DONE = 4,
38 /** AGNSS data connection failed */
39 AGNSS_DATA_CONN_FAILED = 5
40 };
41
42 /**
43 * Callback with AGNSS status information.
44 *
45 * The GNSS HAL implementation must use this method to request the framework to setup
46 * network connection for the specified AGNSS service and to update the connection
47 * status so that the framework can release the resources.
48 *
49 * @param type Type of AGNSS service.
50 * @parama status Status of the data connection.
51 */
52 agnssStatusCb(AGnssType type, AGnssStatusValue status);
53};