* SOFTWARE.
*/
-#include <babeltrace/babeltrace.h>
-#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace2/babeltrace.h>
+#include <babeltrace2/babeltrace-internal.h>
#include <plugins-common.h>
-#include <babeltrace/assert-internal.h>
+#include <babeltrace2/assert-internal.h>
#include "dummy.h"
+static
+const char * const in_port_name = "in";
+
void destroy_private_dummy_data(struct dummy *dummy)
{
bt_self_component_port_input_message_iterator_put_ref(dummy->msg_iter);
}
BT_HIDDEN
-enum bt_self_component_status dummy_init(
+bt_self_component_status dummy_init(
bt_self_component_sink *component,
const bt_value *params,
UNUSED_VAR void *init_method_data)
{
- enum bt_self_component_status ret;
+ bt_self_component_status ret;
struct dummy *dummy = g_new0(struct dummy, 1);
if (!dummy) {
}
BT_HIDDEN
-enum bt_self_component_status dummy_port_connected(
- bt_self_component_sink *comp,
- bt_self_component_port_input *self_port,
- const bt_port_output *other_port)
+bt_self_component_status dummy_graph_is_configured(
+ bt_self_component_sink *comp)
{
- enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
+ bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
struct dummy *dummy;
bt_self_component_port_input_message_iterator *iterator;
bt_self_component_sink_as_self_component(comp));
BT_ASSERT(dummy);
iterator = bt_self_component_port_input_message_iterator_create(
- self_port);
+ bt_self_component_sink_borrow_input_port_by_name(comp,
+ in_port_name));
if (!iterator) {
status = BT_SELF_COMPONENT_STATUS_NOMEM;
goto end;
}
BT_HIDDEN
-enum bt_self_component_status dummy_consume(
+bt_self_component_status dummy_consume(
bt_self_component_sink *component)
{
- enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
+ bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
bt_message_array_const msgs;
uint64_t count;
struct dummy *dummy;
- enum bt_message_iterator_status it_ret;
+ bt_message_iterator_status it_ret;
uint64_t i;
dummy = bt_self_component_get_data(