Commit | Line | Data |
---|---|---|
e98a2d6e | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
e98a2d6e | 3 | * |
0235b0db | 4 | * Copyright (C) 2016 Philippe Proulx <pproulx@efficios.com> |
e98a2d6e PP |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef CTF_FS_FILE_H |
8 | #define CTF_FS_FILE_H | |
9 | ||
5ff12b25 | 10 | #include <memory> |
a39d9817 | 11 | #include <string> |
5ff12b25 | 12 | |
c7e1be4b | 13 | #include <babeltrace2/babeltrace.h> |
e98a2d6e | 14 | |
85a25425 | 15 | #include "cpp-common/bt2c/libc-up.hpp" |
97601f8e | 16 | #include "cpp-common/bt2c/logging.hpp" |
0f5c5d5c | 17 | |
97601f8e SM |
18 | struct ctf_fs_file |
19 | { | |
bf3ab6f6 | 20 | using UP = std::unique_ptr<ctf_fs_file>; |
5ff12b25 | 21 | |
97601f8e SM |
22 | explicit ctf_fs_file(const bt2c::Logger& parentLogger) : |
23 | logger {parentLogger, "PLUGIN/SRC.CTF.FS/FILE"} | |
24 | { | |
25 | } | |
0f5c5d5c | 26 | |
97601f8e SM |
27 | bt2c::Logger logger; |
28 | ||
a39d9817 | 29 | std::string path; |
97601f8e | 30 | |
85a25425 | 31 | bt2c::FileUP fp; |
97601f8e SM |
32 | |
33 | off_t size = 0; | |
34 | }; | |
0f5c5d5c | 35 | |
5ff12b25 | 36 | ctf_fs_file::UP ctf_fs_file_create(const bt2c::Logger& parentLogger); |
e98a2d6e | 37 | |
55314f2a | 38 | int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode); |
e98a2d6e PP |
39 | |
40 | #endif /* CTF_FS_FILE_H */ |