Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
/builds/wireshark/wireshark/fileset.h
Go to the documentation of this file.
1
12#ifndef __FILESET_H__
13#define __FILESET_H__
14
15#include <inttypes.h>
16#include <time.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22typedef struct _fileset_entry {
23 char *fullname; /* File name with path (g_strdup'ed) */
24 char *name; /* File name without path (g_strdup'ed) */
25 time_t ctime; /* create time */
26 time_t mtime; /* last modified time */
27 int64_t size; /* size of file in bytes */
28 bool current; /* is this the currently loaded file? */
30
31typedef enum {
32 FILESET_NO_MATCH,
33 FILESET_TIME_NUM,
34 FILESET_NUM_TIME
35} fileset_match_t;
36
37/* helper: is this a probable file of a file set (does the naming pattern match)?
38 * Possible naming patterns are prefix_NNNNN_YYYYMMDDHHMMSS.ext[.gz] and
39 * prefix_YYYYMMDDHHMMSS_NNNNN.ext[.gz], where any compression suffix
40 * supported by libwiretap is allowed. The validation is minimal; e.g., the
41 * time is only checked to see if all 14 characters are digits.
42 *
43 * @param[in] fname The filename to check for a naming pattern.
44 * @param[out] prefix If not NULL and the filename matches, the prefix
45 * @param[out] suffix If not NULL and the filename matches, the suffix
46 * (file extension) not including the compression suffix
47 * @param[out] time If not NULL and the filename matches, the time component
48 * @return The type of pattern match, or FILESET_NO_MATCH.
49 * */
50extern fileset_match_t fileset_filename_match_pattern(const char *fname, char **prefix, char **suffix, char **time);
51
52extern void fileset_add_dir(const char *fname, void *window);
53
54extern void fileset_delete(void);
55
56/* get the current directory name */
57extern const char *fileset_get_dirname(void);
58
59extern fileset_entry *fileset_get_next(void);
60extern fileset_entry *fileset_get_previous(void);
61
69extern void fileset_dlg_add_file(fileset_entry *entry, void *window);
70
77extern void fileset_dlg_begin_add_file(void *window);
78
85extern void fileset_dlg_end_add_file(void *window);
86
87extern void fileset_update_dlg(void *window);
88
89extern void fileset_update_file(const char *path);
90
91#ifdef __cplusplus
92}
93#endif /* __cplusplus */
94
95#endif /* __FILESET_H__ */
96
97/*
98 * Editor modelines - https://www.wireshark.org/tools/modelines.html
99 *
100 * Local variables:
101 * c-basic-offset: 4
102 * tab-width: 8
103 * indent-tabs-mode: nil
104 * End:
105 *
106 * vi: set shiftwidth=4 tabstop=8 expandtab:
107 * :indentSize=4:tabSize=8:noTabs=true:
108 */
void fileset_dlg_add_file(fileset_entry *entry, void *window)
Definition file_set_dialog.cpp:43
void fileset_dlg_end_add_file(void *window)
Definition file_set_dialog.cpp:50
void fileset_dlg_begin_add_file(void *window)
Definition file_set_dialog.cpp:35
Definition fileset.h:22