diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-24 08:46:59 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-24 08:46:59 -0400 |
commit | d29266b5ece4cc5fd865f97947333574b9186e72 (patch) | |
tree | 949536fe3fb463afc95d6651ce2b0fb3248fef2a /libgps.xml | |
parent | a9cd46bb96ab64d63fa803cc23398feaa33fc34f (diff) | |
download | gpsd-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.xml | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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> |