From Chris Hellberg via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8723 :
[metze/wireshark/wip.git] / fileset.h
1 /* fileset.h
2  * Definitions for routines for file sets.
3  *
4  * $Id$
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 __FILESET_H__
26 #define __FILESET_H__
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 typedef struct _fileset_entry {
33   char     *fullname;      /* File name with path (g_strdup'ed) */
34   char     *name;          /* File name without path (g_strdup'ed) */
35   time_t   ctime;          /* create time */
36   time_t   mtime;          /* last modified time */
37   gint64   size;           /* size of file in bytes */
38   gboolean current;        /* is this the currently loaded file? */
39 } fileset_entry;
40
41
42 /* helper: is this a probable file of a file set (does the naming pattern match)? */
43 extern gboolean fileset_filename_match_pattern(const char *fname);
44
45 extern void fileset_add_dir(const char *fname, void *window);
46
47 extern void fileset_delete(void);
48
49 /* get the current directory name */
50 extern const char *fileset_get_dirname(void);
51
52 extern fileset_entry *fileset_get_next(void);
53 extern fileset_entry *fileset_get_previous(void);
54
55
56
57 /* this file is a part of the current file set */
58 extern void fileset_dlg_add_file(fileset_entry *entry, void *window);
59
60 extern void fileset_update_dlg(void *window);
61
62 extern void fileset_update_file(const char *path);
63
64 #ifdef __cplusplus
65 }
66 #endif /* __cplusplus */
67
68 #endif /* __FILESET_H__ */