/*
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
* Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
#define BT_LOG_TAG "COMP-SINK"
#include <babeltrace/lib-logging-internal.h>
+#include <babeltrace/assert-internal.h>
+#include <babeltrace/assert-pre-internal.h>
#include <babeltrace/compiler-internal.h>
-#include <babeltrace/values.h>
+#include <babeltrace/value.h>
#include <babeltrace/graph/self-component-sink.h>
-#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/component-sink-const.h>
#include <babeltrace/graph/component-sink-internal.h>
#include <babeltrace/graph/component-internal.h>
-#include <babeltrace/graph/notification.h>
#include <babeltrace/graph/graph.h>
-#include <babeltrace/object.h>
-#include <babeltrace/assert-internal.h>
-#include <babeltrace/assert-pre-internal.h>
BT_HIDDEN
void bt_component_sink_destroy(struct bt_component *component)
}
BT_HIDDEN
-struct bt_component *bt_component_sink_create(struct bt_component_class *class)
+struct bt_component *bt_component_sink_create(
+ const struct bt_component_class *class)
{
struct bt_component_sink *sink = NULL;
}
uint64_t bt_component_sink_get_input_port_count(
- struct bt_component_sink *component)
+ const struct bt_component_sink *component)
{
/* bt_component_get_input_port_count() logs details/errors */
return bt_component_get_input_port_count((void *) component);
}
-struct bt_port_input *bt_component_sink_borrow_input_port_by_name(
- struct bt_component_sink *component, const char *name)
+const struct bt_port_input *
+bt_component_sink_borrow_input_port_by_name_const(
+ const struct bt_component_sink *component, const char *name)
{
/* bt_component_borrow_input_port_by_name() logs details/errors */
return bt_component_borrow_input_port_by_name((void *) component, name);
(void *) component, name);
}
-struct bt_port_input *bt_component_sink_borrow_input_port_by_index(
- struct bt_component_sink *component, uint64_t index)
+const struct bt_port_input *bt_component_sink_borrow_input_port_by_index_const(
+ const struct bt_component_sink *component, uint64_t index)
{
/* bt_component_borrow_input_port_by_index() logs details/errors */
return bt_component_borrow_input_port_by_index(
bt_object_put_ref(port);
return status;
}
+
+void bt_component_sink_get_ref(
+ const struct bt_component_sink *component_sink)
+{
+ bt_object_get_ref(component_sink);
+}
+
+void bt_component_sink_put_ref(
+ const struct bt_component_sink *component_sink)
+{
+ bt_object_put_ref(component_sink);
+}