summaryrefslogtreecommitdiff
path: root/libgps.h
diff options
context:
space:
mode:
authorRob Norris <rw_norris@hotmail.com>2016-02-29 21:36:23 +0000
committerJon Schlueter <jon.schlueter@gmail.com>2016-03-08 20:48:47 -0500
commit286046427488c1200cb375388f30bb11ac3b85bf (patch)
tree1d0bce7a9ba104eb53b5fe1e8aa228ac7e93434d /libgps.h
parent48083ca320afa1027067c8fe6f89119bb4d2efba (diff)
downloadgpsd-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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libgps.h b/libgps.h
index 92649130..70d4b7d3 100644
--- a/libgps.h
+++ b/libgps.h
@@ -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