1 /* filter_expressions.h
2 * Submitted by Edwin Groothuis <wireshark@mavetju.org>
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __FILTER_EXPRESSIONS_H__
24 #define __FILTER_EXPRESSIONS_H__
26 #include "ws_symbol_export.h"
30 #endif /* __cplusplus */
36 struct filter_expression {
37 gpointer button; /* Filter toolbar */
42 gboolean enabled; /* Can be set to FALSE by Preferences Dialog */
43 gboolean deleted; /* Can be set to TRUE by Preferences Dialog (GTK+ only) */
45 struct filter_expression *next;
48 WS_DLL_PUBLIC struct filter_expression **pfilter_expression_head;
50 /** Create a filter expression
52 * @param label Label (button) text for the expression.
53 * @param expr The display filter for the expression.
54 * @param enabled Determines if the expression is shown in the UI.
55 * @return A newly allocated and initialized struct filter_expression.
58 struct filter_expression *filter_expression_new(const gchar *label,
59 const gchar *expr, const gboolean enabled);
61 void filter_expression_init(void);
63 /** Clear the filter expression list.
64 * Frees each item in the list. Caller should set list_head to NULL afterward.
67 void filter_expression_free(struct filter_expression *list_head);
71 #endif /* __cplusplus */
73 #endif /* __FILTER_EXPRESSIONS_H__ */