The arc function was only used to draw filled ellipses. Change code to
[obnox/wireshark/wip.git] / gtk / service_response_time_table.h
1 /* service_response_time_table.h
2  * service_response_time_table   2003 Ronnie Sahlberg
3  * Helper routines common to all service response time statistics
4  * tap.
5  *
6  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  * 
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  * 
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifndef __SERVICE_RESPONSE_TIME_TABLE_H__
28 #define __SERVICE_RESPONSE_TIME_TABLE_H__
29
30 #include <gtk/gtk.h>
31 #include "epan/nstime.h"
32 #include "../timestats.h"
33
34 /** @file
35  *  Helper routines common to all service response time statistics tap.
36  */
37
38 /** Procedure data */
39 typedef struct _srt_procedure_t {
40         int  index;
41         timestat_t stats;   /**< stats */
42         char *procedure;   /**< column entries */
43         GtkTreeIter iter;
44 } srt_procedure_t;
45
46 /** Statistics table */
47 typedef struct _srt_stat_table {
48         GtkWidget *scrolled_window; /**< window widget */
49         GtkTreeView  *table;        /**< Tree view */
50         GtkWidget *menu;            /**< context menu */
51         char *filter_string;        /**< append procedure number (%d) to this string 
52                                 to create a display filter */
53         int num_procs;              /**< number of elements on procedures array */
54         srt_procedure_t *procedures;/**< the procedures array */
55 } srt_stat_table;
56
57 /** Init an srt table data structure.
58  *
59  * @param rst the srt table to init
60  * @param num_procs number of procedures
61  * @param vbox the corresponding GtkVBox to fill in
62  * @param filter_string filter string or NULL
63  */
64 void init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox,
65                     const char *filter_string);
66
67 /** Init an srt table row data structure.
68  *
69  * @param rst the srt table
70  * @param index number of procedure
71  * @param procedure the procedures name
72  */
73 void init_srt_table_row(srt_stat_table *rst, int index, const char *procedure);
74
75 /** Add srt response to table row data. This will not draw the data!
76  *
77  * @param rst the srt table
78  * @param index number of procedure
79  * @param req_time the time of the corresponding request
80  * @param pinfo current packet info
81  */
82 void add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo);
83
84 /** Draw the srt table data.
85  *
86  * @param rst the srt table
87  */
88 void draw_srt_table_data(srt_stat_table *rst);
89
90 /** Reset the srt table data.
91  *
92  * @param rst the srt table
93  */
94 void reset_srt_table_data(srt_stat_table *rst);
95
96 /** Free the srt table data.
97  *
98  * @param rst the srt table
99  */
100 void free_srt_table_data(srt_stat_table *rst);
101
102 #endif /* __SERVICE_RESPONSE_TIME_TABLE_H__ */