Handle NAL-unit start code correctly.
[metze/wireshark/wip.git] / gtk / expert_comp_table.h
1 /* expert_comp_table.h
2  * expert_comp_table   2005 Greg Morris
3  * Portions copied from service_response_time_table.h by Ronnie Sahlberg 
4  * Helper routines common to all composite expert statistics
5  * tap.
6  *
7  * $Id$
8  *
9  * Wireshark - Network traffic analyzer
10  * By Gerald Combs <gerald@wireshark.org>
11  * Copyright 1998 Gerald Combs
12  * 
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  * 
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  * 
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #include <gtk/gtk.h>
29 #include <epan/expert.h>
30
31 /** @file
32  *  Helper routines common to all error statistics tap.
33  */
34
35 /** Procedure data */
36 typedef struct _error_procedure_t {
37         char    *entries[4];       /**< column entries */
38     char    *fvalue_value;     /**< filter value */
39     GtkTreeIter      iter;
40     guint16 count;             /**< number of expert items encountered
41                                     for this entry */
42 } error_procedure_t;
43
44 /** Statistics table */
45 typedef struct _error_equiv_table {
46         GtkWidget *scrolled_window;         /**< window widget */
47     GtkTreeSelection *select;           /**< item selected */
48     GtkTreeView      *tree_view;        /**< Tree view */
49         GtkWidget *menu;                    /**< context menu */
50         guint16 num_procs;                  /**< number of elements on procedures array */
51         error_procedure_t *procedures;      /**< the procedures array */
52 }error_equiv_table;
53
54 typedef struct _expert_tapdata_s {
55         GtkWidget       *win;
56         GtkWidget       *scrolled_window;
57         GtkWidget       *label;
58         GList           *all_events;
59         GList           *new_events;
60         guint32         disp_events;
61         guint32         chat_events;
62         guint32         note_events;
63         guint32         warn_events;
64         guint32         error_events;
65         int                     severity_report_level;
66 } expert_tapdata_t;
67
68 /** Init an err table data structure.
69  *
70  * @param err the err table to init
71  * @param num_procs number of procedures
72  * @param vbox the corresponding GtkVBox to fill in
73  */
74 void init_error_table(error_equiv_table *err, guint16 num_procs, GtkWidget *vbox);
75
76 /** Init an err table row data structure.
77  *
78  * @param err the err table
79  * @param expert data
80  */
81 void init_error_table_row(error_equiv_table *err, const expert_info_t *expert_data);
82
83 /** Add err response to table row data. This will not draw the data!
84  *
85  * @param err the err table
86  * @param expert data
87  */
88 void add_error_table_data(error_equiv_table *err, const expert_info_t *expert_data);
89
90 /** Draw the err table data.
91  *
92  * @param err the err table
93  */
94 void draw_error_table_data(error_equiv_table *err);
95
96 /** Reset the err table data.
97  *
98  * @param err the err table
99  */
100 void reset_error_table_data(error_equiv_table *err);
101
102 /** Free the err table data.
103  *
104  * @param err the err table
105  */
106 void free_error_table_data(error_equiv_table *err);
107
108 /* Function is located in expert_dlg.c */
109 extern void expert_dlg_init_table(expert_tapdata_t * etd, GtkWidget *vbox);
110 extern void expert_dlg_reset(void *tapdata);
111 extern int expert_dlg_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pointer);
112 extern void expert_dlg_draw(void *data);