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