Commit | Line | Data |
---|---|---|
15fe47e0 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
15fe47e0 | 3 | * |
0235b0db | 4 | * Copyright 2019 Philippe Proulx <pproulx@efficios.com> |
15fe47e0 PP |
5 | */ |
6 | ||
ae2be88d SM |
7 | #ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP |
8 | #define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP | |
0235b0db | 9 | |
15fe47e0 | 10 | #include <glib.h> |
c802cacb SM |
11 | |
12 | #include <babeltrace2/babeltrace.h> | |
13 | ||
3c20ac12 SM |
14 | #include "cpp-common/bt2c/logging.hpp" |
15 | ||
4164020e SM |
16 | struct fs_sink_comp |
17 | { | |
3c20ac12 SM |
18 | explicit fs_sink_comp(const bt2::SelfSinkComponent selfSinkComp) : |
19 | logger {selfSinkComp, "PLUGIN/SINK.CTF.FS/COMP"} | |
20 | { | |
21 | } | |
22 | ||
23 | bt2c::Logger logger; | |
15fe47e0 | 24 | |
4164020e | 25 | /* Owned by this */ |
150640e8 | 26 | bt_message_iterator *upstream_iter = nullptr; |
15fe47e0 | 27 | |
4164020e | 28 | /* Base output directory path */ |
150640e8 | 29 | GString *output_dir_path = nullptr; |
15fe47e0 | 30 | |
4164020e SM |
31 | /* |
32 | * True if the component assumes that it will only write a | |
33 | * single CTF trace (which can contain one or more data | |
34 | * streams). This makes the component write the stream files | |
35 | * directly in the output directory (`output_dir_path` above). | |
36 | */ | |
150640e8 | 37 | bool assume_single_trace = false; |
491c35cc | 38 | |
4164020e | 39 | /* True to completely ignore discarded events messages */ |
150640e8 | 40 | bool ignore_discarded_events = false; |
491c35cc | 41 | |
4164020e | 42 | /* True to completely ignore discarded packets messages */ |
150640e8 | 43 | bool ignore_discarded_packets = false; |
491c35cc | 44 | |
4164020e SM |
45 | /* |
46 | * True to make the component quiet (nothing printed to the | |
47 | * standard output). | |
48 | */ | |
150640e8 | 49 | bool quiet = false; |
15fe47e0 | 50 | |
4164020e SM |
51 | /* |
52 | * Hash table of `const bt_trace *` (weak) to | |
53 | * `struct fs_sink_trace *` (owned by hash table). | |
54 | */ | |
150640e8 | 55 | GHashTable *traces = nullptr; |
15fe47e0 PP |
56 | }; |
57 | ||
4164020e SM |
58 | bt_component_class_initialize_method_status |
59 | ctf_fs_sink_init(bt_self_component_sink *component, bt_self_component_sink_configuration *config, | |
60 | const bt_value *params, void *init_method_data); | |
15fe47e0 | 61 | |
4164020e SM |
62 | bt_component_class_sink_consume_method_status |
63 | ctf_fs_sink_consume(bt_self_component_sink *component); | |
15fe47e0 | 64 | |
4164020e SM |
65 | bt_component_class_sink_graph_is_configured_method_status |
66 | ctf_fs_sink_graph_is_configured(bt_self_component_sink *component); | |
15fe47e0 | 67 | |
15fe47e0 PP |
68 | void ctf_fs_sink_finalize(bt_self_component_sink *component); |
69 | ||
ae2be88d | 70 | #endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP */ |