aboutsummaryrefslogtreecommitdiff
path: root/gps/utils
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-01-20 10:25:47 +0800
committerDavide Garberi <dade.garberi@gmail.com>2018-01-27 23:40:16 +0100
commit596fd461f0a603c861ca9df4076f24a66e732cb5 (patch)
tree6eaf2d1255b13d5dcc14e938eed2f1321d4ba309 /gps/utils
parent18fc14ac0a3a0e622d679e7a6f708b4e468e1cfb (diff)
msm8996: gps: Squashed update to LA.UM.6.5.r1-05300-8x96.0
Change-Id: I76b39dd5329a050d44f126c684edb44b0184f0fc Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'gps/utils')
-rw-r--r--gps/utils/gps_extended_c.h54
-rw-r--r--gps/utils/loc_gps.h2
2 files changed, 50 insertions, 6 deletions
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. */