aboutsummaryrefslogtreecommitdiffstats
path: root/capture.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-06-24 08:05:45 +0000
committerGuy Harris <guy@alum.mit.edu>2008-06-24 08:05:45 +0000
commitc4932893e3e4021b33cf4e886ae38523638363da (patch)
treeb06a933329fb307a380a74b2f3f63c06cfacc356 /capture.h
parenta9ffacc1b3e6f3a7ae8a525bed3879f19bc142d3 (diff)
Have separate callback mechanisms in file.c and capture.c; pass the
capture callbacks the capture_options * as its second argument in all cases. This makes it a bit clearer what arguments callbacks take, and means we can get rid of all global_capture_opts references in gtk/main_statusbar.c. Put the interface between gtk/main.c and gtk/main_statusbar.c into a private header. svn path=/trunk/; revision=25576
Diffstat (limited to 'capture.h')
-rw-r--r--capture.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/capture.h b/capture.h
index 79084bd833..955e2a5194 100644
--- a/capture.h
+++ b/capture.h
@@ -33,6 +33,26 @@
#include "capture_opts.h"
+typedef enum {
+ capture_cb_capture_prepared,
+ capture_cb_capture_update_started,
+ capture_cb_capture_update_continue,
+ capture_cb_capture_update_finished,
+ capture_cb_capture_fixed_started,
+ capture_cb_capture_fixed_continue,
+ capture_cb_capture_fixed_finished,
+ capture_cb_capture_stopping
+} capture_cbs;
+
+typedef void (*capture_callback_t) (gint event, capture_options *capture_opts,
+ gpointer user_data);
+
+extern void
+capture_callback_add(capture_callback_t func, gpointer user_data);
+
+extern void
+capture_callback_remove(capture_callback_t func);
+
/**
* Start a capture session.
*