lib: pass config objects to component init methods
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 17 Sep 2019 16:44:36 +0000 (12:44 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 25 Sep 2019 18:19:31 +0000 (14:19 -0400)
commit59225a3e0e13a9c674234755e55055d9ff68d635
treee1f4915ceda44e200ee50ca1950cbc549c87f415
parent1114a7d5b648102b0b37febe9d0d76a97e336240
lib: pass config objects to component init methods

This patch introduces configuration objects that are passed to init
methods of components.  The goal is to make it possible to have
parameters that can be set during the component's init phase, and not
after.

At the moment, they are not used for anything, they are only there for
future use.  For that reason, we currently just pass the value NULL as
the config objects to the components.  This should be fine, since the
components should not do anything with the config objects for now.

Similarly, we have configuration Python objects passed to __init__
methods of _UserMessageIterator objects.  These configuration objects
are empty, but we can connect them with the corresponding SWIG pointer
once we actually add a method in them.

I added tests to verify that the config objects the components receive
have the right types.

Change-Id: If7568160e225c1eb8343eb212f8b4961f5472836
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2063
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
52 files changed:
include/babeltrace2/graph/component-class-filter.h
include/babeltrace2/graph/component-class-sink.h
include/babeltrace2/graph/component-class-source.h
include/babeltrace2/types.h
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/native_bt_component_class.i.h
src/bindings/python/bt2/bt2/trace_collection_message_iterator.py
src/lib/graph/component-class-sink-simple.c
src/lib/graph/graph.c
src/plugins/ctf/fs-sink/fs-sink.c
src/plugins/ctf/fs-sink/fs-sink.h
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/fs-src/fs.h
src/plugins/ctf/lttng-live/lttng-live.c
src/plugins/ctf/lttng-live/lttng-live.h
src/plugins/lttng-utils/debug-info/debug-info.c
src/plugins/lttng-utils/debug-info/debug-info.h
src/plugins/text/details/details.c
src/plugins/text/details/details.h
src/plugins/text/dmesg/dmesg.c
src/plugins/text/dmesg/dmesg.h
src/plugins/text/pretty/pretty.c
src/plugins/text/pretty/pretty.h
src/plugins/utils/counter/counter.c
src/plugins/utils/counter/counter.h
src/plugins/utils/dummy/dummy.c
src/plugins/utils/dummy/dummy.h
src/plugins/utils/muxer/muxer.c
src/plugins/utils/muxer/muxer.h
src/plugins/utils/trimmer/trimmer.c
src/plugins/utils/trimmer/trimmer.h
tests/bindings/python/bt2/test_clock_class.py
tests/bindings/python/bt2/test_component.py
tests/bindings/python/bt2/test_connection.py
tests/bindings/python/bt2/test_error.py
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_event_class.py
tests/bindings/python/bt2/test_field.py
tests/bindings/python/bt2/test_field_class.py
tests/bindings/python/bt2/test_graph.py
tests/bindings/python/bt2/test_message.py
tests/bindings/python/bt2/test_message_iterator.py
tests/bindings/python/bt2/test_port.py
tests/bindings/python/bt2/utils.py
tests/data/auto-source-discovery/grouping/bt_plugin_test.py
tests/data/auto-source-discovery/params-log-level/bt_plugin_test.py
tests/data/cli/params/bt_plugin_params.py
tests/data/plugins/flt.utils.muxer/bt_plugin_muxer_test.py
tests/data/plugins/flt.utils.trimmer/bt_plugin_trimmer_test.py
tests/lib/test_graph_topo.c
tests/lib/test_simple_sink.c
tests/lib/test_trace_ir_ref.c
This page took 0.029664 seconds and 4 git commands to generate.