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)
commit90157d89276ed1a569a2d4ffcfeed0b415817c12
tree36200c9578214fa68ede6a349e1c1df09ab05fdb
parent3bfc4183e4026c21bad8c817125b1f6d31d6d89d
Split notification iterator API into base and specialized functions

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>
42 files changed:
bindings/python/bt2/bt2/connection.py
bindings/python/bt2/bt2/native_btcomponentclass.i
bindings/python/bt2/bt2/native_btnotifiter.i
bindings/python/bt2/bt2/notification_iterator.py
include/Makefile.am
include/babeltrace/babeltrace.h
include/babeltrace/graph/component-class-filter.h
include/babeltrace/graph/component-class-internal.h
include/babeltrace/graph/component-class-source.h
include/babeltrace/graph/component-class.h
include/babeltrace/graph/connection-internal.h
include/babeltrace/graph/notification-iterator-internal.h
include/babeltrace/graph/notification-iterator.h
include/babeltrace/graph/private-connection-notification-iterator.h [new file with mode: 0644]
include/babeltrace/graph/private-connection-private-notification-iterator.h [new file with mode: 0644]
include/babeltrace/graph/private-notification-iterator.h [deleted file]
lib/graph/component-class.c
lib/graph/component.c
lib/graph/connection.c
lib/graph/iterator.c
lib/graph/query-executor.c
lib/plugin/plugin-so.c
plugins/ctf/fs-src/data-stream-file.c
plugins/ctf/fs-src/data-stream-file.h
plugins/ctf/fs-src/fs.c
plugins/ctf/fs-src/fs.h
plugins/ctf/fs-src/query.c
plugins/ctf/fs-src/query.h
plugins/ctf/lttng-live/lttng-live-internal.h
plugins/ctf/lttng-live/lttng-live.c
plugins/lttng-utils/plugin.c
plugins/text/dmesg/dmesg.c
plugins/text/dmesg/dmesg.h
plugins/utils/muxer/muxer.c
plugins/utils/muxer/muxer.h
plugins/utils/trimmer/iterator.c
plugins/utils/trimmer/iterator.h
plugins/utils/trimmer/trimmer.c
tests/lib/test-plugin-plugins/sfs.c
tests/lib/test_bt_notification_iterator.c
tests/lib/test_graph_topo.c
tests/plugins/test-utils-muxer.c
This page took 0.029836 seconds and 4 git commands to generate.