Remove unused structure forward declarations
[babeltrace.git] / include / babeltrace / babeltrace.h
1 #ifndef _BABELTRACE_H
2 #define _BABELTRACE_H
3
4 /*
5 * BabelTrace API
6 *
7 * Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 */
19
20 /* Forward declarations */
21 struct babeltrace_iter;
22 struct trace_collection;
23 struct ctf_stream_event;
24 struct ctf_stream;
25
26 /*
27 * babeltrace_iter_create - Allocate a trace collection iterator.
28 */
29 struct babeltrace_iter *babeltrace_iter_create(struct trace_collection *tc);
30
31 /*
32 * babeltrace_iter_destroy - Free a trace collection iterator.
33 */
34 void babeltrace_iter_destroy(struct babeltrace_iter *iter);
35
36 /*
37 * babeltrace_iter_next: Move trace collection position to the next event.
38 *
39 * Returns 0 on success, a negative value on error
40 */
41 int babeltrace_iter_next(struct babeltrace_iter *iter);
42
43 /*
44 * babeltrace_iter_get_pos - Get the current trace collection position.
45 *
46 * The position returned by this function needs to be freed by
47 * babeltrace_iter_free_pos after use.
48 */
49 struct babeltrace_iter_pos *
50 babeltrace_iter_get_pos(struct babeltrace_iter *iter);
51
52 /*
53 * babeltrace_iter_free_pos - Free the position.
54 */
55 void babeltrace_iter_free_pos(struct babeltrace_iter_pos *pos);
56
57 /*
58 * babeltrace_iter_seek_pos - Seek the trace collection to the position.
59 */
60 int babeltrace_iter_seek_pos(struct babeltrace_iter *iter,
61 struct babeltrace_iter_pos *pos);
62
63 /*
64 * babeltrace_iter_seek_time: Seek the trace collection to the given timestamp.
65 *
66 * Return EOF if timestamp is after the last event of the trace collection.
67 * Return other negative value for other errors.
68 * Return 0 for success.
69 */
70 int babeltrace_iter_seek_time(struct babeltrace_iter *iter,
71 uint64_t timestamp);
72
73 /*
74 * babeltrace_iter_read_event: Read the iterator's current event data.
75 *
76 * @iter: trace collection iterator (input)
77 * @stream: stream containing event at current position (output)
78 * @event: current event (output)
79 * Return 0 on success, negative error value on error.
80 */
81 int babeltrace_iter_read_event(struct babeltrace_iter *iter,
82 struct ctf_stream **stream,
83 struct ctf_stream_event **event);
84
85 #endif /* _BABELTRACE_H */
This page took 0.030263 seconds and 4 git commands to generate.