OSDN Git Service

libhardware_legacy: add gps debug extension
authorFred Fettinger <fred.fettinger@motorola.com>
Tue, 5 Jan 2010 22:54:03 +0000 (16:54 -0600)
committerMike Lockwood <lockwood@android.com>
Sun, 7 Mar 2010 14:30:00 +0000 (09:30 -0500)
The gps debug extension provides a single function that allows the native
gps implementation to include an arbitrary string in bugreports.

Change-Id: I1bd8e403e421847784804c47d83e3600340b3fea
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
include/hardware_legacy/gps.h

index 0cd9f04..c8ef980 100755 (executable)
@@ -114,6 +114,11 @@ typedef uint16_t AGpsStatusValue;
 #define GPS_XTRA_INTERFACE      "gps-xtra"
 
 /**
+ * Name for the GPS DEBUG interface.
+ */
+#define GPS_DEBUG_INTERFACE      "gps-debug"
+
+/**
  * Name for the AGPS interface.
  */
 #define AGPS_INTERFACE      "agps"
@@ -268,6 +273,15 @@ typedef struct {
     int  (*inject_xtra_data)( char* data, int length );
 } GpsXtraInterface;
 
+/** Extended interface for DEBUG support. */
+typedef struct {
+    /**
+     * This function should return any information that the native
+     * implementation wishes to include in a bugreport.
+     */
+    size_t (*get_internal_state)(char* buffer, size_t bufferSize);
+} GpsDebugInterface;
+
 /** Represents the status of AGPS. */
 typedef struct {
     AGpsType        type;