From 596fd461f0a603c861ca9df4076f24a66e732cb5 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Sat, 20 Jan 2018 10:25:47 +0800 Subject: msm8996: gps: Squashed update to LA.UM.6.5.r1-05300-8x96.0 Change-Id: I76b39dd5329a050d44f126c684edb44b0184f0fc Signed-off-by: Davide Garberi --- gps/utils/gps_extended_c.h | 54 +++++++++++++++++++++++++++++++++++++++++----- gps/utils/loc_gps.h | 2 +- 2 files changed, 50 insertions(+), 6 deletions(-) (limited to 'gps/utils') diff --git a/gps/utils/gps_extended_c.h b/gps/utils/gps_extended_c.h index a6a8d5d..f87a942 100644 --- a/gps/utils/gps_extended_c.h +++ b/gps/utils/gps_extended_c.h @@ -143,7 +143,7 @@ typedef struct { /** AGPS type */ -typedef int16_t AGpsExtType; +typedef int8_t AGpsExtType; #define LOC_AGPS_TYPE_INVALID -1 #define LOC_AGPS_TYPE_ANY 0 #define LOC_AGPS_TYPE_SUPL 1 @@ -156,10 +156,10 @@ typedef int16_t AGpsExtType; #define SSID_BUF_SIZE (32+1) typedef int16_t AGpsBearerType; -#define AGPS_APN_BEARER_INVALID -1 -#define AGPS_APN_BEARER_IPV4 0 -#define AGPS_APN_BEARER_IPV6 1 -#define AGPS_APN_BEARER_IPV4V6 2 +#define AGPS_APN_BEARER_INVALID 0 +#define AGPS_APN_BEARER_IPV4 1 +#define AGPS_APN_BEARER_IPV6 2 +#define AGPS_APN_BEARER_IPV4V6 3 typedef enum { AGPS_CB_PRIORITY_LOW = 1, @@ -1238,6 +1238,50 @@ typedef struct Gnss_Srn_MacAddr_Type macAddrType; /* SRN AP MAC Address type */ } GnssSrnDataReq; +/* + * Represents the status of AGNSS augmented to support IPv4. + */ +struct AGnssExtStatusIpV4 { + AGpsExtType type; + LocAGpsStatusValue status; + /* + * 32-bit IPv4 address. + */ + uint32_t ipV4Addr; +}; + +/* + * Represents the status of AGNSS augmented to support IPv6. + */ +struct AGnssExtStatusIpV6 { + AGpsExtType type; + LocAGpsStatusValue status; + /* + * 128-bit IPv6 address. + */ + uint8_t ipV6Addr[16]; +}; + +/* + * Callback with AGNSS(IpV4) status information. + * + * @param status Will be of type AGnssExtStatusIpV4. + */ +typedef void (*AgnssStatusIpV4Cb)(AGnssExtStatusIpV4 status); + +/* + * Callback with AGNSS(IpV6) status information. + * + * @param status Will be of type AGnssExtStatusIpV6. + */ +typedef void (*AgnssStatusIpV6Cb)(AGnssExtStatusIpV6 status); + +/* Constructs for interaction with loc_net_iface library */ +typedef void (*LocAgpsOpenResultCb)(bool isSuccess, AGpsExtType agpsType, const char* apn, + AGpsBearerType bearerType, void* userDataPtr); + +typedef void (*LocAgpsCloseResultCb)(bool isSuccess, AGpsExtType agpsType, void* userDataPtr); + #ifdef __cplusplus } diff --git a/gps/utils/loc_gps.h b/gps/utils/loc_gps.h index 77ebe54..5e915a3 100644 --- a/gps/utils/loc_gps.h +++ b/gps/utils/loc_gps.h @@ -208,7 +208,7 @@ typedef int LocGpsNiEncodingType; #define LOC_GPS_ENC_UNKNOWN -1 /** AGPS status event values. */ -typedef uint16_t LocAGpsStatusValue; +typedef uint8_t LocAGpsStatusValue; /** GPS requests data connection for AGPS. */ #define LOC_GPS_REQUEST_AGPS_DATA_CONN 1 /** GPS releases the AGPS data connection. */ -- cgit v1.2.3