summaryrefslogtreecommitdiff
path: root/libgps.xml
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-24 08:46:59 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-24 08:46:59 -0400
commitd29266b5ece4cc5fd865f97947333574b9186e72 (patch)
tree949536fe3fb463afc95d6651ce2b0fb3248fef2a /libgps.xml
parenta9cd46bb96ab64d63fa803cc23398feaa33fc34f (diff)
downloadgpsd-d29266b5ece4cc5fd865f97947333574b9186e72.tar.gz
Document the unpack() method in C and Python APIs.
We're not bumping the minor API number because the C library has had this all along. Alas, it can't be made to fit the RAII model of the C++ binding. All regression tests pass.
Diffstat (limited to 'libgps.xml')
-rw-r--r--libgps.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgps.xml b/libgps.xml
index b70f3a67..bf4962b6 100644
--- a/libgps.xml
+++ b/libgps.xml
@@ -51,6 +51,11 @@ C:
<paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
</funcprototype>
<funcprototype>
+<funcdef>int <function>gps_unpack</function></funcdef>
+ <paramdef>char *<parameter>buf</parameter></paramdef>
+ <paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
+</funcprototype>
+<funcprototype>
<funcdef>void <function>gps_close</function></funcdef>
<paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
</funcprototype>
@@ -144,6 +149,11 @@ will not supply input often enough to prevent a spurious error indication.
For the typical 1-second cycle time of GPSes this implies a minimum 2-second
timeout.</para>
+<para><function>gps_unpack()</function> parses JSON from the argument
+buffer into the target of the session structure pointer argument.
+Included in case your application wishes to manage socket I/O
+itself.</para>
+
<para><function>gps_data()</function> returns the contents of the
client data buffer. Use with care; this may fail to be a NUL-terminated
string if WATCH_RAW is enabled.</para>