Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

funnel.h
1 /*
2 * funnel.h
3 *
4 * EPAN's GUI mini-API
5 *
6 * (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
7 *
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 */
14 #ifndef __FUNNEL_H__
15 #define __FUNNEL_H__
16
17 #include <glib.h>
18 #include <epan/stat_groups.h>
19 #include "ws_symbol_export.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24
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? */
30
31 typedef void (*text_win_close_cb_t)(void*);
32
33 typedef void (*funnel_dlg_cb_t)(gchar** user_input, void* data);
34
35 typedef gboolean (*funnel_bt_cb_t)(funnel_text_window_t* tw, void* data);
36
37 typedef void (* funnel_menu_callback)(gpointer);
38
39 typedef struct _funnel_bt_t {
40 funnel_text_window_t* tw;
41 funnel_bt_cb_t func;
42 void* data;
43 void (*free_fcn)(void*);
44 void (*free_data_fcn)(void*);
45 } funnel_bt_t;
46
47 struct progdlg;
48
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);
61
62 void (*new_dialog)(const gchar* title,
63 const gchar** fieldnames,
64 funnel_dlg_cb_t dlg_cb,
65 void* data);
66
67 void (*close_dialogs)(void);
68
69 void (*logger)(const gchar *log_domain,
70 GLogLevelFlags log_level,
71 const gchar *message,
72 gpointer user_data);
73
74
75 void (*retap_packets)(funnel_ops_id_t *ops_id);
76 void (*copy_to_clipboard)(GString *str);
77
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);
85
86 gboolean (*browser_open_url)(const gchar *url);
87 void (*browser_open_data_file)(const gchar *filename);
88
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*);
92 } funnel_ops_t;
93
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*);
96
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,
101 gboolean retap);
102 void funnel_deregister_menus(void (*callback)(gpointer));
103
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,
108 gboolean retap);
109 typedef void (*funnel_deregistration_cb_t)(funnel_menu_callback callback);
110
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);
114
115 extern void initialize_funnel_ops(void);
116
117 extern void funnel_dump_all_text_windows(void);
118
119 #ifdef __cplusplus
120 }
121 #endif /* __cplusplus */
122
123 #endif /* __FUNNEL_H__ */
_funnel_ops_t
Definition: funnel.h:49
stat_groups.h
progdlg
Definition: progress_frame.h:33
_funnel_text_window_t
Definition: tap-funnel.c:25
register_stat_group_t
register_stat_group_t
Definition: stat_groups.h:45
_funnel_bt_t
Definition: funnel.h:39