X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fiterator-internal.h;h=ea47745a723c9b1a84d82942daa8434885be9917;hp=626a7a0009b16377406bc4e51d99425e6eda4e7e;hb=9347cbab752c9672e64f8a71a465cca15f7b45ce;hpb=eb31c5e6bbfbb02093ff45616446c26730898c05 diff --git a/include/babeltrace/iterator-internal.h b/include/babeltrace/iterator-internal.h index 626a7a00..ea47745a 100644 --- a/include/babeltrace/iterator-internal.h +++ b/include/babeltrace/iterator-internal.h @@ -33,6 +33,27 @@ struct bt_iter { struct bt_iter_pos *end_pos; }; +/* + * bt_iter_create - Allocate a trace collection iterator. + * + * begin_pos and end_pos are optional parameters to specify the position + * at which the trace collection should be seeked upon iterator + * creation, and the position at which iteration will start returning + * "EOF". + * + * 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. + */ +struct bt_iter *bt_iter_create(struct bt_context *ctx, + struct bt_iter_pos *begin_pos, + struct bt_iter_pos *end_pos); + +/* + * bt_iter_destroy - Free a trace collection iterator. + */ +void bt_iter_destroy(struct bt_iter *iter); + int bt_iter_init(struct bt_iter *iter, struct bt_context *ctx, struct bt_iter_pos *begin_pos,