2016-09-22 23:07:22 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package android.hardware.gnss@1.0;
|
|
|
|
|
|
|
|
/** Callback structure for the AGNSS interface. */
|
|
|
|
interface IAGnssCallback {
|
|
|
|
/** AGNSS type **/
|
2016-11-22 17:17:23 +01:00
|
|
|
@export(name="", value_prefix="AGPS_")
|
2016-11-02 18:20:07 +01:00
|
|
|
enum AGnssType : uint8_t {
|
2016-09-22 23:07:22 +02:00
|
|
|
TYPE_SUPL = 1,
|
|
|
|
TYPE_C2K = 2
|
|
|
|
};
|
|
|
|
|
2016-11-22 17:17:23 +01:00
|
|
|
@export(name="", value_prefix="GNSS_")
|
2016-11-02 18:20:07 +01:00
|
|
|
enum AGnssStatusValue : uint8_t {
|
2016-09-22 23:07:22 +02:00
|
|
|
/** GNSS requests data connection for AGNSS. */
|
|
|
|
REQUEST_AGNSS_DATA_CONN = 1,
|
|
|
|
/** GNSS releases the AGNSS data connection. */
|
|
|
|
RELEASE_AGNSS_DATA_CONN = 2,
|
|
|
|
/** AGNSS data connection initiated */
|
|
|
|
AGNSS_DATA_CONNECTED = 3,
|
|
|
|
/** AGNSS data connection completed */
|
|
|
|
AGNSS_DATA_CONN_DONE = 4,
|
|
|
|
/** AGNSS data connection failed */
|
|
|
|
AGNSS_DATA_CONN_FAILED = 5
|
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* Represents the status of AGNSS augmented to support IPv4.
|
|
|
|
*/
|
2016-11-22 17:17:23 +01:00
|
|
|
@export(name="", value_prefix="GPS_")
|
2016-09-22 23:07:22 +02:00
|
|
|
struct AGnssStatusIpV4 {
|
|
|
|
AGnssType type;
|
|
|
|
AGnssStatusValue status;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* 32-bit IPv4 address.
|
|
|
|
*/
|
|
|
|
uint32_t ipV4Addr;
|
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* Represents the status of AGNSS augmented to support IPv6.
|
|
|
|
*/
|
|
|
|
struct AGnssStatusIpV6 {
|
|
|
|
AGnssType type;
|
|
|
|
AGnssStatusValue status;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* 128-bit IPv6 address.
|
|
|
|
*/
|
|
|
|
uint8_t[16] ipV6Addr;
|
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* Callback with AGNSS(IpV4) status information.
|
|
|
|
*
|
|
|
|
* @param status Will be of type AGnssStatusIpV4.
|
|
|
|
*/
|
|
|
|
agnssStatusIpV4Cb(AGnssStatusIpV4 status);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-09-22 23:07:22 +02:00
|
|
|
* Callback with AGNSS(IpV6) status information.
|
|
|
|
*
|
|
|
|
* @param status Will be of type AGnssStatusIpV6.
|
|
|
|
*/
|
|
|
|
agnssStatusIpV6Cb(AGnssStatusIpV6 status);
|
|
|
|
|
|
|
|
};
|