Start using SPDX license identifiers.
[metze/wireshark/wip.git] / fileset.h
1 /* fileset.h
2  * Definitions for routines for file sets.
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0+
9  */
10
11 #ifndef __FILESET_H__
12 #define __FILESET_H__
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17
18 typedef struct _fileset_entry {
19     char     *fullname;      /* File name with path (g_strdup'ed) */
20     char     *name;          /* File name without path (g_strdup'ed) */
21     time_t   ctime;          /* create time */
22     time_t   mtime;          /* last modified time */
23     gint64   size;           /* size of file in bytes */
24     gboolean current;        /* is this the currently loaded file? */
25 } fileset_entry;
26
27
28 /* helper: is this a probable file of a file set (does the naming pattern match)? */
29 extern gboolean fileset_filename_match_pattern(const char *fname);
30
31 extern void fileset_add_dir(const char *fname, void *window);
32
33 extern void fileset_delete(void);
34
35 /* get the current directory name */
36 extern const char *fileset_get_dirname(void);
37
38 extern fileset_entry *fileset_get_next(void);
39 extern fileset_entry *fileset_get_previous(void);
40
41
42
43 /* this file is a part of the current file set */
44 extern void fileset_dlg_add_file(fileset_entry *entry, void *window);
45
46 extern void fileset_update_dlg(void *window);
47
48 extern void fileset_update_file(const char *path);
49
50 #ifdef __cplusplus
51 }
52 #endif /* __cplusplus */
53
54 #endif /* __FILESET_H__ */
55
56 /*
57  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
58  *
59  * Local variables:
60  * c-basic-offset: 4
61  * tab-width: 8
62  * indent-tabs-mode: nil
63  * End:
64  *
65  * vi: set shiftwidth=4 tabstop=8 expandtab:
66  * :indentSize=4:tabSize=8:noTabs=true:
67  */