Split notification iterator API into base and specialized functions
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 24 Aug 2017 20:52:12 +0000 (16:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 15 Sep 2017 18:31:29 +0000 (14:31 -0400)
This patch splits the notification iterator API into base functions
(<babeltrace/graph/notification-iterator.h>) shared by all notification
iterators:

* bt_notification_iterator_next()
* bt_notification_iterator_get_notification()

and specialized functions
(<babeltrace/graph/private-connection-notification-iterator.h>):

* bt_private_connection_notification_iterator_get_component()

This allows the future creation of specialized notification iterators
which can use the common API for basic operations. A "private connection
notification iterator", the only type of notification iterator as of
this patch, is a notification iterator created from a private connection
with bt_private_connection_create_notification_iterator().

The bt2 Python package is updated accordingly.
_GenericNotificationIterator has only the __next__() method, while
_PrivateConnectionNotificationIterator extends
_GenericNotificationIterator with the `component` property.

The name "private connection" is excluded from component class type
definitions and functions, and also from plugin development macros,
because this is the only type of notification iterator which a user can
provide anyway, for example:

* bt_component_class_notification_iterator_init_method
* bt_component_class_source_set_notification_iterator_init_method()

`bt_notification_iterator_next_return` is renamed to
`bt_notification_iterator_next_method_return` to indicate that this is
the user notification iterator's "next" method return type.
`bt_component_class_query_return` is renamed to
`bt_component_class_query_method_return` to match this convention.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.02659 seconds and 4 git commands to generate.