X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fgraph%2Fcomponent-class.c;h=516c31f19ab1be814ca80688c87cca4b6a3df239;hb=1353b066072e6c389ff35853bac83f65597e7a6a;hp=be0fdf70bdaacb99856ee47b0448eaef39fc080c;hpb=43c59509042845f8d42c3e99ec74d45fa2dc0908;p=babeltrace.git diff --git a/src/lib/graph/component-class.c b/src/lib/graph/component-class.c index be0fdf70..516c31f1 100644 --- a/src/lib/graph/component-class.c +++ b/src/lib/graph/component-class.c @@ -1,31 +1,15 @@ /* + * SPDX-License-Identifier: MIT + * * Copyright 2017-2018 Philippe Proulx * Copyright 2016 Jérémie Galarneau - * - * 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 - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. */ #define BT_LOG_TAG "LIB/COMPONENT-CLASS" #include "lib/logging.h" #include "common/assert.h" -#include "lib/assert-pre.h" +#include "lib/assert-cond.h" #include "compat/compiler.h" #include #include @@ -35,8 +19,9 @@ #include "lib/func-status.h" #include "lib/graph/message-iterator-class.h" -#define BT_ASSERT_PRE_DEV_COMP_CLS_HOT(_cc) \ - BT_ASSERT_PRE_DEV_HOT(((const struct bt_component_class *) (_cc)), \ +#define BT_ASSERT_PRE_DEV_COMP_CLS_HOT(_cc) \ + BT_ASSERT_PRE_DEV_HOT("component-class", \ + ((const struct bt_component_class *) (_cc)), \ "Component class", ": %!+C", (_cc)) static @@ -51,15 +36,17 @@ void destroy_component_class(struct bt_object *obj) BT_LIB_LOGI("Destroying component class: %!+C", class); /* Call destroy listeners in reverse registration order */ - for (i = class->destroy_listeners->len - 1; i >= 0; i--) { - struct bt_component_class_destroy_listener *listener = - &g_array_index(class->destroy_listeners, - struct bt_component_class_destroy_listener, - i); - - BT_LOGD("Calling destroy listener: func-addr=%p, data-addr=%p", - listener->func, listener->data); - listener->func(class, listener->data); + if (class->destroy_listeners) { + for (i = class->destroy_listeners->len - 1; i >= 0; i--) { + struct bt_component_class_destroy_listener *listener = + &g_array_index(class->destroy_listeners, + struct bt_component_class_destroy_listener, + i); + + BT_LOGD("Calling destroy listener: func-addr=%p, data-addr=%p", + listener->func, listener->data); + listener->func(class, listener->data); + } } if (class->name) { @@ -169,6 +156,7 @@ end: return ret; } +BT_EXPORT struct bt_component_class_source *bt_component_class_source_create( const char *name, struct bt_message_iterator_class *message_iterator_class) @@ -177,8 +165,8 @@ struct bt_component_class_source *bt_component_class_source_create( int ret; BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(name, "Name"); - BT_ASSERT_PRE_NON_NULL(message_iterator_class, "Message iterator class"); + BT_ASSERT_PRE_NAME_NON_NULL(name); + BT_ASSERT_PRE_MSG_ITER_CLS_NON_NULL(message_iterator_class); BT_LIB_LOGI("Creating source component class: " "name=\"%s\", %![msg-iter-cls-]+I", name, message_iterator_class); @@ -208,6 +196,7 @@ end: return (void *) source_class; } +BT_EXPORT struct bt_component_class_filter *bt_component_class_filter_create( const char *name, struct bt_message_iterator_class *message_iterator_class) @@ -216,8 +205,8 @@ struct bt_component_class_filter *bt_component_class_filter_create( int ret; BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(name, "Name"); - BT_ASSERT_PRE_NON_NULL(message_iterator_class, "Message iterator class"); + BT_ASSERT_PRE_NAME_NON_NULL(name); + BT_ASSERT_PRE_MSG_ITER_CLS_NON_NULL(message_iterator_class); BT_LIB_LOGI("Creating filter component class: " "name=\"%s\", %![msg-iter-cls-]+I", name, message_iterator_class); @@ -247,6 +236,7 @@ end: return (void *) filter_class; } +BT_EXPORT struct bt_component_class_sink *bt_component_class_sink_create( const char *name, bt_component_class_sink_consume_method method) { @@ -254,8 +244,8 @@ struct bt_component_class_sink *bt_component_class_sink_create( int ret; BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(name, "Name"); - BT_ASSERT_PRE_NON_NULL(method, "Consume next method"); + BT_ASSERT_PRE_NAME_NON_NULL(name); + BT_ASSERT_PRE_NON_NULL("consume-method", method, "Consume next method"); BT_LOGI("Creating sink component class: " "name=\"%s\", consume-method-addr=%p", name, method); @@ -286,14 +276,15 @@ end: return (void *) sink_class; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_source_set_get_supported_mip_versions_method( struct bt_component_class_source *comp_cls, bt_component_class_source_get_supported_mip_versions_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.get_supported_mip_versions = method; BT_LIB_LOGD("Set source component class's \"get supported MIP versions\" method: " @@ -301,14 +292,15 @@ bt_component_class_source_set_get_supported_mip_versions_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_get_supported_mip_versions_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_get_supported_mip_versions_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.get_supported_mip_versions = method; BT_LIB_LOGD("Set filter component class's \"get supported MIP versions\" method: " @@ -316,14 +308,15 @@ bt_component_class_filter_set_get_supported_mip_versions_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_get_supported_mip_versions_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_get_supported_mip_versions_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.get_supported_mip_versions = method; BT_LIB_LOGD("Set sink component class's \"get supported MIP versions\" method: " @@ -331,14 +324,15 @@ bt_component_class_sink_set_get_supported_mip_versions_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_source_set_initialize_method( struct bt_component_class_source *comp_cls, bt_component_class_source_initialize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; BT_LIB_LOGD("Set source component class's initialization method: " @@ -346,14 +340,15 @@ bt_component_class_source_set_initialize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_initialize_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_initialize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; BT_LIB_LOGD("Set filter component class's initialization method: " @@ -361,14 +356,15 @@ bt_component_class_filter_set_initialize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_initialize_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_initialize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; BT_LIB_LOGD("Set sink component class's initialization method: " @@ -376,14 +372,15 @@ bt_component_class_sink_set_initialize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_source_set_finalize_method( struct bt_component_class_source *comp_cls, bt_component_class_source_finalize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; BT_LIB_LOGD("Set source component class's finalization method: " @@ -391,14 +388,15 @@ bt_component_class_source_set_finalize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_finalize_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_finalize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; BT_LIB_LOGD("Set filter component class's finalization method: " @@ -406,14 +404,15 @@ bt_component_class_filter_set_finalize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_finalize_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_finalize_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; BT_LIB_LOGD("Set sink component class's finalization method: " @@ -421,14 +420,15 @@ bt_component_class_sink_set_finalize_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_source_set_query_method( struct bt_component_class_source *comp_cls, bt_component_class_source_query_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; BT_LIB_LOGD("Set source component class's query method: " @@ -436,14 +436,15 @@ bt_component_class_source_set_query_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_query_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_query_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; BT_LIB_LOGD("Set filter component class's query method: " @@ -451,14 +452,15 @@ bt_component_class_filter_set_query_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_query_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_query_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; BT_LIB_LOGD("Set sink component class's query method: " @@ -466,14 +468,15 @@ bt_component_class_sink_set_query_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_input_port_connected_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_input_port_connected_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.input_port_connected = method; BT_LIB_LOGD("Set filter component class's \"input port connected\" method" @@ -481,14 +484,15 @@ bt_component_class_filter_set_input_port_connected_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_input_port_connected_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_input_port_connected_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.input_port_connected = method; BT_LIB_LOGD("Set sink component class's \"input port connected\" method" @@ -496,14 +500,15 @@ bt_component_class_sink_set_input_port_connected_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_source_set_output_port_connected_method( struct bt_component_class_source *comp_cls, bt_component_class_source_output_port_connected_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.output_port_connected = method; BT_LIB_LOGD("Set source component class's \"output port connected\" method" @@ -511,14 +516,15 @@ bt_component_class_source_set_output_port_connected_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_filter_set_output_port_connected_method( struct bt_component_class_filter *comp_cls, bt_component_class_filter_output_port_connected_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.output_port_connected = method; BT_LIB_LOGD("Set filter component class's \"output port connected\" method" @@ -526,14 +532,15 @@ bt_component_class_filter_set_output_port_connected_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_method_status bt_component_class_sink_set_graph_is_configured_method( struct bt_component_class_sink *comp_cls, bt_component_class_sink_graph_is_configured_method method) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(method, "Method"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_METHOD_NON_NULL(method); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); comp_cls->methods.graph_is_configured = method; BT_LIB_LOGD("Set sink component class's \"graph is configured\" method" @@ -541,68 +548,73 @@ bt_component_class_sink_set_graph_is_configured_method( return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_description_status bt_component_class_set_description( struct bt_component_class *comp_cls, const char *description) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(description, "Description"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_DESCR_NON_NULL(description); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); g_string_assign(comp_cls->description, description); BT_LIB_LOGD("Set component class's description: " "addr=%p, name=\"%s\", type=%s", comp_cls, bt_component_class_get_name(comp_cls), - bt_component_class_type_string(comp_cls->type)); + bt_common_component_class_type_string(comp_cls->type)); return BT_FUNC_STATUS_OK; } +BT_EXPORT enum bt_component_class_set_help_status bt_component_class_set_help( struct bt_component_class *comp_cls, const char *help) { BT_ASSERT_PRE_NO_ERROR(); - BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class"); - BT_ASSERT_PRE_NON_NULL(help, "Help"); + BT_ASSERT_PRE_COMP_CLS_NON_NULL(comp_cls); + BT_ASSERT_PRE_NON_NULL("help-text", help, "Help text"); BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls); g_string_assign(comp_cls->help, help); BT_LIB_LOGD("Set component class's help text: %!+C", comp_cls); return BT_FUNC_STATUS_OK; } +BT_EXPORT const char *bt_component_class_get_name(const struct bt_component_class *comp_cls) { - BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class"); + BT_ASSERT_PRE_DEV_COMP_CLS_NON_NULL(comp_cls); return comp_cls->name->str; } +BT_EXPORT enum bt_component_class_type bt_component_class_get_type( const struct bt_component_class *comp_cls) { - BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class"); + BT_ASSERT_PRE_DEV_COMP_CLS_NON_NULL(comp_cls); return comp_cls->type; } +BT_EXPORT const char *bt_component_class_get_description( const struct bt_component_class *comp_cls) { - BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class"); + BT_ASSERT_PRE_DEV_COMP_CLS_NON_NULL(comp_cls); return comp_cls->description && comp_cls->description->str[0] != '\0' ? comp_cls->description->str : NULL; } +BT_EXPORT const char *bt_component_class_get_help( const struct bt_component_class *comp_cls) { - BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class"); + BT_ASSERT_PRE_DEV_COMP_CLS_NON_NULL(comp_cls); return comp_cls->help && comp_cls->help->str[0] != '\0' ? comp_cls->help->str : NULL; } -BT_HIDDEN void bt_component_class_add_destroy_listener( struct bt_component_class *comp_cls, bt_component_class_destroy_listener_func func, void *data) @@ -618,7 +630,6 @@ void bt_component_class_add_destroy_listener( "%![cc-]+C, listener-func-addr=%p", comp_cls, func); } -BT_HIDDEN void _bt_component_class_freeze(const struct bt_component_class *comp_cls) { BT_ASSERT(comp_cls); @@ -626,48 +637,56 @@ void _bt_component_class_freeze(const struct bt_component_class *comp_cls) ((struct bt_component_class *) comp_cls)->frozen = true; } +BT_EXPORT void bt_component_class_get_ref( const struct bt_component_class *component_class) { bt_object_get_ref(component_class); } +BT_EXPORT void bt_component_class_put_ref( const struct bt_component_class *component_class) { bt_object_put_ref(component_class); } +BT_EXPORT void bt_component_class_source_get_ref( const struct bt_component_class_source *component_class_source) { bt_object_get_ref(component_class_source); } +BT_EXPORT void bt_component_class_source_put_ref( const struct bt_component_class_source *component_class_source) { bt_object_put_ref(component_class_source); } +BT_EXPORT void bt_component_class_filter_get_ref( const struct bt_component_class_filter *component_class_filter) { bt_object_get_ref(component_class_filter); } +BT_EXPORT void bt_component_class_filter_put_ref( const struct bt_component_class_filter *component_class_filter) { bt_object_put_ref(component_class_filter); } +BT_EXPORT void bt_component_class_sink_get_ref( const struct bt_component_class_sink *component_class_sink) { bt_object_get_ref(component_class_sink); } +BT_EXPORT void bt_component_class_sink_put_ref( const struct bt_component_class_sink *component_class_sink) {