"Initial commit to Gerrit"
[profile/ivi/gpsd.git] / gps_json.h
1 /* gps_json.h - JSON handling for libgps and gpsd
2  *
3  * By Eric S. Raymond, 2009
4  * This file is Copyright (c) 2010 by the GPSD project
5  * BSD terms apply: see the file COPYING in the distribution root for details.
6  */
7
8 #include "json.h"
9
10 #define GPS_JSON_COMMAND_MAX    80
11 #define GPS_JSON_RESPONSE_MAX   1536
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 char *json_stringify(/*@out@*/char *, size_t, /*@in@*/const char *);
17 void json_tpv_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
18 void json_sky_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
19 void json_att_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
20 void json_device_dump(const struct gps_device_t *, /*@out@*/char *, size_t);
21 void json_watch_dump(const struct policy_t *, /*@out@*/char *, size_t);
22 int json_watch_read(const char *, /*@out@*/struct policy_t *, 
23                     /*@null@*/const char **);
24 int json_device_read(const char *, /*@out@*/struct devconfig_t *, 
25                      /*@null@*/const char **);
26 void json_version_dump(/*@out@*/char *, size_t);
27 int json_rtcm2_read(const char *, char *, size_t, struct rtcm2_t *, 
28                     /*@null@*/const char **);
29 int json_ais_read(const char *, char *, size_t, struct ais_t *, 
30                   /*@null@*/const char **);
31 int libgps_json_unpack(const char *, struct gps_data_t *, 
32                        /*@null@*/const char **);
33 #ifdef __cplusplus
34 }
35 #endif
36
37 /* these values don't matter in themselves, they just have to be out-of-band */
38 #define DEVDEFAULT_BPS          0
39 #define DEVDEFAULT_PARITY       'X'
40 #define DEVDEFAULT_STOPBITS     3
41 #define DEVDEFAULT_NATIVE       -1
42
43 /* gps_json.h ends here */