Fix: get encoding for char arrays and sequences
[babeltrace.git] / include / babeltrace / ctf / iterator.h
CommitLineData
c5498370
MD
1#ifndef _BABELTRACE_CTF_ITERATOR_H
2#define _BABELTRACE_CTF_ITERATOR_H
3
4/*
5 * BabelTrace
6 *
7 * CTF iterator API
8 *
9 * Copyright 2011-2012 EfficiOS Inc. and Linux Foundation
10 *
11 * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 * Julien Desfossez <julien.desfossez@efficios.com>
13 *
14 * Permission is hereby granted, free of charge, to any person obtaining
15 * a copy of this software and associated documentation files (the
16 * "Software"), to deal in the Software without restriction, including
17 * without limitation the rights to use, copy, modify, merge, publish,
18 * distribute, sublicense, and/or sell copies of the Software, and to
19 * permit persons to whom the Software is furnished to do so, subject to
20 * the following conditions:
21 *
22 * The above copyright notice and this permission notice shall be
23 * included in all copies or substantial portions of the Software.
24 */
25
26#include <babeltrace/iterator.h>
27
6946751f
JD
28#ifdef __cplusplus
29extern "C" {
30#endif
31
c5498370 32struct bt_ctf_iter;
c50d2a7a 33struct bt_ctf_event;
c5498370
MD
34
35/*
36 * bt_ctf_iter_create - Allocate a CTF trace collection iterator.
37 *
38 * begin_pos and end_pos are optional parameters to specify the position
39 * at which the trace collection should be seeked upon iterator
40 * creation, and the position at which iteration will start returning
41 * "EOF".
42 *
43 * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at
44 * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of
45 * trace) is the EOF criterion.
e003e871
JD
46 *
47 * Return a pointer to the newly allocated iterator.
48 *
49 * Only one iterator can be created against a context. If more than one
50 * iterator is being created for the same context, the second creation
51 * will return NULL. The previous iterator must be destroyed before
52 * creation of the new iterator for this function to succeed.
c5498370
MD
53 */
54struct bt_ctf_iter *bt_ctf_iter_create(struct bt_context *ctx,
04ae3991
MD
55 const struct bt_iter_pos *begin_pos,
56 const struct bt_iter_pos *end_pos);
c5498370
MD
57
58/*
59 * bt_ctf_get_iter - get iterator from ctf iterator.
60 */
61struct bt_iter *bt_ctf_get_iter(struct bt_ctf_iter *iter);
62
63/*
64 * bt_ctf_iter_destroy - Free a CTF trace collection iterator.
65 */
66void bt_ctf_iter_destroy(struct bt_ctf_iter *iter);
67
68/*
69 * bt_ctf_iter_read_event: Read the iterator's current event data.
70 *
7f89ddce 71 * @iter: trace collection iterator (input). Should NOT be NULL.
17e0c86e
MD
72 *
73 * Return current event on success, NULL on end of trace.
c5498370 74 */
c50d2a7a 75struct bt_ctf_event *bt_ctf_iter_read_event(struct bt_ctf_iter *iter);
c5498370 76
6946751f
JD
77#ifdef __cplusplus
78}
79#endif
80
c5498370 81#endif /* _BABELTRACE_CTF_ITERATOR_H */
This page took 0.037142 seconds and 4 git commands to generate.