Commit | Line | Data |
---|---|---|
71a559f8 JG |
1 | /* |
2 | * Copyright 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License, version 2 only, as | |
6 | * published by the Free Software Foundation. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
11 | * more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License along with | |
14 | * this program; if not, write to the Free Software Foundation, Inc., 51 | |
15 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | */ | |
17 | ||
18 | #ifndef LTTNG_COMMON_FILTER_H | |
19 | #define LTTNG_COMMON_FILTER_H | |
20 | ||
21 | #include <common/sessiond-comm/sessiond-comm.h> | |
22 | ||
23 | struct bytecode_symbol_iterator; | |
24 | ||
25 | /* | |
26 | * Create an iterator on a bytecode's symbols. The iterator points to the | |
27 | * first element after creation. | |
28 | */ | |
5eece149 | 29 | LTTNG_HIDDEN |
71a559f8 JG |
30 | struct bytecode_symbol_iterator *bytecode_symbol_iterator_create( |
31 | struct lttng_filter_bytecode *bytecode); | |
32 | ||
33 | /* | |
34 | * Advance iterator of one element. | |
35 | * | |
36 | * Returns 0 if a next element exists or a negative value at the end. | |
37 | */ | |
5eece149 | 38 | LTTNG_HIDDEN |
71a559f8 JG |
39 | int bytecode_symbol_iterator_next(struct bytecode_symbol_iterator *it); |
40 | ||
5eece149 | 41 | LTTNG_HIDDEN |
71a559f8 JG |
42 | int bytecode_symbol_iterator_get_type(struct bytecode_symbol_iterator *it); |
43 | ||
5eece149 | 44 | LTTNG_HIDDEN |
71a559f8 JG |
45 | const char *bytecode_symbol_iterator_get_name( |
46 | struct bytecode_symbol_iterator *it); | |
47 | ||
5eece149 | 48 | LTTNG_HIDDEN |
71a559f8 JG |
49 | void bytecode_symbol_iterator_destroy(struct bytecode_symbol_iterator *it); |
50 | ||
51 | #endif /* LTTNG_COMMON_FILTER_H */ |