X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fcomponent-source.h;h=cfdd41feb5c31ee994bb82b7e0a51d3ca39ba4bc;hb=bb61965be5ec1bfe6977d0eca85e2e83da65af5f;hp=165ba0d248e5ed17b4bce3a2e06fc5dfe9c77bc1;hpb=b2e0c9076135f47110af2d96dfaee397c597bc90;p=babeltrace.git diff --git a/include/babeltrace/graph/component-source.h b/include/babeltrace/graph/component-source.h index 165ba0d2..cfdd41fe 100644 --- a/include/babeltrace/graph/component-source.h +++ b/include/babeltrace/graph/component-source.h @@ -1,9 +1,7 @@ -#ifndef BABELTRACE_COMPONENT_SOURCE_H -#define BABELTRACE_COMPONENT_SOURCE_H +#ifndef BABELTRACE_GRAPH_COMPONENT_SOURCE_H +#define BABELTRACE_GRAPH_COMPONENT_SOURCE_H /* - * BabelTrace - Source Plug-in Interface - * * Copyright 2016 Jérémie Galarneau * * Author: Jérémie Galarneau @@ -28,26 +26,33 @@ */ #include -#include #ifdef __cplusplus extern "C" { #endif struct bt_component; -struct bt_notification_iterator; +struct bt_component_source; +struct bt_port_output; + +static inline +struct bt_component *bt_component_source_as_component( + struct bt_component_source *component) +{ + return (void *) component; +} + +extern uint64_t bt_component_source_get_output_port_count( + struct bt_component_source *component); + +extern struct bt_port_output *bt_component_source_borrow_output_port_by_name( + struct bt_component_source *component, const char *name); -extern enum bt_component_status bt_component_source_get_output_port_count( - struct bt_component *component, uint64_t *count); -extern struct bt_port *bt_component_source_get_output_port( - struct bt_component *component, const char *name); -extern struct bt_port *bt_component_source_get_output_port_at_index( - struct bt_component *component, int index); -extern struct bt_port *bt_component_source_get_default_output_port( - struct bt_component *component); +extern struct bt_port_output *bt_component_source_borrow_output_port_by_index( + struct bt_component_source *component, uint64_t index); #ifdef __cplusplus } #endif -#endif /* BABELTRACE_COMPONENT_SOURCE_H */ +#endif /* BABELTRACE_GRAPH_COMPONENT_SOURCE_H */