diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-27 19:09:56 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-27 19:09:56 -0400 |
commit | d08ab2ed72fb7590739612a7e5d37150a3bf972a (patch) | |
tree | 29e3462d1531816ae9fccf0fb8d59db1929c9f9b /gps.h | |
parent | 4eea65f0cd06ecd356fc371e707cda174537e616 (diff) | |
download | gpsd-d08ab2ed72fb7590739612a7e5d37150a3bf972a.tar.gz |
Begin splitting apart libgps_core.c into socket-export and generic functions.
Diffstat (limited to 'gps.h')
-rw-r--r-- | gps.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1433,18 +1433,20 @@ extern int gps_open(/*@null@*/const char *, /*@null@*/const char *, extern int gps_close(struct gps_data_t *); extern int gps_send(struct gps_data_t *, const char *, ... ); extern int gps_read(/*@out@*/struct gps_data_t *); +extern int gps_unpack(char *, struct gps_data_t *); extern bool gps_waiting(struct gps_data_t *, int); extern int gps_stream(struct gps_data_t *, unsigned int, /*@null@*/void *); extern const char /*@observer@*/ *gps_data(struct gps_data_t *); extern const char /*@observer@*/ *gps_errstr(const int); +extern int gps_sock_open(/*@null@*/const char *, /*@null@*/const char *, + /*@out@*/struct gps_data_t *); +extern int gps_sock_read(/*@out@*/struct gps_data_t *); +extern int gps_sock_close(struct gps_data_t *); extern int gps_shm_open(/*@out@*/struct gps_data_t *); extern int gps_shm_read(struct gps_data_t *); extern void gps_shm_close(struct gps_data_t *); -/* this only needs to be visible for the unit tests */ -extern int gps_unpack(char *, struct gps_data_t *); - /* dependencies on struct gpsdata_t end hrere */ extern void gps_clear_fix(/*@ out @*/struct gps_fix_t *); @@ -1492,10 +1494,15 @@ extern double wgs84_separation(double, double); #define NL_NOSOCK -4 /* can't create socket */ #define NL_NOSOCKOPT -5 /* error SETSOCKOPT SO_REUSEADDR */ #define NL_NOCONNECT -6 /* can't connect to host/socket pair */ +#define SHM_NOSHARED -7 /* shared-memory segment not available */ +#define SHM_NOATTACH -8 /* shared-memory attach failed */ #define DEFAULT_GPSD_PORT "2947" /* IANA assignment */ #define DEFAULT_RTCM_PORT "2101" /* IANA assignment */ +/* special host values for non-socket exports */ +#define GPSD_SHARED_MEMORY "shared memory" + #ifdef __cplusplus } /* End of the 'extern "C"' block */ #endif |