diff options
author | Baili Feng <bailif@codeaurora.org> | 2017-08-29 17:49:40 +0800 |
---|---|---|
committer | Baili Feng <bailif@codeaurora.org> | 2017-09-12 14:16:28 +0800 |
commit | f69296ba9eef3ba687887acf04c7c29eedbb342d (patch) | |
tree | 1f5d0d30787acd647c1c085bb38fc856b63fb4cd /utils/gps_extended_c.h | |
parent | 8ac14eff60bf07d523721c54cf03648ddd1ed80e (diff) | |
download | gps-f69296ba9eef3ba687887acf04c7c29eedbb342d.tar.gz |
Init default agps status callback in GnssAdapter
Call LocNetIfaceAgps_getStatusCb implemented in libloc_net_iface.so,
use the return function as default agps status callback.
Change-Id: I4d966a888e312c2d0fb1a6c9e30752294876e500
CRs-Fixed: 2064002
Diffstat (limited to 'utils/gps_extended_c.h')
-rw-r--r-- | utils/gps_extended_c.h | 54 |
1 files changed, 49 insertions, 5 deletions
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index a6a8d5d..f87a942 100644 --- a/utils/gps_extended_c.h +++ b/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 } |