summaryrefslogtreecommitdiff
path: root/aoview/aoview.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-17 22:29:06 -0700
committerKeith Packard <keithp@keithp.com>2009-05-17 22:29:06 -0700
commit2c780d67b8a22d75a2da4b2af21fd35f0c6f5236 (patch)
treed41ddf8f23cf21c19b1d9d792e27a13f4c358424 /aoview/aoview.h
parent69616104813fc5ba89fb3128d04fb9328961c59c (diff)
Handle disappearing serial devices
Put up a dialog when the serial open fails, and shut down monitoring when the serial device disappears while running. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'aoview/aoview.h')
-rw-r--r--aoview/aoview.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/aoview/aoview.h b/aoview/aoview.h
index f584045f..78244912 100644
--- a/aoview/aoview.h
+++ b/aoview/aoview.h
@@ -73,7 +73,7 @@ struct aostate {
void
aoview_monitor_disconnect(void);
-void
+gboolean
aoview_monitor_connect(char *tty);
struct aoview_serial *
@@ -82,9 +82,11 @@ aoview_serial_open(const char *tty);
void
aoview_serial_close(struct aoview_serial *serial);
+typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial *serial, gint revents);
+
void
aoview_serial_set_callback(struct aoview_serial *serial,
- GSourceFunc func,
+ aoview_serial_callback func,
gpointer data,
GDestroyNotify notify);