2 * SPDX-License-Identifier: MIT
4 * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
7 #ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
8 #define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
12 #include <babeltrace2/babeltrace.h>
14 #include "cpp-common/bt2c/logging.hpp"
18 explicit fs_sink_comp(const bt2::SelfSinkComponent selfSinkComp) :
19 logger {selfSinkComp, "PLUGIN/SINK.CTF.FS/COMP"}
26 bt_message_iterator *upstream_iter = nullptr;
28 /* Base output directory path */
29 GString *output_dir_path = nullptr;
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).
37 bool assume_single_trace = false;
39 /* True to completely ignore discarded events messages */
40 bool ignore_discarded_events = false;
42 /* True to completely ignore discarded packets messages */
43 bool ignore_discarded_packets = false;
46 * True to make the component quiet (nothing printed to the
52 * Hash table of `const bt_trace *` (weak) to
53 * `struct fs_sink_trace *` (owned by hash table).
55 GHashTable *traces = nullptr;
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);
62 bt_component_class_sink_consume_method_status
63 ctf_fs_sink_consume(bt_self_component_sink *component);
65 bt_component_class_sink_graph_is_configured_method_status
66 ctf_fs_sink_graph_is_configured(bt_self_component_sink *component);
68 void ctf_fs_sink_finalize(bt_self_component_sink *component);
70 #endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP */