lib: add output port notification iterator
As of this patch, you can create an output port notification iterator
with a component's output port with
bt_output_port_notification_iterator_create(). This function, on
success:
1. Creates a notification iterator object, which contains a
notification pointer.
2. Adds (creates) a colander sink component, passing this notification
pointer's address to its initialization method data, along with
a list of notification types to subscribe to received as a
parameter.
3. Connects the passed output port to the colander component's input
port.
4. Makes the targeted graph nonconsumable. This means, at this point,
only bt_notification_iterator_next() can consume the graph, not the
user.
5. Returns the created notification iterator.
When you call bt_notification_iterator_next() with this new notification
iterator, it puts its current notification and consumes its specific
colander sink within the graph to make it store the next notification,
forwarding any exceptional graph status as a notification iterator
status.
More than one output port notification iterators on a single graph are
supported: multiple colander sinks are added to the graph and each one
makes its own colander sink consume.
To avoid immediate or eventual component name clashes,
bt_output_port_notification_iterator_create() accepts an optional
colander name parameter. If you use NULL, then `colander` is used.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.028096 seconds and 4 git commands to generate.