lib: add component descriptor set API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 18:52:21 +0000 (14:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:21 +0000 (11:58 -0400)
commit36e611bb0ccb98dbe50aa1af055b7fe76f2a1b64
treed9abd35454440151874770493a8716767546172e
parent0c5cab917ae981febcf854ead11942e3410fa123
lib: add component descriptor set API

This patch adds an API to the library to create an empty set of
component descriptors and to add descriptors to it.

A component descriptor contains:

* A component class.
* Component initialization parameters.
* Component initialization custom data.

The motivation is to eventually be able to get an effective/compatible
message interchange protocol version number from such a set.

As of this patch, the API is available, but it's not used anywhere.

A component descriptor set is a shared object.

You add a component descriptor to a component descriptor set with
bt_component_descriptor_set_add_descriptor(). Internally, the descriptor
gets appended to one of the source, filter, or sink descriptor array to
eventually have bt_component_descriptor_get_*_descriptor_count() and
bt_component_descriptor_set_borrow_*_descriptor_by_index_const()
functions if needed.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I337d4c596bd988b20849700daf9747a3f188450d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1868
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
include/Makefile.am
include/babeltrace2/babeltrace.h
include/babeltrace2/graph/component-descriptor-set-const.h [new file with mode: 0644]
include/babeltrace2/graph/component-descriptor-set.h [new file with mode: 0644]
include/babeltrace2/types.h
src/lib/graph/Makefile.am
src/lib/graph/component-descriptor-set.c [new file with mode: 0644]
src/lib/graph/component-descriptor-set.h [new file with mode: 0644]
This page took 0.026699 seconds and 4 git commands to generate.