diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-13 10:38:54 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-13 10:38:54 +0000 |
commit | fa644e4d0bb65cea5214f3cc02ce4421c8000925 (patch) | |
tree | 42183f085cf1ee9b57fc9e32dce928e1f1590d2b /gpsd.h-tail | |
parent | bfede96dcb989353be781759f337a7b34393aac2 (diff) | |
download | gpsd-fa644e4d0bb65cea5214f3cc02ce4421c8000925.tar.gz |
Fold the probe_wakup method into the new generic lifetime-event hook.
This finishes the bug refactoring; now we're ready to do actual
behavior changes.
Codebase splints clean. All regression tests pass.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index d56f767e..5886f521 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -193,7 +193,12 @@ struct gps_device_t; #define MODE_BINARY 1 typedef enum {ANY, GPS, RTCM2, RTCM3, AIS} gnss_type; -typedef enum {event_configure, event_probe_subtype, event_revert} event_t; +typedef enum { + event_wakeup, + event_configure, + event_probe_subtype, + event_revert +} event_t; struct gps_type_t { /* GPS method table, describes how to talk to a particular GPS type */ @@ -202,21 +207,20 @@ struct gps_type_t { /*@observer@*//*@null@*/char *trigger; int channels; /*@null@*/bool (*probe_detect)(struct gps_device_t *session); - /*@null@*/void (*probe_wakeup)(struct gps_device_t *session); /*@null@*/ssize_t (*get_packet)(struct gps_device_t *session); /*@null@*/gps_mask_t (*parse_packet)(struct gps_device_t *session); /*@null@*/ssize_t (*rtcm_writer)(struct gps_device_t *session, char *rtcmbuf, size_t rtcmbytes); -#ifdef ALLOW_CONTROLSEND - /*@null@*/ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_t buflen); -#endif /* ALLOW_CONTROLSEND */ -#ifdef ALLOW_RECONFIGURE /*@null@*/void (*event_hook)(struct gps_device_t *session, event_t event); +#ifdef ALLOW_RECONFIGURE /*@null@*/bool (*speed_switcher)(struct gps_device_t *session, speed_t speed, char parity, int stopbits); /*@null@*/void (*mode_switcher)(struct gps_device_t *session, int mode); /*@null@*/bool (*rate_switcher)(struct gps_device_t *session, double rate); -#endif /* ALLOW_RECONFIGURE */ double min_cycle; +#endif /* ALLOW_RECONFIGURE */ +#ifdef ALLOW_CONTROLSEND + /*@null@*/ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_t buflen); +#endif /* ALLOW_CONTROLSEND */ }; struct gps_device_t { |