69c19f76ff544988b9cd296b24f3b0e760c6eb9d
[metze/wireshark/wip.git] / ui / 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __GTK_STAT_MENU_H__
26 #define __GTK_STAT_MENU_H__
27
28 #include <epan/proto.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 /** @file
35  * Add a new menu item for a stat.
36  */
37
38 const char *
39 stat_group_name(register_stat_group_t group);
40
41 /**
42  * XXX TODO: Rewrite me
43  * NOTE comments refere to old menus.c implementation.
44  *
45  * Same as register_stat_menu_item() but with optional stock item.
46  *
47  * @param name the menu label
48  *
49  * @param stock_id the stock_id (icon) to show, or NULL
50  *
51  * @param callback gets called when the menu item is selected; it should do
52  * the work of creating the stat window.
53  *
54  * @param selected_packet_enabled gets called by set_menus_for_selected_packet();
55  * it's passed a pointer to the "frame_data" structure for the current frame,
56  * if any, and to the "epan_dissect_t" structure for that frame, if any, and
57  * should return TRUE if the stat will work now (which might depend on whether
58  * a frame is selected and, if one is, on the frame) and FALSE if not.
59  *
60  * @param selected_tree_row_enabled gets called by
61  * set_menus_for_selected_tree_row(); it's passed a pointer to the
62  * "field_info" structure for the currently selected field, if any,
63  * and should return TRUE if the stat will work now (which might depend on
64  * whether a tree row is selected and, if one is, on the tree row) and
65  * FALSE if not.
66  *
67  * @param callback_data data for callback function
68  */
69 void register_menu_bar_menu_items(
70     const char   *gui_path,
71     const char   *name,
72     const gchar  *stock_id,
73     const char   *label,
74     const char   *accelerator,
75     const gchar  *tooltip,
76     gpointer     callback,
77     gpointer     callback_data,
78     gboolean     enabled,
79     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
80     gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data));
81
82 void eth_endpoints_cb(GtkAction *action, gpointer user_data);
83 void fc_endpoints_cb(GtkAction *action, gpointer user_data);
84 void fddi_endpoints_cb(GtkAction *action, gpointer user_data);
85 void ip_endpoints_cb(GtkAction *action, gpointer user_data);
86 void ipv6_endpoints_cb(GtkAction *action, gpointer user_data);
87 void ipx_endpoints_cb(GtkAction *action, gpointer user_data);
88 void jxta_conversation_cb(GtkAction *action, gpointer user_data);
89 void ncp_endpoints_cb(GtkAction *action, gpointer user_data);
90 void rsvp_endpoints_cb(GtkAction *action, gpointer user_data);
91 void sctp_conversation_cb(GtkAction *action, gpointer user_data);
92 void tcpip_conversation_cb(GtkAction *action, gpointer user_data);
93 void tr_conversation_cb(GtkAction *action, gpointer user_data);
94 void udpip_conversation_cb(GtkAction *action, gpointer user_data);
95 void usb_endpoints_cb(GtkAction *action, gpointer user_data);
96 void wlan_endpoints_cb(GtkAction *action, gpointer user_data);
97
98 void gtk_eth_hostlist_cb(GtkAction *action, gpointer user_data);
99 void gtk_fc_hostlist_cb(GtkAction *action, gpointer user_data);
100 void gtk_fddi_hostlist_cb(GtkAction *action, gpointer user_data);
101 void gtk_ip_hostlist_cb(GtkAction *action, gpointer user_data);
102 void gtk_ipv6_hostlist_cb(GtkAction *action, gpointer user_data);
103 void gtk_ipx_hostlist_cb(GtkAction *action, gpointer user_data);
104 void gtk_jxta_hostlist_cb(GtkAction *action, gpointer user_data);
105 void gtk_ncp_hostlist_cb(GtkAction *action, gpointer user_data);
106 void gtk_rsvp_hostlist_cb(GtkAction *action, gpointer user_data);
107 void gtk_sctp_hostlist_cb(GtkAction *action, gpointer user_data);
108 void gtk_tcpip_hostlist_cb(GtkAction *action, gpointer user_data);
109 void gtk_tr_hostlist_cb(GtkAction *action, gpointer user_data);
110 void gtk_udpip_hostlist_cb(GtkAction *action, gpointer user_data);
111 void gtk_usb_hostlist_cb(GtkAction *action, gpointer user_data);
112 void gtk_wlan_hostlist_cb(GtkAction *action, gpointer user_data);
113
114 void gtk_rpcstat_cb(GtkAction *action, gpointer user_data);
115 void gtk_comparestat_cb(GtkAction *action, gpointer user_data);
116
117 void flow_graph_launch(GtkAction *action, gpointer user_data);
118
119 void iax2_analysis_cb(GtkAction *action, gpointer user_data);
120 void mtp3_stat_gtk_cb(GtkAction *action, gpointer user_data);
121 void mtp3_sum_gtk_sum_cb(GtkAction *action, gpointer user_data);
122 void rtp_analysis_cb(GtkAction *action, gpointer user_data);
123 void rtpstream_launch(GtkAction *action, gpointer user_data);
124 void sctp_analyse_start(GtkAction *action, gpointer user_data);
125 void sctp_stat_start(GtkAction *action, gpointer user_data);
126
127 void gui_iostat_cb(GtkAction *action, gpointer user_data);
128
129 void voip_calls_launch(GtkAction *action, gpointer user_data);
130
131 void ansi_a_stat_gtk_bsmap_cb(GtkAction *action, gpointer user_data);
132 void ansi_a_stat_gtk_dtap_cb(GtkAction *action, gpointer user_data);
133 void ansi_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
134
135 void gsm_a_stat_gtk_bssmap_cb(GtkAction *action, gpointer user_data);
136 void gsm_a_stat_gtk_dtap_mm_cb(GtkAction *action, gpointer user_data);
137 void gsm_a_stat_gtk_dtap_rr_cb(GtkAction *action, gpointer user_data);
138 void gsm_a_stat_gtk_dtap_cc_cb(GtkAction *action, gpointer user_data);
139 void gsm_a_stat_gtk_dtap_gmm_cb(GtkAction *action, gpointer user_data);
140 void gsm_a_stat_gtk_dtap_sms_cb(GtkAction *action, gpointer user_data);
141 void gsm_a_stat_gtk_dtap_sm_cb(GtkAction *action, gpointer user_data);
142 void gsm_a_stat_gtk_dtap_ss_cb(GtkAction *action, gpointer user_data);
143 void gsm_a_stat_gtk_dtap_tp_cb(GtkAction *action, gpointer user_data);
144 void gsm_a_stat_gtk_sacch_rr_cb(GtkAction *action, gpointer user_data);
145
146 void gsm_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
147 void gsm_map_stat_gtk_sum_cb(GtkAction *action, gpointer user_data);
148
149 void gtk_dcerpcstat_cb(GtkAction *action, gpointer user_data);
150 void rlc_lte_graph_cb(GtkAction *action, gpointer user_data);
151
152 void rlc_lte_graph_known_channel_launch(guint16 ueid, guint8 rlcMode,
153                                         guint16 channelType, guint16 channelId,
154                                         guint8 direction);
155
156 void gtk_stats_tree_cb(GtkAction *action, gpointer user_data);
157
158 void tcp_graph_cb(GtkAction *action, gpointer user_data);
159 void tcp_graph_known_stream_launch(address *src_address, guint16 src_port,
160                                    address *dst_address, guint16 dst_port);
161
162
163 void gtk_rpcprogs_cb(GtkWidget *w, gpointer data);
164 void mcaststream_launch(GtkAction *action, gpointer user_data);
165 void wlanstat_launch(GtkAction *action, gpointer user_data);
166
167 /** Adds a callback to be executed when the menubar is ready to have menus and items added to it */
168 void ws_add_build_menubar_items_callback(gpointer callback);
169
170 #ifdef __cplusplus
171 }
172 #endif /* __cplusplus */
173
174 #endif /* __GTK_STAT_MENU_H__ */