X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fself-component-filter.h;h=3fec35cf8424e6c89d088d8ba389b1e748d70ec0;hb=7e69c04f557e46fb50e5a888a3bc3451afbd3b8e;hp=12a6fa8deec772fac6398e349a2146750d0a9655;hpb=0d72b8c329ad51d14ab4e83330b38c2c8da69dd4;p=babeltrace.git diff --git a/include/babeltrace/graph/self-component-filter.h b/include/babeltrace/graph/self-component-filter.h index 12a6fa8d..3fec35cf 100644 --- a/include/babeltrace/graph/self-component-filter.h +++ b/include/babeltrace/graph/self-component-filter.h @@ -2,6 +2,7 @@ #define BABELTRACE_GRAPH_SELF_COMPONENT_FILTER_H /* + * Copyright 2017-2018 Philippe Proulx * Copyright 2017 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -25,68 +26,66 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include +/* + * For bt_component_filter, bt_self_component, bt_self_component_filter, + * bt_self_component_port_input, bt_self_component_port_output, + * __BT_UPCAST, __BT_UPCAST_CONST + */ +#include + #ifdef __cplusplus extern "C" { #endif -struct bt_component_filter; -struct bt_self_component; -struct bt_self_component_filter; -struct bt_self_component_port_input; -struct bt_self_component_port_output; - static inline -struct bt_self_component *bt_self_component_filter_as_self_component( - struct bt_self_component_filter *self_comp_filter) +bt_self_component *bt_self_component_filter_as_self_component( + bt_self_component_filter *self_comp_filter) { - return (void *) self_comp_filter; + return __BT_UPCAST(bt_self_component, self_comp_filter); } static inline -const struct bt_component_filter * +const bt_component_filter * bt_self_component_filter_as_component_filter( - struct bt_self_component_filter *self_comp_filter) + bt_self_component_filter *self_comp_filter) { - return (const void *) self_comp_filter; + return __BT_UPCAST_CONST(bt_component_filter, self_comp_filter); } -extern struct bt_component_filter *bt_component_filter_borrow_from_self( - struct bt_self_component_filter *self_component); - -extern struct bt_self_component_port_output * +extern bt_self_component_port_output * bt_self_component_filter_borrow_output_port_by_name( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, const char *name); -extern struct bt_self_component_port_output * +extern bt_self_component_port_output * bt_self_component_filter_borrow_output_port_by_index( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_filter_add_output_port( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, const char *name, void *data, - struct bt_self_component_port_output **self_component_port); + bt_self_component_port_output **self_component_port); -extern struct bt_self_component_port_input * +extern bt_self_component_port_input * bt_self_component_filter_borrow_input_port_by_name( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, const char *name); -extern struct bt_self_component_port_input * +extern bt_self_component_port_input * bt_self_component_filter_borrow_input_port_by_index( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_filter_add_input_port( - struct bt_self_component_filter *self_component, + bt_self_component_filter *self_component, const char *name, void *data, - struct bt_self_component_port_input **self_component_port); + bt_self_component_port_input **self_component_port); #ifdef __cplusplus }