X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fcomponent-sink-internal.h;fp=include%2Fbabeltrace%2Fgraph%2Fcomponent-sink-internal.h;h=7b67e2fdf5ee3e1e2f731030f0490d941ca896ba;hb=d94d92ac6656fd252a5d7bb4f6c76935ba18e62e;hp=3840bd509ae36356a54442d5c639802adf658bb6;hpb=28e6ca8b6e08d1cdd1af81ae819aa39baa206eaf;p=babeltrace.git diff --git a/include/babeltrace/graph/component-sink-internal.h b/include/babeltrace/graph/component-sink-internal.h index 3840bd50..7b67e2fd 100644 --- a/include/babeltrace/graph/component-sink-internal.h +++ b/include/babeltrace/graph/component-sink-internal.h @@ -2,8 +2,6 @@ #define BABELTRACE_GRAPH_COMPONENT_SINK_INTERNAL_H /* - * BabelTrace - Sink Component internal - * * Copyright 2015 Jérémie Galarneau * * Author: Jérémie Galarneau @@ -33,21 +31,10 @@ #include #include -struct bt_value; - -//typedef uint32_t notification_mask_t; - struct bt_component_sink { struct bt_component parent; }; -/** - * Allocate a sink component. - * - * @param class Component class - * @param params A dictionary of component parameters - * @returns A sink component instance - */ BT_HIDDEN struct bt_component *bt_component_sink_create( struct bt_component_class *class); @@ -55,31 +42,4 @@ struct bt_component *bt_component_sink_create( BT_HIDDEN void bt_component_sink_destroy(struct bt_component *component); -static inline -enum bt_component_status bt_component_sink_consume( - struct bt_component *component) -{ - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; - struct bt_component_class_sink *sink_class = NULL; - - BT_ASSERT(component); - BT_ASSERT(bt_component_get_class_type(component) == - BT_COMPONENT_CLASS_TYPE_SINK); - sink_class = container_of(component->class, - struct bt_component_class_sink, parent); - BT_ASSERT(sink_class->methods.consume); - BT_LOGD("Calling user's consume method: " - "comp-addr=%p, comp-name=\"%s\"", - component, bt_component_get_name(component)); - ret = sink_class->methods.consume( - bt_private_component_from_component(component)); - BT_LOGD("User method returned: status=%s", - bt_component_status_string(ret)); - if (ret < 0) { - BT_LOGW_STR("Consume method failed."); - } - - return ret; -} - #endif /* BABELTRACE_GRAPH_COMPONENT_SINK_INTERNAL_H */