Use Frame_data also in graph_analysis_item_t, this should ultimately
[obnox/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 #ifndef __EXPERT_COMP_TABLE_H__
29 #define __EXPERT_COMP_TABLE_H__
30
31 #include <gtk/gtk.h>
32 #include <epan/expert.h>
33
34 typedef struct expert_tapdata_s expert_tapdata_t;
35
36 /** @file
37  *  Helper routines common to all error statistics tap.
38  */
39
40 /** Procedure data */
41 typedef struct _error_procedure_t {
42         char    *entries[2];       /**< column entries */
43     char    *fvalue_value;     /**< filter value */
44     GtkTreeIter      iter;
45     guint count;             /**< number of expert items encountered
46                                     for this entry */
47 } error_procedure_t;
48
49 /** Statistics table */
50 typedef struct _error_equiv_table {
51         GtkWidget *scrolled_window;         /**< window widget */
52     GtkTreeSelection *select;           /**< item selected */
53     GtkTreeView      *tree_view;        /**< Tree view */
54         GtkWidget *menu;                    /**< context menu */
55         guint      num_procs;               /**< number of elements on procedures array */
56         GArray                    *procs_array;         /**< the procedures array error_procedure_t *procedures */
57         GStringChunk*     text;
58 }error_equiv_table;
59
60 /** Init an err table data structure.
61  *
62  * @param err the err table to init
63  * @param num_procs number of procedures
64  * @param vbox the corresponding GtkVBox to fill in
65  */
66 void init_error_table(error_equiv_table *err, guint num_procs, GtkWidget *vbox);
67
68 /** Init an err table row data structure.
69  *
70  * @param err the err table
71  * @param expert_data data
72  */
73 void init_error_table_row(error_equiv_table *err, const expert_info_t *expert_data);
74
75 /** Draw the err table data.
76  *
77  * @param err the err table
78  */
79 void draw_error_table_data(error_equiv_table *err);
80
81 /** Reset the err table data.
82  *
83  * @param err the err table
84  */
85 void reset_error_table_data(error_equiv_table *err);
86
87 /** Free the err table data.
88  *
89  * @param err the err table
90  */
91 void free_error_table_data(error_equiv_table *err);
92
93 #endif /* __EXPERT_COMP_TABLE_H__ */