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 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H |
8 | #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H | |
9 | ||
91d81473 | 10 | #include "common/macros.h" |
3fadfbc0 | 11 | #include <babeltrace2/babeltrace.h> |
15fe47e0 PP |
12 | #include <stdbool.h> |
13 | #include <glib.h> | |
14 | ||
4164020e SM |
15 | struct fs_sink_comp |
16 | { | |
17 | bt_logging_level log_level; | |
18 | bt_self_component *self_comp; | |
15fe47e0 | 19 | |
4164020e SM |
20 | /* Owned by this */ |
21 | bt_message_iterator *upstream_iter; | |
15fe47e0 | 22 | |
4164020e SM |
23 | /* Base output directory path */ |
24 | GString *output_dir_path; | |
15fe47e0 | 25 | |
4164020e SM |
26 | /* |
27 | * True if the component assumes that it will only write a | |
28 | * single CTF trace (which can contain one or more data | |
29 | * streams). This makes the component write the stream files | |
30 | * directly in the output directory (`output_dir_path` above). | |
31 | */ | |
32 | bool assume_single_trace; | |
491c35cc | 33 | |
4164020e SM |
34 | /* True to completely ignore discarded events messages */ |
35 | bool ignore_discarded_events; | |
491c35cc | 36 | |
4164020e SM |
37 | /* True to completely ignore discarded packets messages */ |
38 | bool ignore_discarded_packets; | |
491c35cc | 39 | |
4164020e SM |
40 | /* |
41 | * True to make the component quiet (nothing printed to the | |
42 | * standard output). | |
43 | */ | |
44 | bool quiet; | |
15fe47e0 | 45 | |
4164020e SM |
46 | /* |
47 | * Hash table of `const bt_trace *` (weak) to | |
48 | * `struct fs_sink_trace *` (owned by hash table). | |
49 | */ | |
50 | GHashTable *traces; | |
15fe47e0 PP |
51 | }; |
52 | ||
4164020e SM |
53 | bt_component_class_initialize_method_status |
54 | ctf_fs_sink_init(bt_self_component_sink *component, bt_self_component_sink_configuration *config, | |
55 | const bt_value *params, void *init_method_data); | |
15fe47e0 | 56 | |
4164020e SM |
57 | bt_component_class_sink_consume_method_status |
58 | ctf_fs_sink_consume(bt_self_component_sink *component); | |
15fe47e0 | 59 | |
4164020e SM |
60 | bt_component_class_sink_graph_is_configured_method_status |
61 | ctf_fs_sink_graph_is_configured(bt_self_component_sink *component); | |
15fe47e0 | 62 | |
15fe47e0 PP |
63 | void ctf_fs_sink_finalize(bt_self_component_sink *component); |
64 | ||
65 | #endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H */ |