lib: add "get supported MIP versions" method support
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 19:18:17 +0000 (15:18 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 13 Aug 2019 00:28:02 +0000 (20:28 -0400)
commit2b55df78b247562ac2b006c597a651cfb0cf9b8b
tree2bd36e56cba32a12560bbfe073525030d29c3f52
parent9628043c93e05c65bc5e334c1d9a0e1bf2cb3a3c
lib: add "get supported MIP versions" method support

This patch adds a new optional method to component classes: get
supported message interchange protocol (MIP) versions.

As of this patch, you can set the "get supported MIP versions" method of
a component class, but it's not used.

The "message interchange protocol" term is very long so I chose to use
the acronym "mip" in the API. The API documentation will make this more
clear.

The method is considered a "class method"; no component exists yet when
calling it (like the query method). The method receives the component
class, the initialization parameters, the initalization method custom
data, and an existing, empty unsigned integer range set. The method's
purpose is to fill this integer range set with all the MIP versions it
supports depending on the initialization configuration. This makes it
possible to support specific MIP versions based on an input path or URI,
for example.

It is a postcondition that the method adds at least one MIP version to
the unsigned integer range set.

The "get supported MIP versions" method is optional: not implementing it
corresponds to adding [0, 0] to the unsigned integer range set. This
makes it possible to implement a component class of which the instance
operates according to the MIP protocol of Babeltrace 2.0.

The "get supported MIP versions" method can fail, but it cannot return
a "try again" status.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ib26ec9e90b47a3d3e51cc56465a264de9d02b97c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1870
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
include/babeltrace2/graph/component-class-filter.h
include/babeltrace2/graph/component-class-sink.h
include/babeltrace2/graph/component-class-source.h
include/babeltrace2/graph/component-class.h
include/babeltrace2/plugin/plugin-dev.h
src/lib/graph/component-class.c
src/lib/graph/component-class.h
src/lib/plugin/plugin-so.c
This page took 0.025374 seconds and 4 git commands to generate.