X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=include%2Fbabeltrace%2Fctf%2Fiterator.h;h=1071def852749d3a4abee44a346e2280dd2d7452;hb=e003e87103a3fd72d543ec3191c20df56599b0f5;hp=564b6e23f64465afcce5202f2308995aacdc8eba;hpb=c54983704d35cb1cd6da38cb087df2e3b5cfd5d0;p=babeltrace.git diff --git a/include/babeltrace/ctf/iterator.h b/include/babeltrace/ctf/iterator.h index 564b6e23..1071def8 100644 --- a/include/babeltrace/ctf/iterator.h +++ b/include/babeltrace/ctf/iterator.h @@ -39,10 +39,17 @@ struct bt_ctf_event; * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of * trace) is the EOF criterion. + * + * Return a pointer to the newly allocated iterator. + * + * Only one iterator can be created against a context. If more than one + * iterator is being created for the same context, the second creation + * will return NULL. The previous iterator must be destroyed before + * creation of the new iterator for this function to succeed. */ struct bt_ctf_iter *bt_ctf_iter_create(struct bt_context *ctx, - struct bt_iter_pos *begin_pos, - struct bt_iter_pos *end_pos); + const struct bt_iter_pos *begin_pos, + const struct bt_iter_pos *end_pos); /* * bt_ctf_get_iter - get iterator from ctf iterator. @@ -58,9 +65,8 @@ void bt_ctf_iter_destroy(struct bt_ctf_iter *iter); * bt_ctf_iter_read_event: Read the iterator's current event data. * * @iter: trace collection iterator (input) - * @stream: stream containing event at current position (output) - * @event: current event (output) - * Return 0 on success, negative error value on error. + * + * Return current event on success, NULL on end of trace. */ struct bt_ctf_event *bt_ctf_iter_read_event(struct bt_ctf_iter *iter);