diff options
Diffstat (limited to 'epan/funnel.h')
-rw-r--r-- | epan/funnel.h | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/epan/funnel.h b/epan/funnel.h index 3d66f54c63..b7e2ac1d01 100644 --- a/epan/funnel.h +++ b/epan/funnel.h @@ -23,17 +23,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef _FUNNEL_H -#define _FUNNEL_H +#ifndef __FUNNEL_H__ +#define __FUNNEL_H__ #include <glib.h> #include <epan/stat_groups.h> #include "ws_symbol_export.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +typedef struct _funnel_ops_id_t funnel_ops_id_t; /* Opaque pointer to ops instance */ typedef struct _funnel_progress_window_t funnel_progress_window_t ; typedef struct _funnel_text_window_t funnel_text_window_t ; -typedef struct _funnel_tree_window_t funnel_tree_window_t ; -typedef struct _funnel_node_t funnel_node_t ; +typedef struct _funnel_tree_window_t funnel_tree_window_t ; /* XXX Unused? */ +typedef struct _funnel_node_t funnel_node_t ; /* XXX Unused? */ typedef void (*text_win_close_cb_t)(void*); @@ -49,17 +54,20 @@ typedef struct _funnel_bt_t { void (*free_data_fcn)(void*); } funnel_bt_t; +struct progdlg; + typedef struct _funnel_ops_t { - funnel_text_window_t* (*new_text_window)(const gchar* label); - void (*set_text)(funnel_text_window_t* win, const gchar* text); - void (*append_text)(funnel_text_window_t* win, const gchar* text); - void (*prepend_text)(funnel_text_window_t* win, const gchar* text); + funnel_ops_id_t *ops_id; + funnel_text_window_t* (*new_text_window)(const char* label); + void (*set_text)(funnel_text_window_t* win, const char* text); + void (*append_text)(funnel_text_window_t* win, const char* text); + void (*prepend_text)(funnel_text_window_t* win, const char* text); void (*clear_text)(funnel_text_window_t* win); - const gchar* (*get_text)(funnel_text_window_t* win); + const char* (*get_text)(funnel_text_window_t* win); void (*set_close_cb)(funnel_text_window_t* win, text_win_close_cb_t cb, void* data); void (*set_editable)(funnel_text_window_t* win, gboolean editable); void (*destroy_text_window)(funnel_text_window_t* win); - void (*add_button)(funnel_text_window_t* win, funnel_bt_t* cb, const gchar* label); + void (*add_button)(funnel_text_window_t* win, funnel_bt_t* cb, const char* label); void (*new_dialog)(const gchar* title, const gchar** fieldnames, @@ -73,22 +81,22 @@ typedef struct _funnel_ops_t { gpointer user_data); - void (*retap_packets)(void); + void (*retap_packets)(funnel_ops_id_t *ops_id); void (*copy_to_clipboard)(GString *str); - gchar * (*get_filter)(void); - void (*set_filter)(const char*); + const gchar * (*get_filter)(funnel_ops_id_t *ops_id); + void (*set_filter)(funnel_ops_id_t *ops_id, const char* filter); void (*set_color_filter_slot)(guint8 flit_nr, const gchar* filter); - gboolean (*open_file)(const char* fname, const char* filter, char** error); - void (*reload)(void); - void (*apply_filter)(void); + gboolean (*open_file)(funnel_ops_id_t *ops_id, const char* fname, const char* filter, char** error); + void (*reload)(funnel_ops_id_t *ops_id); + void (*apply_filter)(funnel_ops_id_t *ops_id); gboolean (*browser_open_url)(const gchar *url); void (*browser_open_data_file)(const gchar *filename); - funnel_progress_window_t* (*new_progress_window)(const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag); - void (*update_progress)(funnel_progress_window_t*, float pr, const gchar* task); - void (*destroy_progress_window)(funnel_progress_window_t*); + struct progdlg* (*new_progress_window)(funnel_ops_id_t *ops_id, const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag); + void (*update_progress)(struct progdlg*, float pr, const gchar* task); + void (*destroy_progress_window)(struct progdlg*); } funnel_ops_t; WS_DLL_PUBLIC const funnel_ops_t* funnel_get_funnel_ops(void); @@ -112,4 +120,8 @@ extern void initialize_funnel_ops(void); extern void funnel_dump_all_text_windows(void); -#endif +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __FUNNEL_H__ */ |