#include "lib/func-status.h"
static
-struct bt_component * (* const component_create_funcs[])(
- const struct bt_component_class *) = {
+struct bt_component * (* const component_create_funcs[])(void) = {
[BT_COMPONENT_CLASS_TYPE_SOURCE] = bt_component_source_create,
[BT_COMPONENT_CLASS_TYPE_SINK] = bt_component_sink_create,
[BT_COMPONENT_CLASS_TYPE_FILTER] = bt_component_filter_create,
for (i = component->destroy_listeners->len - 1; i >= 0; i--) {
struct bt_component_destroy_listener *listener =
- &g_array_index(component->destroy_listeners,
+ &bt_g_array_index(component->destroy_listeners,
struct bt_component_destroy_listener, i);
listener->func(component, listener->data);
"Component's graph is already configured: "
"%![comp-]+c, %![graph-]+g", component, graph);
- // TODO: Validate that the name is not already used.
-
BT_LIB_LOGI("Adding port to component: %![comp-]+c, "
"port-type=%s, port-name=\"%s\"", component,
bt_port_type_string(port_type), name);
BT_LIB_LOGI("Creating empty component from component class: %![cc-]+C, "
"comp-name=\"%s\", log-level=%s", component_class, name,
bt_common_logging_level_string(log_level));
- component = component_create_funcs[type](component_class);
+ component = component_create_funcs[type]();
if (!component) {
BT_LIB_LOGE_APPEND_CAUSE(
"Cannot create specific component object.");
for (i = 0; i < component->destroy_listeners->len; i++) {
struct bt_component_destroy_listener *listener =
- &g_array_index(component->destroy_listeners,
+ &bt_g_array_index(component->destroy_listeners,
struct bt_component_destroy_listener, i);
if (listener->func == func && listener->data == data) {