6 * (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <epan/stat_groups.h>
19 #include "ws_symbol_export.h"
23 #endif /* __cplusplus */
25 typedef struct _funnel_ops_id_t funnel_ops_id_t; /* Opaque pointer to ops instance */
26 typedef struct _funnel_progress_window_t funnel_progress_window_t ;
27 typedef struct _funnel_text_window_t funnel_text_window_t ;
28 typedef struct _funnel_tree_window_t funnel_tree_window_t ; /* XXX Unused? */
29 typedef struct _funnel_node_t funnel_node_t ; /* XXX Unused? */
31 typedef void (*text_win_close_cb_t)(void*);
33 typedef void (*funnel_dlg_cb_t)(gchar** user_input, void* data);
35 typedef gboolean (*funnel_bt_cb_t)(funnel_text_window_t* tw, void* data);
37 typedef void (* funnel_menu_callback)(gpointer);
39 typedef struct _funnel_bt_t {
40 funnel_text_window_t* tw;
43 void (*free_fcn)(void*);
44 void (*free_data_fcn)(void*);
49 typedef struct _funnel_ops_t {
50 funnel_ops_id_t *ops_id;
51 funnel_text_window_t* (*new_text_window)(const char* label);
52 void (*set_text)(funnel_text_window_t* win, const char* text);
53 void (*append_text)(funnel_text_window_t* win, const char* text);
54 void (*prepend_text)(funnel_text_window_t* win, const char* text);
55 void (*clear_text)(funnel_text_window_t* win);
56 const char* (*get_text)(funnel_text_window_t* win);
57 void (*set_close_cb)(funnel_text_window_t* win, text_win_close_cb_t cb, void* data);
58 void (*set_editable)(funnel_text_window_t* win, gboolean editable);
59 void (*destroy_text_window)(funnel_text_window_t* win);
60 void (*add_button)(funnel_text_window_t* win, funnel_bt_t* cb, const char* label);
62 void (*new_dialog)(const gchar* title,
63 const gchar** fieldnames,
64 funnel_dlg_cb_t dlg_cb,
67 void (*close_dialogs)(void);
69 void (*logger)(const gchar *log_domain,
70 GLogLevelFlags log_level,
75 void (*retap_packets)(funnel_ops_id_t *ops_id);
76 void (*copy_to_clipboard)(GString *str);
78 const gchar * (*get_filter)(funnel_ops_id_t *ops_id);
79 void (*set_filter)(funnel_ops_id_t *ops_id, const char* filter);
80 void (*set_color_filter_slot)(guint8 flit_nr, const gchar* filter);
81 gboolean (*open_file)(funnel_ops_id_t *ops_id, const char* fname, const char* filter, char** error);
82 void (*reload_packets)(funnel_ops_id_t *ops_id);
83 void (*reload_lua_plugins)(funnel_ops_id_t *ops_id);
84 void (*apply_filter)(funnel_ops_id_t *ops_id);
86 gboolean (*browser_open_url)(const gchar *url);
87 void (*browser_open_data_file)(const gchar *filename);
89 struct progdlg* (*new_progress_window)(funnel_ops_id_t *ops_id, const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag);
90 void (*update_progress)(struct progdlg*, float pr, const gchar* task);
91 void (*destroy_progress_window)(struct progdlg*);
94 WS_DLL_PUBLIC const funnel_ops_t* funnel_get_funnel_ops(void);
95 WS_DLL_PUBLIC void funnel_set_funnel_ops(const funnel_ops_t*);
97 WS_DLL_PUBLIC void funnel_register_menu(const char *name,
98 register_stat_group_t group,
99 funnel_menu_callback callback,
100 gpointer callback_data,
102 void funnel_deregister_menus(void (*callback)(gpointer));
104 typedef void (*funnel_registration_cb_t)(const char *name,
105 register_stat_group_t group,
106 funnel_menu_callback callback,
107 gpointer callback_data,
109 typedef void (*funnel_deregistration_cb_t)(funnel_menu_callback callback);
111 WS_DLL_PUBLIC void funnel_register_all_menus(funnel_registration_cb_t r_cb);
112 WS_DLL_PUBLIC void funnel_reload_menus(funnel_deregistration_cb_t d_cb,
113 funnel_registration_cb_t r_cb);
115 extern void initialize_funnel_ops(void);
117 extern void funnel_dump_all_text_windows(void);
121 #endif /* __cplusplus */
123 #endif /* __FUNNEL_H__ */