blob: 11a6a5d2ae314e16e39fd60fb6a13a07a3c0595f [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 **/
Hridya Valsaraju529331c2016-11-22 08:17:23 -080022 @export(name="", value_prefix="AGPS_")
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -070023 enum AGnssType : uint8_t {
Hridya Valsarajue596a712016-09-22 14:07:22 -070024 TYPE_SUPL = 1,
25 TYPE_C2K = 2
26 };
27
Hridya Valsaraju529331c2016-11-22 08:17:23 -080028 @export(name="", value_prefix="GNSS_")
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -070029 enum AGnssStatusValue : uint8_t {
Hridya Valsarajue596a712016-09-22 14:07:22 -070030 /** 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
Andreas Huber40d3a9b2017-03-28 16:19:16 -070042 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070043 * Represents the status of AGNSS augmented to support IPv4.
44 */
Hridya Valsarajue596a712016-09-22 14:07:22 -070045 struct AGnssStatusIpV4 {
46 AGnssType type;
47 AGnssStatusValue status;
Andreas Huber40d3a9b2017-03-28 16:19:16 -070048 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070049 * 32-bit IPv4 address.
50 */
51 uint32_t ipV4Addr;
52 };
53
Andreas Huber40d3a9b2017-03-28 16:19:16 -070054 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070055 * Represents the status of AGNSS augmented to support IPv6.
56 */
57 struct AGnssStatusIpV6 {
58 AGnssType type;
59 AGnssStatusValue status;
Andreas Huber40d3a9b2017-03-28 16:19:16 -070060 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070061 * 128-bit IPv6 address.
62 */
63 uint8_t[16] ipV6Addr;
64 };
65
Andreas Huber40d3a9b2017-03-28 16:19:16 -070066 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070067 * Callback with AGNSS(IpV4) status information.
68 *
69 * @param status Will be of type AGnssStatusIpV4.
70 */
71 agnssStatusIpV4Cb(AGnssStatusIpV4 status);
72
Andreas Huber40d3a9b2017-03-28 16:19:16 -070073 /**
Hridya Valsarajue596a712016-09-22 14:07:22 -070074 * Callback with AGNSS(IpV6) status information.
75 *
76 * @param status Will be of type AGnssStatusIpV6.
77 */
78 agnssStatusIpV6Cb(AGnssStatusIpV6 status);
79
80};