packet-ldap: fix regression for SASL handling
[wireshark-sm.git] / epan / funnel.h
blob8b9c993be937095fed832b2253661505fb8a265e
1 /*
2 * funnel.h
4 * EPAN's GUI mini-API
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
14 #ifndef __FUNNEL_H__
15 #define __FUNNEL_H__
17 #include <glib.h>
18 #include <epan/stat_groups.h>
19 #include "ws_symbol_export.h"
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
25 typedef struct _funnel_ops_id_t funnel_ops_id_t; /* Opaque pointer to ops instance */
26 typedef struct _funnel_text_window_t funnel_text_window_t ;
28 typedef void (*text_win_close_cb_t)(void*);
30 typedef void (*funnel_dlg_cb_t)(gchar** user_input, void* data);
31 typedef void (*funnel_dlg_cb_data_free_t)(void* data);
33 typedef gboolean (*funnel_bt_cb_t)(funnel_text_window_t* tw, void* data);
35 typedef void (* funnel_menu_callback)(gpointer);
36 typedef void (* funnel_menu_callback_data_free)(gpointer);
38 typedef struct _funnel_bt_t {
39 funnel_text_window_t* tw;
40 funnel_bt_cb_t func;
41 void* data;
42 void (*free_fcn)(void*);
43 void (*free_data_fcn)(void*);
44 } funnel_bt_t;
46 struct progdlg;
48 typedef struct _funnel_ops_t {
49 funnel_ops_id_t *ops_id;
50 funnel_text_window_t* (*new_text_window)(const char* label);
51 void (*set_text)(funnel_text_window_t* win, const char* text);
52 void (*append_text)(funnel_text_window_t* win, const char* text);
53 void (*prepend_text)(funnel_text_window_t* win, const char* text);
54 void (*clear_text)(funnel_text_window_t* win);
55 const char* (*get_text)(funnel_text_window_t* win);
56 void (*set_close_cb)(funnel_text_window_t* win, text_win_close_cb_t cb, void* data);
57 void (*set_editable)(funnel_text_window_t* win, gboolean editable);
58 void (*destroy_text_window)(funnel_text_window_t* win);
59 void (*add_button)(funnel_text_window_t* win, funnel_bt_t* cb, const char* label);
61 void (*new_dialog)(const gchar* title,
62 const gchar** fieldnames,
63 funnel_dlg_cb_t dlg_cb,
64 void* data,
65 funnel_dlg_cb_data_free_t dlg_cb_data_free);
67 void (*close_dialogs)(void);
69 void (*logger)(const gchar *log_domain,
70 GLogLevelFlags log_level,
71 const gchar *message,
72 gpointer user_data);
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 gchar * (*get_color_filter_slot)(guint8 filt_nr);
81 void (*set_color_filter_slot)(guint8 filt_nr, const gchar* filter);
82 gboolean (*open_file)(funnel_ops_id_t *ops_id, const char* fname, const char* filter, char** error);
83 void (*reload_packets)(funnel_ops_id_t *ops_id);
84 void (*reload_lua_plugins)(funnel_ops_id_t *ops_id);
85 void (*apply_filter)(funnel_ops_id_t *ops_id);
87 gboolean (*browser_open_url)(const gchar *url);
88 void (*browser_open_data_file)(const gchar *filename);
90 struct progdlg* (*new_progress_window)(funnel_ops_id_t *ops_id, const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag);
91 void (*update_progress)(struct progdlg*, float pr, const gchar* task);
92 void (*destroy_progress_window)(struct progdlg*);
93 } funnel_ops_t;
95 WS_DLL_PUBLIC const funnel_ops_t* funnel_get_funnel_ops(void);
96 WS_DLL_PUBLIC void funnel_set_funnel_ops(const funnel_ops_t*);
98 WS_DLL_PUBLIC void funnel_register_menu(const char *name,
99 register_stat_group_t group,
100 funnel_menu_callback callback,
101 gpointer callback_data,
102 funnel_menu_callback_data_free callback_data_free,
103 gboolean retap);
104 void funnel_deregister_menus(void (*callback)(gpointer));
106 typedef void (*funnel_registration_cb_t)(const char *name,
107 register_stat_group_t group,
108 funnel_menu_callback callback,
109 gpointer callback_data,
110 gboolean retap);
111 typedef void (*funnel_deregistration_cb_t)(funnel_menu_callback callback);
113 WS_DLL_PUBLIC void funnel_register_all_menus(funnel_registration_cb_t r_cb);
114 WS_DLL_PUBLIC void funnel_reload_menus(funnel_deregistration_cb_t d_cb,
115 funnel_registration_cb_t r_cb);
116 WS_DLL_PUBLIC void funnel_cleanup(void);
118 extern void initialize_funnel_ops(void);
120 extern void funnel_dump_all_text_windows(void);
122 #ifdef __cplusplus
124 #endif /* __cplusplus */
126 #endif /* __FUNNEL_H__ */