Update Free Software Foundation address.
[metze/wireshark/wip.git] / ui / recent_utils.h
1 /* recent_utils.h
2  * Routines called to write stuff to the recent file; their implementations
3  * are GUI-dependent, but the API's aren't
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #ifndef __UI_RECENT_UTILS_H__
27 #define __UI_RECENT_UTILS_H__
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33 /* Add a new recent capture filename to the "Recent Files" submenu
34    (duplicates will be ignored) */
35 extern void add_menu_recent_capture_file(gchar *cf_name);
36
37 /** Write all recent capture filenames to the user's recent file.
38  * @param rf recent file
39  */
40 extern void menu_recent_file_write_all(FILE *rf);
41
42 /** Add a capture filter coming from the user's recent file to the cfilter combo box.
43  *
44  * @param dftext the filter string
45  */
46 extern gboolean cfilter_combo_add_recent(gchar *s);
47
48 /** Write all non-empty capture filters (until maximum count)
49  *  of the combo box GList to the user's recent file.
50  *
51  * @param rf the recent file
52  */
53 extern void cfilter_combo_recent_write_all(FILE *rf);
54
55 /** Add a display filter coming from the user's recent file to the dfilter combo box.
56  *
57  * @param dftext the filter string
58  */
59 extern gboolean dfilter_combo_add_recent(gchar *dftext);
60
61 /** Write all non-empty display filters (until maximum count)
62  *  of the combo box GList to the user's recent file.
63  *
64  * @param rf the recent file
65  */
66 extern void dfilter_recent_combo_write_all(FILE *rf);
67
68 #ifdef HAVE_PCAP_REMOTE
69 /** Write all remote hosts to the recent file
70  *
71  * @param rf recent file
72  */
73 void
74 capture_remote_combo_recent_write_all(FILE *rf);
75
76 /** Add a new remote host from the recent file
77  *
78  * @param s string with hostname,port,auth_type
79  * @return TRUE if correctly added
80  */
81 gboolean
82 capture_remote_combo_add_recent(gchar *s);
83 #endif
84
85 /** Read in a single geometry key value pair from the recent file.
86  *
87  * @param name the geom_name of the window
88  * @param key the subkey of this pair (e.g. "x")
89  * @param value the new value (e.g. "123")
90  */
91 extern void window_geom_recent_read_pair(const char *name, const char *key, const char *value);
92
93 /** Write all geometry values of all windows to the recent file.
94  * Will call write_recent_geom() for every existing window type.
95  *
96  * @param rf recent file handle from caller
97  */
98 extern void window_geom_recent_write_all(gpointer rf);
99
100 /** Write all packet list geometry values to the recent file.
101  *
102  *  @param rf recent file handle from caller
103  */
104 extern void new_packet_list_recent_write_all(FILE *rf);
105
106 #ifdef __cplusplus
107 }
108 #endif /* __cplusplus */
109
110 #endif /* __UI_RECENT_UTILS_H__ */