lib: add component descriptor set API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 18:52:21 +0000 (14:52 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 13 Aug 2019 00:28:02 +0000 (20:28 -0400)
commit55f09f529d02f6f548195ad3087edb10d12c52f6
tree5f444f92e40eb60aee330d9f7e82035b796df7af
parent9105c4677c8d51bf8b4a19b9d4f428cf17ca5292
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.024456 seconds and 4 git commands to generate.