summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-04-14 16:21:50 -0400
committerMike Lockwood <lockwood@android.com>2009-04-14 16:21:50 -0400
commit1ea5429e78e31e0c60cab468cba18fa0fc6552e4 (patch)
treed794c494c0822757168e0d5765b1ce84f05a6067
parente18b7b21c2fe0788e6cf1a1a055a25c2e5bc2dd8 (diff)
downloadlibhardware_legacy-1ea5429e78e31e0c60cab468cba18fa0fc6552e4.tar.gz
gps: Add support for bringing up a GSM data connection on demand for SUPL.
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r--include/hardware_legacy/gps.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/include/hardware_legacy/gps.h b/include/hardware_legacy/gps.h
index eb70119..fa61d7f 100644
--- a/include/hardware_legacy/gps.h
+++ b/include/hardware_legacy/gps.h
@@ -89,6 +89,19 @@ typedef uint16_t GpsAidingData;
#define GPS_DELETE_CELLDB_INFO 0x8000
#define GPS_DELETE_ALL 0xFFFF
+/** SUPL status event values. */
+typedef uint16_t GpsSuplStatusValue;
+/** GPS requests data connection for SUPL. */
+#define GPS_REQUEST_SUPL_DATA_CONN 1
+/** GPS releases the SUPL data connection. */
+#define GPS_RELEASE_SUPL_DATA_CONN 2
+/** SUPL data connection initiated */
+#define GPS_SUPL_DATA_CONNECTED 3
+/** SUPL data connection completed */
+#define GPS_SUPL_DATA_CONN_DONE 4
+/** SUPL data connection failed */
+#define GPS_SUPL_DATA_CONN_FAILED 5
+
/**
* Name for the GPS XTRA interface.
*/
@@ -241,12 +254,40 @@ typedef struct {
int (*inject_xtra_data)( char* data, int length );
} GpsXtraInterface;
+/** Represents the status of SUPL. */
+typedef struct {
+ GpsSuplStatusValue status;
+} GpsSuplStatus;
+
+/** Callback with SUPL status information. */
+typedef void (* gps_supl_status_callback)(GpsSuplStatus* status);
+
+/** Callback structure for the SUPL interface. */
+typedef struct {
+ gps_supl_status_callback status_cb;
+} GpsSuplCallbacks;
+
+
/** Extended interface for SUPL support. */
typedef struct {
/**
- * Sets the name of the APN to be used for SUPL.
+ * Opens the SUPL interface and provides the callback routines
+ * to the implemenation of this interface.
+ */
+ void (*init)( GpsSuplCallbacks* callbacks );
+ /**
+ * Notifies that a data connection is available and sets
+ * the name of the APN to be used for SUPL.
+ */
+ int (*data_conn_open)( const char* apn );
+ /**
+ * Notifies that the SUPL data connection has been closed.
+ */
+ int (*data_conn_closed)();
+ /**
+ * Notifies that a data connection is not available for SUPL.
*/
- int (*set_apn)( const char* apn );
+ int (*data_conn_failed)();
/**
* Sets the IP address and port for the SUPL server.
*/