blob: 46641be4c54a9100dc1b49575ea937b253d145f9 [file] [log] [blame]
Hridya Valsarajue596a712016-09-22 14:07:22 -07001/*
2 * Copyright (C) 2016 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@1.0;
18
19/** Callback structure for the AGNSS interface. */
20interface IAGnssCallback {
21 /** AGNSS type **/
22 enum AGnssType : uint16_t {
23 TYPE_SUPL = 1,
24 TYPE_C2K = 2
25 };
26
27 enum AGnssStatusValue : uint16_t {
28 /** GNSS requests data connection for AGNSS. */
29 REQUEST_AGNSS_DATA_CONN = 1,
30 /** GNSS releases the AGNSS data connection. */
31 RELEASE_AGNSS_DATA_CONN = 2,
32 /** AGNSS data connection initiated */
33 AGNSS_DATA_CONNECTED = 3,
34 /** AGNSS data connection completed */
35 AGNSS_DATA_CONN_DONE = 4,
36 /** AGNSS data connection failed */
37 AGNSS_DATA_CONN_FAILED = 5
38 };
39
40 /*
41 * Represents the status of AGNSS augmented to support IPv4.
42 */
43 struct AGnssStatusIpV4 {
44 AGnssType type;
45 AGnssStatusValue status;
46 /*
47 * 32-bit IPv4 address.
48 */
49 uint32_t ipV4Addr;
50 };
51
52 /*
53 * Represents the status of AGNSS augmented to support IPv6.
54 */
55 struct AGnssStatusIpV6 {
56 AGnssType type;
57 AGnssStatusValue status;
58 /*
59 * 128-bit IPv6 address.
60 */
61 uint8_t[16] ipV6Addr;
62 };
63
64 /*
65 * Callback with AGNSS(IpV4) status information.
66 *
67 * @param status Will be of type AGnssStatusIpV4.
68 */
69 agnssStatusIpV4Cb(AGnssStatusIpV4 status);
70
71 /*
72 * Callback with AGNSS(IpV6) status information.
73 *
74 * @param status Will be of type AGnssStatusIpV6.
75 */
76 agnssStatusIpV6Cb(AGnssStatusIpV6 status);
77
78};