lib: remove "For *" comments in public headers
[babeltrace.git] / include / babeltrace2 / graph / component-class-filter.h
CommitLineData
3fd40f46
PP
1#ifndef BABELTRACE2_GRAPH_COMPONENT_CLASS_FILTER_H
2#define BABELTRACE2_GRAPH_COMPONENT_CLASS_FILTER_H
d3e4dcd8
PP
3
4/*
f2b0325d 5 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
d3e4dcd8
PP
6 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
9df34b44
PP
27#ifndef __BT_IN_BABELTRACE_H
28# error "Please include <babeltrace2/babeltrace.h> instead."
29#endif
30
7b53201c
PP
31#include <stdint.h>
32
71c5da58 33#include <babeltrace2/graph/component-class.h>
71c5da58 34#include <babeltrace2/types.h>
83da519a
PP
35#include <babeltrace2/logging.h>
36
d3e4dcd8
PP
37#ifdef __cplusplus
38extern "C" {
39#endif
40
fb25b9e3 41typedef bt_component_class_init_method_status
7b53201c 42(*bt_component_class_filter_init_method)(
8eee8ea2
PP
43 bt_self_component_filter *self_component,
44 const bt_value *params, void *init_method_data);
7b53201c
PP
45
46typedef void (*bt_component_class_filter_finalize_method)(
8eee8ea2 47 bt_self_component_filter *self_component);
7b53201c 48
fb25b9e3 49typedef bt_component_class_message_iterator_init_method_status
b09a5592
PP
50(*bt_component_class_filter_message_iterator_init_method)(
51 bt_self_message_iterator *message_iterator,
8eee8ea2
PP
52 bt_self_component_filter *self_component,
53 bt_self_component_port_output *port);
7b53201c
PP
54
55typedef void
b09a5592
PP
56(*bt_component_class_filter_message_iterator_finalize_method)(
57 bt_self_message_iterator *message_iterator);
7b53201c 58
fb25b9e3 59typedef bt_component_class_message_iterator_next_method_status
b09a5592
PP
60(*bt_component_class_filter_message_iterator_next_method)(
61 bt_self_message_iterator *message_iterator,
62 bt_message_array_const msgs, uint64_t capacity,
7b53201c
PP
63 uint64_t *count);
64
fb25b9e3 65typedef bt_component_class_message_iterator_seek_ns_from_origin_method_status
15a52f66
PP
66(*bt_component_class_filter_message_iterator_seek_ns_from_origin_method)(
67 bt_self_message_iterator *message_iterator,
68 int64_t ns_from_origin);
69
fb25b9e3 70typedef bt_component_class_message_iterator_seek_beginning_method_status
15a52f66
PP
71(*bt_component_class_filter_message_iterator_seek_beginning_method)(
72 bt_self_message_iterator *message_iterator);
73
74typedef bt_bool
75(*bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method)(
76 bt_self_message_iterator *message_iterator,
77 int64_t ns_from_origin);
78
79typedef bt_bool
80(*bt_component_class_filter_message_iterator_can_seek_beginning_method)(
81 bt_self_message_iterator *message_iterator);
82
fb25b9e3 83typedef bt_component_class_query_method_status
7b53201c 84(*bt_component_class_filter_query_method)(
8eee8ea2
PP
85 bt_self_component_class_filter *comp_class,
86 const bt_query_executor *query_executor,
87 const char *object, const bt_value *params,
83da519a 88 bt_logging_level logging_level, const bt_value **result);
7b53201c 89
fb25b9e3 90typedef bt_component_class_port_connected_method_status
7b53201c 91(*bt_component_class_filter_input_port_connected_method)(
8eee8ea2
PP
92 bt_self_component_filter *self_component,
93 bt_self_component_port_input *self_port,
94 const bt_port_output *other_port);
7b53201c 95
fb25b9e3 96typedef bt_component_class_port_connected_method_status
7b53201c 97(*bt_component_class_filter_output_port_connected_method)(
8eee8ea2
PP
98 bt_self_component_filter *self_component,
99 bt_self_component_port_output *self_port,
100 const bt_port_input *other_port);
7b53201c 101
834e9996 102static inline
8eee8ea2
PP
103bt_component_class *bt_component_class_filter_as_component_class(
104 bt_component_class_filter *comp_cls_filter)
834e9996 105{
8470daa9 106 return __BT_UPCAST(bt_component_class, comp_cls_filter);
834e9996 107}
d3eb6e8f 108
7b53201c 109extern
8eee8ea2 110bt_component_class_filter *bt_component_class_filter_create(
7b53201c 111 const char *name,
b09a5592 112 bt_component_class_filter_message_iterator_next_method method);
7b53201c 113
fb25b9e3 114extern bt_component_class_set_method_status
4d2e0cb5 115bt_component_class_filter_set_init_method(
8eee8ea2 116 bt_component_class_filter *comp_class,
7b53201c
PP
117 bt_component_class_filter_init_method method);
118
fb25b9e3 119extern bt_component_class_set_method_status
4d2e0cb5 120bt_component_class_filter_set_finalize_method(
8eee8ea2 121 bt_component_class_filter *comp_class,
7b53201c
PP
122 bt_component_class_filter_finalize_method method);
123
fb25b9e3 124extern bt_component_class_set_method_status
4d2e0cb5 125bt_component_class_filter_set_input_port_connected_method(
8eee8ea2 126 bt_component_class_filter *comp_class,
7b53201c
PP
127 bt_component_class_filter_input_port_connected_method method);
128
fb25b9e3 129extern bt_component_class_set_method_status
4d2e0cb5 130bt_component_class_filter_set_output_port_connected_method(
8eee8ea2 131 bt_component_class_filter *comp_class,
7b53201c
PP
132 bt_component_class_filter_output_port_connected_method method);
133
fb25b9e3 134extern bt_component_class_set_method_status
4d2e0cb5 135bt_component_class_filter_set_query_method(
8eee8ea2 136 bt_component_class_filter *comp_class,
7b53201c
PP
137 bt_component_class_filter_query_method method);
138
fb25b9e3 139extern bt_component_class_set_method_status
4d2e0cb5 140bt_component_class_filter_set_message_iterator_init_method(
8eee8ea2 141 bt_component_class_filter *comp_class,
b09a5592 142 bt_component_class_filter_message_iterator_init_method method);
7b53201c 143
fb25b9e3 144extern bt_component_class_set_method_status
4d2e0cb5 145bt_component_class_filter_set_message_iterator_finalize_method(
8eee8ea2 146 bt_component_class_filter *comp_class,
b09a5592 147 bt_component_class_filter_message_iterator_finalize_method method);
7b53201c 148
fb25b9e3 149extern bt_component_class_set_method_status
15a52f66
PP
150bt_component_class_filter_set_message_iterator_seek_ns_from_origin_method(
151 bt_component_class_filter *comp_class,
152 bt_component_class_filter_message_iterator_seek_ns_from_origin_method method);
153
fb25b9e3 154extern bt_component_class_set_method_status
15a52f66
PP
155bt_component_class_filter_set_message_iterator_seek_beginning_method(
156 bt_component_class_filter *comp_class,
157 bt_component_class_filter_message_iterator_seek_beginning_method method);
158
fb25b9e3 159extern bt_component_class_set_method_status
15a52f66
PP
160bt_component_class_filter_set_message_iterator_can_seek_ns_from_origin_method(
161 bt_component_class_filter *comp_class,
162 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method method);
163
fb25b9e3 164extern bt_component_class_set_method_status
15a52f66
PP
165bt_component_class_filter_set_message_iterator_can_seek_beginning_method(
166 bt_component_class_filter *comp_class,
167 bt_component_class_filter_message_iterator_can_seek_beginning_method method);
168
d3eb6e8f
PP
169#ifdef __cplusplus
170}
171#endif
172
3fd40f46 173#endif /* BABELTRACE2_GRAPH_COMPONENT_CLASS_FILTER_H */
This page took 0.05078 seconds and 4 git commands to generate.