diff options
author | Rob Norris <rw_norris@hotmail.com> | 2016-02-29 21:36:23 +0000 |
---|---|---|
committer | Jon Schlueter <jon.schlueter@gmail.com> | 2016-03-08 20:48:47 -0500 |
commit | 286046427488c1200cb375388f30bb11ac3b85bf (patch) | |
tree | 1d0bce7a9ba104eb53b5fe1e8aa228ac7e93434d /libgps.h | |
parent | 48083ca320afa1027067c8fe6f89119bb4d2efba (diff) | |
download | gpsd-286046427488c1200cb375388f30bb11ac3b85bf.tar.gz |
Move declarations of libgps_debug related functions and definitions.
Move from gpsd.h to libgps.h
This is the more logical place for this code
and removes the dependency of test_libgps.c on gpsd.h
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
Diffstat (limited to 'libgps.h')
-rw-r--r-- | libgps.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -10,6 +10,8 @@ #define SHM_PSEUDO_FD -1 #define DBUS_PSEUDO_FD -2 +#include "gps.h" +#include "gpsd_config.h" #include "compiler.h" #ifdef __cplusplus @@ -38,6 +40,21 @@ extern int gps_dbus_mainloop(struct gps_data_t *, int, extern int json_ais_read(const char *, char *, size_t, struct ais_t *, const char **); + +/* debugging apparatus for the client library */ +#ifdef CLIENTDEBUG_ENABLE +#define LIBGPS_DEBUG +#endif /* CLIENTDEBUG_ENABLE */ +#ifdef LIBGPS_DEBUG +#define DEBUG_CALLS 1 /* shallowest debug level */ +#define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */ +# define libgps_debug_trace(args) (void) libgps_trace args +extern int libgps_debuglevel; +extern void libgps_dump_state(struct gps_data_t *); +#else +# define libgps_debug_trace(args) do { } while (0) +#endif /* LIBGPS_DEBUG */ + #ifdef __cplusplus } #endif |