ccde384b1756ca0e27abdeed1c9f29997ec9ed70
[babeltrace.git] / src / plugins / ctf / fs-src / file.hpp
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com>
5 */
6
7 #ifndef CTF_FS_FILE_H
8 #define CTF_FS_FILE_H
9
10 #include <babeltrace2/babeltrace.h>
11
12 #include "cpp-common/bt2c/logging.hpp"
13
14 struct ctf_fs_file
15 {
16 explicit ctf_fs_file(const bt2c::Logger& parentLogger) :
17 logger {parentLogger, "PLUGIN/SRC.CTF.FS/FILE"}
18 {
19 }
20
21 bt2c::Logger logger;
22
23 /* Owned by this */
24 GString *path = nullptr;
25
26 /* Owned by this */
27 FILE *fp = nullptr;
28
29 off_t size = 0;
30 };
31
32 void ctf_fs_file_destroy(struct ctf_fs_file *file);
33
34 struct ctf_fs_file *ctf_fs_file_create(const bt2c::Logger& parentLogger);
35
36 int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode);
37
38 #endif /* CTF_FS_FILE_H */
This page took 0.029615 seconds and 3 git commands to generate.