blob: 11a6a5d2ae314e16e39fd60fb6a13a07a3c0595f [file] [log] [blame]
/*
* 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 **/
@export(name="", value_prefix="AGPS_")
enum AGnssType : uint8_t {
TYPE_SUPL = 1,
TYPE_C2K = 2
};
@export(name="", value_prefix="GNSS_")
enum AGnssStatusValue : uint8_t {
/** 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
};
/**
* Represents the status of AGNSS augmented to support IPv4.
*/
struct AGnssStatusIpV4 {
AGnssType type;
AGnssStatusValue status;
/**
* 32-bit IPv4 address.
*/
uint32_t ipV4Addr;
};
/**
* Represents the status of AGNSS augmented to support IPv6.
*/
struct AGnssStatusIpV6 {
AGnssType type;
AGnssStatusValue status;
/**
* 128-bit IPv6 address.
*/
uint8_t[16] ipV6Addr;
};
/**
* Callback with AGNSS(IpV4) status information.
*
* @param status Will be of type AGnssStatusIpV4.
*/
agnssStatusIpV4Cb(AGnssStatusIpV4 status);
/**
* Callback with AGNSS(IpV6) status information.
*
* @param status Will be of type AGnssStatusIpV6.
*/
agnssStatusIpV6Cb(AGnssStatusIpV6 status);
};