src.ctf.fs: move ctf_fs_file to file.hpp
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 12 Dec 2023 04:59:05 +0000 (04:59 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 17 Apr 2024 17:57:53 +0000 (13:57 -0400)
This helps resolve some cyclic include problem between file.hpp and
fs.hpp in the next patches (and I think it makes sense to put it there).

Change-Id: I2904d17eb3ea51699464fba17a992ddf3b691f60
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8259
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12297

src/plugins/ctf/fs-src/file.cpp
src/plugins/ctf/fs-src/file.hpp
src/plugins/ctf/fs-src/fs.hpp

index ea92ab13fb3702904b79797598666325bc461c95..938c048dee513ce7c56546a8bdfee9465e547b18 100644 (file)
@@ -11,7 +11,6 @@
 #include "cpp-common/vendor/fmt/format.h"
 
 #include "file.hpp"
-#include "fs.hpp"
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file)
 {
index 8fc01157ed31e1ea5c754df36bc292682c02ee2d..ccde384b1756ca0e27abdeed1c9f29997ec9ed70 100644 (file)
@@ -9,11 +9,25 @@
 
 #include <babeltrace2/babeltrace.h>
 
-namespace bt2c {
+#include "cpp-common/bt2c/logging.hpp"
 
-class Logger;
+struct ctf_fs_file
+{
+    explicit ctf_fs_file(const bt2c::Logger& parentLogger) :
+        logger {parentLogger, "PLUGIN/SRC.CTF.FS/FILE"}
+    {
+    }
 
-} /* namespace bt2c */
+    bt2c::Logger logger;
+
+    /* Owned by this */
+    GString *path = nullptr;
+
+    /* Owned by this */
+    FILE *fp = nullptr;
+
+    off_t size = 0;
+};
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file);
 
index f2ff5fcc145beea5092f1026598ce249072399fc..52e6761b8ab7676d3abf9554b4b3f4b9c3b23041 100644 (file)
 
 extern bool ctf_fs_debug;
 
-struct ctf_fs_file
-{
-    explicit ctf_fs_file(const bt2c::Logger& parentLogger) :
-        logger {parentLogger, "PLUGIN/SRC.CTF.FS/FILE"}
-    {
-    }
-
-    bt2c::Logger logger;
-
-    /* Owned by this */
-    GString *path = nullptr;
-
-    /* Owned by this */
-    FILE *fp = nullptr;
-
-    off_t size = 0;
-};
-
 struct ctf_fs_metadata
 {
     /* Owned by this */
This page took 0.025745 seconds and 4 git commands to generate.