Do case insensitive search for lua scripts to load.
[obnox/wireshark/wip.git] / gtk / gui_stat_menu.h
1 /* gui_stat_menu.h
2  * GTK+-specific menu definitions for use by stats
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __GTK_STAT_MENU_H__
26 #define __GTK_STAT_MENU_H__
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /** @file
33  * Add a new menu item for a stat.
34  */
35
36 /**
37  * Add a new menu item for a stat.
38  * This must be called after we've created the main menu, so it can't
39  * be called from the routine that registers stats - we have to introduce
40  * another per-stat registration routine.
41  *
42  * @param name the menu label
43  *
44  * @param group the menu group this stat should be registered to
45  *
46  * @param callback gets called when the menu item is selected; it should do
47  * the work of creating the stat window.
48  *
49  * @param selected_packet_enabled gets called by set_menus_for_selected_packet();
50  * it's passed a pointer to the "frame_data" structure for the current frame,
51  * if any, and to the "epan_dissect_t" structure for that frame, if any, and
52  * should return TRUE if the stat will work now (which might depend on whether
53  * a frame is selected and, if one is, on the frame) and FALSE if not.
54  *
55  * @param selected_tree_row_enabled gets called by
56  * set_menus_for_selected_tree_row(); it's passed a pointer to the
57  * "field_info" structure for the currently selected field, if any,
58  * and should return TRUE if the stat will work now (which might depend on
59  * whether a tree row is selected and, if one is, on the tree row) and
60  * FALSE if not.
61  *
62  * @param callback_data data for callback function
63  */
64 #ifdef MAIN_MENU_USE_UIMANAGER
65 #else
66 void
67 register_stat_menu_item(
68     const char *name,
69     register_stat_group_t group,
70     gpointer callback,
71     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
72     gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data),
73     gpointer callback_data);
74 #endif
75
76 /**
77  * XXX TODO: Rewrite me
78  * NOTE comments refere to old menus.c implementation.
79  *
80  * Same as register_stat_menu_item() but with optional stock item.
81  *
82  * @param name the menu label
83  *
84  * @param group the menu group this stat should be registered to
85  *
86  * @param stock_id the stock_id (icon) to show, or NULL
87  *
88  * @param callback gets called when the menu item is selected; it should do
89  * the work of creating the stat window.
90  *
91  * @param selected_packet_enabled gets called by set_menus_for_selected_packet();
92  * it's passed a pointer to the "frame_data" structure for the current frame,
93  * if any, and to the "epan_dissect_t" structure for that frame, if any, and
94  * should return TRUE if the stat will work now (which might depend on whether
95  * a frame is selected and, if one is, on the frame) and FALSE if not.
96  *
97  * @param selected_tree_row_enabled gets called by
98  * set_menus_for_selected_tree_row(); it's passed a pointer to the
99  * "field_info" structure for the currently selected field, if any,
100  * and should return TRUE if the stat will work now (which might depend on
101  * whether a tree row is selected and, if one is, on the tree row) and
102  * FALSE if not.
103  *
104  * @param callback_data data for callback function
105  */
106 #ifdef MAIN_MENU_USE_UIMANAGER
107 void register_lua_menu_bar_menu_items(
108     const char   *gui_path,
109     const char   *name,
110     const gchar  *stock_id,
111     const char   *label,
112     const char   *accelerator,
113     const gchar  *tooltip,
114     gpointer     callback,
115     gpointer     callback_data,
116     gboolean     enabled,
117     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
118     gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data));
119
120 void eth_endpoints_cb(GtkAction *action, gpointer user_data);
121 void fc_endpoints_cb(GtkAction *action, gpointer user_data);
122 void fddi_endpoints_cb(GtkAction *action, gpointer user_data);
123 void ip_endpoints_cb(GtkAction *action, gpointer user_data);
124 void ipv6_endpoints_cb(GtkAction *action, gpointer user_data);
125 void ipx_endpoints_cb(GtkAction *action, gpointer user_data);
126 void jxta_conversation_cb(GtkAction *action, gpointer user_data);
127 void ncp_endpoints_cb(GtkAction *action, gpointer user_data);
128 void rsvp_endpoints_cb(GtkAction *action, gpointer user_data);
129 void sctp_conversation_cb(GtkAction *action, gpointer user_data);
130 void tcpip_conversation_cb(GtkAction *action, gpointer user_data);
131 void tr_conversation_cb(GtkAction *action, gpointer user_data);
132 void udpip_conversation_cb(GtkAction *action, gpointer user_data);
133 void usb_endpoints_cb(GtkAction *action, gpointer user_data);
134 void wlan_endpoints_cb(GtkAction *action, gpointer user_data);
135
136 void gtk_eth_hostlist_cb(GtkAction *action, gpointer user_data);
137 void gtk_fc_hostlist_cb(GtkAction *action, gpointer user_data);
138 void gtk_fddi_hostlist_cb(GtkAction *action, gpointer user_data);
139 void gtk_ip_hostlist_cb(GtkAction *action, gpointer user_data);
140 void gtk_ipv6_hostlist_cb(GtkAction *action, gpointer user_data);
141 void gtk_ipx_hostlist_cb(GtkAction *action, gpointer user_data);
142 void gtk_jxta_hostlist_cb(GtkAction *action, gpointer user_data);
143 void gtk_ncp_hostlist_cb(GtkAction *action, gpointer user_data);
144 void gtk_rsvp_hostlist_cb(GtkAction *action, gpointer user_data);
145 void gtk_sctp_hostlist_cb(GtkAction *action, gpointer user_data);
146 void gtk_tcpip_hostlist_cb(GtkAction *action, gpointer user_data);
147 void gtk_tr_hostlist_cb(GtkAction *action, gpointer user_data);
148 void gtk_udpip_hostlist_cb(GtkAction *action, gpointer user_data);
149 void gtk_usb_hostlist_cb(GtkAction *action, gpointer user_data);
150 void gtk_wlan_hostlist_cb(GtkAction *action, gpointer user_data);
151
152 void gtk_rpcstat_cb(GtkAction *action, gpointer user_data);
153 void bootp_dhcp_stat_cb(GtkAction *action, gpointer user_data);
154 void gtk_comparestat_cb(GtkAction *action, gpointer user_data);
155
156 void flow_graph_launch(GtkAction *action, gpointer user_data);
157
158 void iax2_analysis_cb(GtkAction *action, gpointer user_data);
159 void mtp3_stat_gtk_cb(GtkAction *action, gpointer user_data);
160 void mtp3_sum_gtk_sum_cb(GtkAction *action, gpointer user_data);
161 void rtp_analysis_cb(GtkAction *action, gpointer user_data);
162 void rtpstream_launch(GtkAction *action, gpointer user_data);
163 void sctp_analyse_start(GtkAction *action, gpointer user_data);
164 void sctp_chunk_counter_cb(GtkAction *action, gpointer user_data);
165 void sctp_stat_start(GtkAction *action, gpointer user_data);
166
167 void gui_iostat_cb(GtkAction *action, gpointer user_data);
168
169 void voip_calls_launch(GtkAction *action, gpointer user_data);
170
171 void ansi_a_stat_gtk_bsmap_cb(GtkAction *action, gpointer user_data);
172 void ansi_a_stat_gtk_dtap_cb(GtkAction *action, gpointer user_data);
173 void ansi_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
174
175 void camel_counter_cb(GtkAction *action, gpointer user_data);
176 void h225_counter_cb(GtkAction *action, gpointer user_data);
177 void gsm_a_stat_gtk_bssmap_cb(GtkAction *action, gpointer user_data);
178 void gsm_a_stat_gtk_dtap_mm_cb(GtkAction *action, gpointer user_data);
179 void gsm_a_stat_gtk_dtap_rr_cb(GtkAction *action, gpointer user_data);
180 void gsm_a_stat_gtk_dtap_cc_cb(GtkAction *action, gpointer user_data);
181 void gsm_a_stat_gtk_dtap_gmm_cb(GtkAction *action, gpointer user_data);
182 void gsm_a_stat_gtk_dtap_sms_cb(GtkAction *action, gpointer user_data);
183 void gsm_a_stat_gtk_dtap_sm_cb(GtkAction *action, gpointer user_data);
184 void gsm_a_stat_gtk_dtap_ss_cb(GtkAction *action, gpointer user_data);
185 void gsm_a_stat_gtk_dtap_tp_cb(GtkAction *action, gpointer user_data);
186 void gsm_a_stat_gtk_sacch_rr_cb(GtkAction *action, gpointer user_data);
187 void mac_lte_stat_cb(GtkAction *action, gpointer user_data);
188 void rlc_lte_stat_cb(GtkAction *action, gpointer user_data);
189 void sipstat_cb(GtkAction *action, gpointer user_data);
190 void wsp_stat_cb(GtkAction *action, gpointer user_data);
191
192 void gsm_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
193 void gsm_map_stat_gtk_sum_cb(GtkAction *action, gpointer user_data);
194
195 void afp_srt_stat_cb(GtkAction *action, gpointer user_data);
196 void camel_srt_cb(GtkAction *action, gpointer user_data);
197 void gtk_dcerpcstat_cb(GtkAction *action, gpointer user_data);
198 void diameter_srt_cb(GtkAction *action, gpointer user_data);
199 void fc_srt_cb(GtkAction *action, gpointer user_data);
200 void gtp_srt_cb(GtkAction *action, gpointer user_data);
201 void h225_srt_cb(GtkAction *action, gpointer user_data);
202 void ldap_srt_cb(GtkAction *action, gpointer user_data);
203 void megaco_srt_cb(GtkAction *action, gpointer user_data);
204 void mgcp_srt_cb(GtkAction *action, gpointer user_data);
205 void ncp_srt_cb(GtkAction *action, gpointer user_data);
206 void radius_srt_cb(GtkAction *action, gpointer user_data);
207 void scsi_srt_cb(GtkAction *action, gpointer user_data);
208 void smb2_srt_cb(GtkAction *action, gpointer user_data);
209 void smb_srt_cb(GtkAction *action, gpointer user_data);
210
211 void gtk_stats_tree_cb(GtkAction *action, gpointer user_data);
212
213 void tcp_graph_cb (GtkAction *action, gpointer user_data);
214 gboolean tcp_graph_selected_packet_enabled(frame_data *current_frame, epan_dissect_t *edt, gpointer callback_data _U_);
215
216 void gtk_rpcprogs_cb(GtkWidget *w, gpointer data);
217 void mcaststream_launch(GtkAction *action, gpointer user_data);
218 void wlanstat_launch(GtkAction *action, gpointer user_data);
219
220 #else
221 extern void register_stat_menu_item_stock(
222     const char *name,
223     register_stat_group_t group,
224     const gchar *stock_id,
225     gpointer callback,
226     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
227     gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data),
228     gpointer callback_data);
229 #endif
230
231 #ifdef __cplusplus
232 }
233 #endif /* __cplusplus */
234
235 #endif /* __GTK_STAT_MENU_H__ */