Update protocol references.
[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-or-later
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  * Add an entry to our dialog / window. Called by fileset_update_dlg.
43  * Must be implemented in the UI.
44  *
45  * @param entry The new fileset entry.
46  * @param window Window / dialog reference provided by the UI code.
47  */
48 extern void fileset_dlg_add_file(fileset_entry *entry, void *window);
49
50 /**
51  * Notify our dialog / window that we're about to add files. Called by fileset_update_dlg.
52  * Must be implemented in the UI.
53  *
54  * @param window Window / dialog reference provided by the UI code.
55  */
56 extern void fileset_dlg_begin_add_file(void *window);
57
58 /**
59  * Notify our dialog / window that we're done adding files. Called by fileset_update_dlg.
60  * Must be implemented in the UI.
61  *
62  * @param window Window / dialog reference provided by the UI code.
63  */
64 extern void fileset_dlg_end_add_file(void *window);
65
66 extern void fileset_update_dlg(void *window);
67
68 extern void fileset_update_file(const char *path);
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73
74 #endif /* __FILESET_H__ */
75
76 /*
77  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
78  *
79  * Local variables:
80  * c-basic-offset: 4
81  * tab-width: 8
82  * indent-tabs-mode: nil
83  * End:
84  *
85  * vi: set shiftwidth=4 tabstop=8 expandtab:
86  * :indentSize=4:tabSize=8:noTabs=true:
87  */