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