2 * Declarations of routines for reading and writing the filters file.
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 __UI_FILTERS_H__
24 #define __UI_FILTERS_H__
28 #endif /* __cplusplus */
34 CFILTER_LIST, /* capture filter list - saved */
35 DFILTER_LIST, /* display filter list - saved */
36 CFILTER_EDITED_LIST, /* capture filter list - currently edited. GTK+ only. */
37 DFILTER_EDITED_LIST /* display filter list - currently edited. GTK+ only. */
41 * Item in a list of filters.
44 char *name; /* filter name */
45 char *strval; /* filter expression */
49 * Read in a list of filters.
51 * On success, "*pref_path_return" is set to NULL.
52 * On error, "*pref_path_return" is set to point to the pathname of
53 * the file we tried to read - it should be freed by our caller -
54 * and "*errno_return" is set to the error.
56 void read_filter_list(filter_list_type_t list_type, char **pref_path_return,
60 * Get a pointer to the first entry in a filter list.
62 GList *get_filter_list_first(filter_list_type_t list);
65 * Add a new filter to the end of a list.
66 * Returns a pointer to the newly-added entry.
68 GList *add_to_filter_list(filter_list_type_t list, const char *name,
69 const char *expression);
72 * Remove a filter from a list.
74 void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
77 * Write out a list of filters.
79 * On success, "*pref_path_return" is set to NULL.
80 * On error, "*pref_path_return" is set to point to the pathname of
81 * the file we tried to read - it should be freed by our caller -
82 * and "*errno_return" is set to the error.
84 void save_filter_list(filter_list_type_t list_type, char **pref_path_return,
88 * Clone the filter list so it can be edited. GTK+ only.
90 void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type);
94 #endif /* __cplusplus */
96 #endif /* __UI_FILTERS_H__ */
99 * Editor modelines - http://www.wireshark.org/tools/modelines.html
104 * indent-tabs-mode: nil
107 * vi: set shiftwidth=2 tabstop=8 expandtab:
108 * :indentSize=2:tabSize=8:noTabs=true: