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 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/stat_groups.h>
31 #include "ws_symbol_export.h"
35 #endif /* __cplusplus */
37 typedef struct _funnel_ops_id_t funnel_ops_id_t; /* Opaque pointer to ops instance */
38 typedef struct _funnel_progress_window_t funnel_progress_window_t ;
39 typedef struct _funnel_text_window_t funnel_text_window_t ;
40 typedef struct _funnel_tree_window_t funnel_tree_window_t ; /* XXX Unused? */
41 typedef struct _funnel_node_t funnel_node_t ; /* XXX Unused? */
43 typedef void (*text_win_close_cb_t)(void*);
45 typedef void (*funnel_dlg_cb_t)(gchar** user_input, void* data);
47 typedef gboolean (*funnel_bt_cb_t)(funnel_text_window_t* tw, void* data);
49 typedef void (* funnel_menu_callback)(gpointer);
51 typedef struct _funnel_bt_t {
52 funnel_text_window_t* tw;
55 void (*free_fcn)(void*);
56 void (*free_data_fcn)(void*);
61 typedef struct _funnel_ops_t {
62 funnel_ops_id_t *ops_id;
63 funnel_text_window_t* (*new_text_window)(const char* label);
64 void (*set_text)(funnel_text_window_t* win, const char* text);
65 void (*append_text)(funnel_text_window_t* win, const char* text);
66 void (*prepend_text)(funnel_text_window_t* win, const char* text);
67 void (*clear_text)(funnel_text_window_t* win);
68 const char* (*get_text)(funnel_text_window_t* win);
69 void (*set_close_cb)(funnel_text_window_t* win, text_win_close_cb_t cb, void* data);
70 void (*set_editable)(funnel_text_window_t* win, gboolean editable);
71 void (*destroy_text_window)(funnel_text_window_t* win);
72 void (*add_button)(funnel_text_window_t* win, funnel_bt_t* cb, const char* label);
74 void (*new_dialog)(const gchar* title,
75 const gchar** fieldnames,
76 funnel_dlg_cb_t dlg_cb,
79 void (*close_dialogs)(void);
81 void (*logger)(const gchar *log_domain,
82 GLogLevelFlags log_level,
87 void (*retap_packets)(funnel_ops_id_t *ops_id);
88 void (*copy_to_clipboard)(GString *str);
90 const gchar * (*get_filter)(funnel_ops_id_t *ops_id);
91 void (*set_filter)(funnel_ops_id_t *ops_id, const char* filter);
92 void (*set_color_filter_slot)(guint8 flit_nr, const gchar* filter);
93 gboolean (*open_file)(funnel_ops_id_t *ops_id, const char* fname, const char* filter, char** error);
94 void (*reload_packets)(funnel_ops_id_t *ops_id);
95 void (*reload_lua_plugins)(funnel_ops_id_t *ops_id);
96 void (*apply_filter)(funnel_ops_id_t *ops_id);
98 gboolean (*browser_open_url)(const gchar *url);
99 void (*browser_open_data_file)(const gchar *filename);
101 struct progdlg* (*new_progress_window)(funnel_ops_id_t *ops_id, const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag);
102 void (*update_progress)(struct progdlg*, float pr, const gchar* task);
103 void (*destroy_progress_window)(struct progdlg*);
106 WS_DLL_PUBLIC const funnel_ops_t* funnel_get_funnel_ops(void);
107 WS_DLL_PUBLIC void funnel_set_funnel_ops(const funnel_ops_t*);
109 WS_DLL_PUBLIC void funnel_register_menu(const char *name,
110 register_stat_group_t group,
111 funnel_menu_callback callback,
112 gpointer callback_data,
114 void funnel_deregister_menus(void (*callback)(gpointer));
116 typedef void (*funnel_registration_cb_t)(const char *name,
117 register_stat_group_t group,
118 funnel_menu_callback callback,
119 gpointer callback_data,
121 typedef void (*funnel_deregistration_cb_t)(funnel_menu_callback callback);
123 WS_DLL_PUBLIC void funnel_register_all_menus(funnel_registration_cb_t r_cb);
124 WS_DLL_PUBLIC void funnel_reload_menus(funnel_deregistration_cb_t d_cb,
125 funnel_registration_cb_t r_cb);
127 extern void initialize_funnel_ops(void);
129 extern void funnel_dump_all_text_windows(void);
133 #endif /* __cplusplus */
135 #endif /* __FUNNEL_H__ */