X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fcomponent-class-filter.h;h=2dec11caf4048b4d3fcaf89ac2fcc0189d14ad06;hb=7b53201cfb06ec02f4203e28458dfbcf53d87988;hp=83365be3705cffb162fb5e62fb88d2174ac1aae7;hpb=3a2cb327fd24e53a9b163372b9079003dd422655;p=babeltrace.git diff --git a/include/babeltrace/graph/component-class-filter.h b/include/babeltrace/graph/component-class-filter.h index 83365be3..2dec11ca 100644 --- a/include/babeltrace/graph/component-class-filter.h +++ b/include/babeltrace/graph/component-class-filter.h @@ -23,21 +23,156 @@ * SOFTWARE. */ +#include + +/* For enum bt_notification_array_const */ +#include + +/* For enum bt_self_component_status */ +#include + +/* For enum bt_self_notification_iterator_status */ +#include + +/* For enum bt_query_status */ +#include + #ifdef __cplusplus extern "C" { #endif struct bt_component_class; struct bt_component_class_filter; +struct bt_port_input; +struct bt_port_output; +struct bt_query_executor; +struct bt_self_component_class_filter; +struct bt_self_component_filter; +struct bt_self_component_port_input; +struct bt_self_component_port_output; +struct bt_value; + +typedef enum bt_self_component_status +(*bt_component_class_filter_init_method)( + struct bt_self_component_filter *self_component, + const struct bt_value *params, void *init_method_data); + +typedef void (*bt_component_class_filter_finalize_method)( + struct bt_self_component_filter *self_component); + +typedef enum bt_self_notification_iterator_status +(*bt_component_class_filter_notification_iterator_init_method)( + struct bt_self_notification_iterator *notification_iterator, + struct bt_self_component_filter *self_component, + struct bt_self_component_port_output *port); + +typedef void +(*bt_component_class_filter_notification_iterator_finalize_method)( + struct bt_self_notification_iterator *notification_iterator); + +typedef enum bt_self_notification_iterator_status +(*bt_component_class_filter_notification_iterator_next_method)( + struct bt_self_notification_iterator *notification_iterator, + bt_notification_array_const notifs, uint64_t capacity, + uint64_t *count); + +typedef enum bt_query_status +(*bt_component_class_filter_query_method)( + struct bt_self_component_class_filter *comp_class, + const struct bt_query_executor *query_executor, + const char *object, const struct bt_value *params, + const struct bt_value **result); + +typedef enum bt_self_component_status +(*bt_component_class_filter_accept_input_port_connection_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_input *self_port, + const struct bt_port_output *other_port); + +typedef enum bt_self_component_status +(*bt_component_class_filter_accept_output_port_connection_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_output *self_port, + const struct bt_port_input *other_port); + +typedef enum bt_self_component_status +(*bt_component_class_filter_input_port_connected_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_input *self_port, + const struct bt_port_output *other_port); + +typedef enum bt_self_component_status +(*bt_component_class_filter_output_port_connected_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_output *self_port, + const struct bt_port_input *other_port); + +typedef void +(*bt_component_class_filter_input_port_disconnected_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_input *self_port); + +typedef void +(*bt_component_class_filter_output_port_disconnected_method)( + struct bt_self_component_filter *self_component, + struct bt_self_component_port_output *self_port); static inline -struct bt_component_class * -bt_component_class_filter_as_component_class( +struct bt_component_class *bt_component_class_filter_as_component_class( struct bt_component_class_filter *comp_cls_filter) { return (void *) comp_cls_filter; } +extern +struct bt_component_class_filter *bt_component_class_filter_create( + const char *name, + bt_component_class_filter_notification_iterator_next_method method); + +extern int bt_component_class_filter_set_init_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_init_method method); + +extern int bt_component_class_filter_set_finalize_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_finalize_method method); + +extern int bt_component_class_filter_set_accept_input_port_connection_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_accept_input_port_connection_method method); + +extern int bt_component_class_filter_set_accept_output_port_connection_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_accept_output_port_connection_method method); + +extern int bt_component_class_filter_set_input_port_connected_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_input_port_connected_method method); + +extern int bt_component_class_filter_set_output_port_connected_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_output_port_connected_method method); + +extern int bt_component_class_filter_set_input_port_disconnected_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_input_port_disconnected_method method); + +extern int bt_component_class_filter_set_output_port_disconnected_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_output_port_disconnected_method method); + +extern int bt_component_class_filter_set_query_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_query_method method); + +extern int bt_component_class_filter_set_notification_iterator_init_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_notification_iterator_init_method method); + +extern int bt_component_class_filter_set_notification_iterator_finalize_method( + struct bt_component_class_filter *comp_class, + bt_component_class_filter_notification_iterator_finalize_method method); + #ifdef __cplusplus } #endif