From c602a80978f213e96007e49c821d98c487322d8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 19 May 2015 11:38:06 -0400 Subject: [PATCH] iterator documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- include/babeltrace/plugin/notification/iterator.h | 9 ++++++--- include/babeltrace/plugin/plugin-system.h | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/babeltrace/plugin/notification/iterator.h b/include/babeltrace/plugin/notification/iterator.h index 51247d18..9c968f52 100644 --- a/include/babeltrace/plugin/notification/iterator.h +++ b/include/babeltrace/plugin/notification/iterator.h @@ -57,15 +57,18 @@ enum bt_notification_iterator_status { BT_NOTIFICATION_ITERATOR_STATUS_OK = 0, }; +/** + * Notification iterator seek reference. + */ enum bt_notification_iterator_seek_type { /** Seek at a time relative to the beginning of the trace. */ BT_NOTIFICATION_ITERATOR_SEEK_TYPE_BEGIN = 0, - /** Seek at a time relative to the current position */ + /** Seek at a time relative to the current position. */ BT_NOTIFICATION_ITERATOR_SEEK_TYPE_CURRENT = 1, - /** Seek at a absolute time */ - BT_NOTIFICATION_ITERATOR_SEEK_TYPE_SET = 2, + /** Seek at a time relative to the end of the trace. */ + BT_NOTIFICATION_ITERATOR_SEEK_TYPE_END = 1, }; /** diff --git a/include/babeltrace/plugin/plugin-system.h b/include/babeltrace/plugin/plugin-system.h index 02c1f6f3..67406353 100644 --- a/include/babeltrace/plugin/plugin-system.h +++ b/include/babeltrace/plugin/plugin-system.h @@ -97,6 +97,7 @@ extern struct bt_plugin *bt_plugin_sink_create(const char *name, void *private_data, bt_plugin_destroy_func destroy_func, bt_plugin_sink_handle_notification_cb notification_cb); +/* Notification iterator functions */ /** * Allocate an notification iterator. * @@ -110,6 +111,16 @@ extern struct bt_notification_iterator *bt_notification_iterator_create( bt_notification_iterator_next_cb next_cb, bt_notification_iterator_get_notification_cb notification_cb); +/** + * Set an iterator's private data. + * + * @param plugin Plug-in instance on which to iterate + * @param data Iterator private data + * @returns One of #bt_notification_iterator_status values + */ +extern enum bt_notification_iterator_status *bt_notification_iterator_create( + struct bt_plugin *plugin, void *data); + #ifdef __cplusplus } #endif -- 2.34.1