Limit the text displayed for the Filter label in the SRT dialog so it doesn't push...
[metze/wireshark/wip.git] / ui / 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  * 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 __SERVICE_RESPONSE_TIME_TABLE_H__
26 #define __SERVICE_RESPONSE_TIME_TABLE_H__
27
28 #include <gtk/gtk.h>
29 #include "wsutil/nstime.h"
30 #include "epan/srt_table.h"
31
32 /** Suggested width of SRT window */
33 #define SRT_PREFERRED_WIDTH 650
34
35 /** Suggested height of SRT window */
36 #define SRT_PREFERRED_HEIGHT 400
37
38 /** Limit filter string length for sanity */
39 #define MAX_FILTER_STRING_LENGTH 1000
40
41 /** @file
42  *  Helper routines common to all service response time statistics tap.
43  */
44
45 /** Statistics table */
46 typedef struct _gtk_srt_stat_table {
47         GtkWidget *scrolled_window; /**< window widget */
48         GtkTreeView  *table;        /**< Tree view */
49         GtkWidget *menu;            /**< context menu */
50         srt_stat_table stat_table;
51 } gtk_srt_stat_table;
52
53 typedef struct _gtk_srt_table_t {
54         GtkTreeView  *table;        /**< Tree view */
55         GtkWidget *scrolled_window; /**< window widget */
56         GtkWidget *menu;            /**< context menu */
57         srt_stat_table* rst;        /**< Used to match tables with its GUI data */
58 } gtk_srt_table_t;
59
60 typedef struct _gtk_srt_t {
61         GtkWidget *vbox;
62         GtkWidget *win;
63         GtkWidget *main_nb;            /** Used for tab displays */
64         GArray    *gtk_srt_array;      /**< array of gtk_srt_table_t */
65 } gtk_srt_t;
66
67 /** Init an srt table data structure.
68  *
69  * @param rst the srt table to init
70  * @param gui_data contains GTK specific data
71  */
72 void init_gtk_srt_table(srt_stat_table* rst, void* gui_data);
73
74 /** Draw the srt table data.
75  *
76  * @param rst the srt table
77  * @param gtk_data contains GTK specific data
78  */
79 void draw_srt_table_data(srt_stat_table *rst, gtk_srt_t* gtk_data);
80
81 /** Clean up memory of the srt table.
82  *
83  * @param rst the srt table
84  * @param gui_data contains GTK specific data
85  */
86 void free_table_data(srt_stat_table* rst, void* gui_data);
87
88 /** Reset srt table data.
89  * Called when a tap listener is reset
90  *
91  * @param rst the srt table
92  * @param gui_data contains GTK specific data
93  */
94 void reset_table_data(srt_stat_table* rst, void* gui_data);
95
96 /** Register function to register dissectors that support SRT for GTK.
97  *
98  * @param data register_srt_t* representing dissetor SRT table
99  * @param user_data is unused
100  */
101 void register_service_response_tables(gpointer data, gpointer user_data);
102
103 #endif /* __SERVICE_RESPONSE_TIME_TABLE_H__ */