1 #ifndef _BABELTRACE_ITERATOR_INTERNAL_H
2 #define _BABELTRACE_ITERATOR_INTERNAL_H
7 * Internal iterator header
9 * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
11 * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 * Permission is hereby granted, free of charge, to any person obtaining a copy
14 * of this software and associated documentation files (the "Software"), to deal
15 * in the Software without restriction, including without limitation the rights
16 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 * copies of the Software, and to permit persons to whom the Software is
18 * furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice shall be included in
21 * all copies or substantial portions of the Software.
24 #include <babeltrace/ctf/events.h>
27 * struct bt_iter: data structure representing an iterator on a trace
31 struct ptr_heap
*stream_heap
;
32 struct bt_context
*ctx
;
33 const struct bt_iter_pos
*end_pos
;
37 * bt_iter_create - Allocate a trace collection iterator.
39 * begin_pos and end_pos are optional parameters to specify the position
40 * at which the trace collection should be seeked upon iterator
41 * creation, and the position at which iteration will start returning
44 * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at
45 * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of
46 * trace) is the EOF criterion.
48 struct bt_iter
*bt_iter_create(struct bt_context
*ctx
,
49 const struct bt_iter_pos
*begin_pos
,
50 const struct bt_iter_pos
*end_pos
);
53 * bt_iter_destroy - Free a trace collection iterator.
55 void bt_iter_destroy(struct bt_iter
*iter
);
57 int bt_iter_init(struct bt_iter
*iter
,
58 struct bt_context
*ctx
,
59 const struct bt_iter_pos
*begin_pos
,
60 const struct bt_iter_pos
*end_pos
);
61 void bt_iter_fini(struct bt_iter
*iter
);
63 #endif /* _BABELTRACE_ITERATOR_INTERNAL_H */
This page took 0.030061 seconds and 4 git commands to generate.