2 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
3 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 #define BT_LOG_TAG "LIB/COMPONENT-CLASS"
25 #include "lib/logging.h"
27 #include "common/assert.h"
28 #include "lib/assert-pre.h"
29 #include "compat/compiler.h"
30 #include <babeltrace2/graph/component-class.h>
31 #include <babeltrace2/types.h>
34 #include "component-class.h"
35 #include "lib/func-status.h"
36 #include "lib/graph/message-iterator-class.h"
38 #define BT_ASSERT_PRE_DEV_COMP_CLS_HOT(_cc) \
39 BT_ASSERT_PRE_DEV_HOT(((const struct bt_component_class *) (_cc)), \
40 "Component class", ": %!+C", (_cc))
43 void destroy_component_class(struct bt_object
*obj
)
45 struct bt_component_class
*class;
49 class = container_of(obj
, struct bt_component_class
, base
);
51 BT_LIB_LOGI("Destroying component class: %!+C", class);
53 /* Call destroy listeners in reverse registration order */
54 for (i
= class->destroy_listeners
->len
- 1; i
>= 0; i
--) {
55 struct bt_component_class_destroy_listener
*listener
=
56 &g_array_index(class->destroy_listeners
,
57 struct bt_component_class_destroy_listener
,
60 BT_LOGD("Calling destroy listener: func-addr=%p, data-addr=%p",
61 listener
->func
, listener
->data
);
62 listener
->func(class, listener
->data
);
66 g_string_free(class->name
, TRUE
);
70 if (class->description
) {
71 g_string_free(class->description
, TRUE
);
72 class->description
= NULL
;
76 g_string_free(class->help
, TRUE
);
80 if (class->plugin_name
) {
81 g_string_free(class->plugin_name
, TRUE
);
82 class->plugin_name
= NULL
;
85 if (class->destroy_listeners
) {
86 g_array_free(class->destroy_listeners
, TRUE
);
87 class->destroy_listeners
= NULL
;
90 if (bt_component_class_has_message_iterator_class(class)) {
91 struct bt_component_class_with_iterator_class
*class_with_iter_class
=
92 container_of(class, struct bt_component_class_with_iterator_class
, parent
);
94 BT_ASSERT(class_with_iter_class
->msg_iter_cls
);
95 bt_message_iterator_class_put_ref(class_with_iter_class
->msg_iter_cls
);
96 class_with_iter_class
->msg_iter_cls
= NULL
;
103 int bt_component_class_init(struct bt_component_class
*class,
104 enum bt_component_class_type type
, const char *name
)
108 bt_object_init_shared(&class->base
, destroy_component_class
);
110 class->name
= g_string_new(name
);
112 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
116 class->description
= g_string_new(NULL
);
117 if (!class->description
) {
118 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
122 class->help
= g_string_new(NULL
);
124 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
128 class->plugin_name
= g_string_new(NULL
);
129 if (!class->plugin_name
) {
130 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
134 class->destroy_listeners
= g_array_new(FALSE
, TRUE
,
135 sizeof(struct bt_component_class_destroy_listener
));
136 if (!class->destroy_listeners
) {
137 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GArray.");
144 BT_OBJECT_PUT_REF_AND_RESET(class);
152 int bt_component_class_with_iterator_class_init(
153 struct bt_component_class_with_iterator_class
*class,
154 enum bt_component_class_type type
, const char *name
,
155 struct bt_message_iterator_class
*message_iterator_class
)
159 ret
= bt_component_class_init(&class->parent
, type
, name
);
164 class->msg_iter_cls
= message_iterator_class
;
165 bt_message_iterator_class_get_ref(class->msg_iter_cls
);
166 bt_message_iterator_class_freeze(class->msg_iter_cls
);
172 struct bt_component_class_source
*bt_component_class_source_create(
174 struct bt_message_iterator_class
*message_iterator_class
)
176 struct bt_component_class_source
*source_class
= NULL
;
179 BT_ASSERT_PRE_NO_ERROR();
180 BT_ASSERT_PRE_NON_NULL(name
, "Name");
181 BT_ASSERT_PRE_NON_NULL(message_iterator_class
, "Message iterator class");
182 BT_LIB_LOGI("Creating source component class: "
183 "name=\"%s\", %![msg-iter-cls-]+I",
184 name
, message_iterator_class
);
185 source_class
= g_new0(struct bt_component_class_source
, 1);
187 BT_LIB_LOGE_APPEND_CAUSE(
188 "Failed to allocate one source component class.");
192 /* bt_component_class_init() logs errors */
193 ret
= bt_component_class_with_iterator_class_init(&source_class
->parent
,
194 BT_COMPONENT_CLASS_TYPE_SOURCE
, name
, message_iterator_class
);
197 * If bt_component_class_init() fails, the component
198 * class is put, therefore its memory is already
205 BT_LIB_LOGI("Created source component class: %!+C", source_class
);
208 return (void *) source_class
;
211 struct bt_component_class_filter
*bt_component_class_filter_create(
213 struct bt_message_iterator_class
*message_iterator_class
)
215 struct bt_component_class_filter
*filter_class
= NULL
;
218 BT_ASSERT_PRE_NO_ERROR();
219 BT_ASSERT_PRE_NON_NULL(name
, "Name");
220 BT_ASSERT_PRE_NON_NULL(message_iterator_class
, "Message iterator class");
221 BT_LIB_LOGI("Creating filter component class: "
222 "name=\"%s\", %![msg-iter-cls-]+I",
223 name
, message_iterator_class
);
224 filter_class
= g_new0(struct bt_component_class_filter
, 1);
226 BT_LIB_LOGE_APPEND_CAUSE(
227 "Failed to allocate one filter component class.");
231 /* bt_component_class_init() logs errors */
232 ret
= bt_component_class_with_iterator_class_init(&filter_class
->parent
,
233 BT_COMPONENT_CLASS_TYPE_FILTER
, name
, message_iterator_class
);
236 * If bt_component_class_init() fails, the component
237 * class is put, therefore its memory is already
244 BT_LIB_LOGI("Created filter component class: %!+C", filter_class
);
247 return (void *) filter_class
;
250 struct bt_component_class_sink
*bt_component_class_sink_create(
251 const char *name
, bt_component_class_sink_consume_method method
)
253 struct bt_component_class_sink
*sink_class
= NULL
;
256 BT_ASSERT_PRE_NO_ERROR();
257 BT_ASSERT_PRE_NON_NULL(name
, "Name");
258 BT_ASSERT_PRE_NON_NULL(method
, "Consume next method");
259 BT_LOGI("Creating sink component class: "
260 "name=\"%s\", consume-method-addr=%p",
262 sink_class
= g_new0(struct bt_component_class_sink
, 1);
264 BT_LIB_LOGE_APPEND_CAUSE(
265 "Failed to allocate one sink component class.");
269 /* bt_component_class_init() logs errors */
270 ret
= bt_component_class_init(&sink_class
->parent
,
271 BT_COMPONENT_CLASS_TYPE_SINK
, name
);
274 * If bt_component_class_init() fails, the component
275 * class is put, therefore its memory is already
282 sink_class
->methods
.consume
= method
;
283 BT_LIB_LOGI("Created sink component class: %!+C", sink_class
);
286 return (void *) sink_class
;
289 enum bt_component_class_set_method_status
290 bt_component_class_source_set_get_supported_mip_versions_method(
291 struct bt_component_class_source
*comp_cls
,
292 bt_component_class_source_get_supported_mip_versions_method method
)
294 BT_ASSERT_PRE_NO_ERROR();
295 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
296 BT_ASSERT_PRE_NON_NULL(method
, "Method");
297 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
298 comp_cls
->methods
.get_supported_mip_versions
= method
;
299 BT_LIB_LOGD("Set source component class's \"get supported MIP versions\" method: "
301 return BT_FUNC_STATUS_OK
;
304 enum bt_component_class_set_method_status
305 bt_component_class_filter_set_get_supported_mip_versions_method(
306 struct bt_component_class_filter
*comp_cls
,
307 bt_component_class_filter_get_supported_mip_versions_method method
)
309 BT_ASSERT_PRE_NO_ERROR();
310 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
311 BT_ASSERT_PRE_NON_NULL(method
, "Method");
312 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
313 comp_cls
->methods
.get_supported_mip_versions
= method
;
314 BT_LIB_LOGD("Set filter component class's \"get supported MIP versions\" method: "
316 return BT_FUNC_STATUS_OK
;
319 enum bt_component_class_set_method_status
320 bt_component_class_sink_set_get_supported_mip_versions_method(
321 struct bt_component_class_sink
*comp_cls
,
322 bt_component_class_sink_get_supported_mip_versions_method method
)
324 BT_ASSERT_PRE_NO_ERROR();
325 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
326 BT_ASSERT_PRE_NON_NULL(method
, "Method");
327 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
328 comp_cls
->methods
.get_supported_mip_versions
= method
;
329 BT_LIB_LOGD("Set sink component class's \"get supported MIP versions\" method: "
331 return BT_FUNC_STATUS_OK
;
334 enum bt_component_class_set_method_status
335 bt_component_class_source_set_initialize_method(
336 struct bt_component_class_source
*comp_cls
,
337 bt_component_class_source_initialize_method method
)
339 BT_ASSERT_PRE_NO_ERROR();
340 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
341 BT_ASSERT_PRE_NON_NULL(method
, "Method");
342 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
343 comp_cls
->methods
.init
= method
;
344 BT_LIB_LOGD("Set source component class's initialization method: "
346 return BT_FUNC_STATUS_OK
;
349 enum bt_component_class_set_method_status
350 bt_component_class_filter_set_initialize_method(
351 struct bt_component_class_filter
*comp_cls
,
352 bt_component_class_filter_initialize_method method
)
354 BT_ASSERT_PRE_NO_ERROR();
355 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
356 BT_ASSERT_PRE_NON_NULL(method
, "Method");
357 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
358 comp_cls
->methods
.init
= method
;
359 BT_LIB_LOGD("Set filter component class's initialization method: "
361 return BT_FUNC_STATUS_OK
;
364 enum bt_component_class_set_method_status
365 bt_component_class_sink_set_initialize_method(
366 struct bt_component_class_sink
*comp_cls
,
367 bt_component_class_sink_initialize_method method
)
369 BT_ASSERT_PRE_NO_ERROR();
370 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
371 BT_ASSERT_PRE_NON_NULL(method
, "Method");
372 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
373 comp_cls
->methods
.init
= method
;
374 BT_LIB_LOGD("Set sink component class's initialization method: "
376 return BT_FUNC_STATUS_OK
;
379 enum bt_component_class_set_method_status
380 bt_component_class_source_set_finalize_method(
381 struct bt_component_class_source
*comp_cls
,
382 bt_component_class_source_finalize_method method
)
384 BT_ASSERT_PRE_NO_ERROR();
385 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
386 BT_ASSERT_PRE_NON_NULL(method
, "Method");
387 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
388 comp_cls
->methods
.finalize
= method
;
389 BT_LIB_LOGD("Set source component class's finalization method: "
391 return BT_FUNC_STATUS_OK
;
394 enum bt_component_class_set_method_status
395 bt_component_class_filter_set_finalize_method(
396 struct bt_component_class_filter
*comp_cls
,
397 bt_component_class_filter_finalize_method method
)
399 BT_ASSERT_PRE_NO_ERROR();
400 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
401 BT_ASSERT_PRE_NON_NULL(method
, "Method");
402 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
403 comp_cls
->methods
.finalize
= method
;
404 BT_LIB_LOGD("Set filter component class's finalization method: "
406 return BT_FUNC_STATUS_OK
;
409 enum bt_component_class_set_method_status
410 bt_component_class_sink_set_finalize_method(
411 struct bt_component_class_sink
*comp_cls
,
412 bt_component_class_sink_finalize_method method
)
414 BT_ASSERT_PRE_NO_ERROR();
415 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
416 BT_ASSERT_PRE_NON_NULL(method
, "Method");
417 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
418 comp_cls
->methods
.finalize
= method
;
419 BT_LIB_LOGD("Set sink component class's finalization method: "
421 return BT_FUNC_STATUS_OK
;
424 enum bt_component_class_set_method_status
425 bt_component_class_source_set_query_method(
426 struct bt_component_class_source
*comp_cls
,
427 bt_component_class_source_query_method method
)
429 BT_ASSERT_PRE_NO_ERROR();
430 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
431 BT_ASSERT_PRE_NON_NULL(method
, "Method");
432 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
433 comp_cls
->methods
.query
= method
;
434 BT_LIB_LOGD("Set source component class's query method: "
436 return BT_FUNC_STATUS_OK
;
439 enum bt_component_class_set_method_status
440 bt_component_class_filter_set_query_method(
441 struct bt_component_class_filter
*comp_cls
,
442 bt_component_class_filter_query_method method
)
444 BT_ASSERT_PRE_NO_ERROR();
445 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
446 BT_ASSERT_PRE_NON_NULL(method
, "Method");
447 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
448 comp_cls
->methods
.query
= method
;
449 BT_LIB_LOGD("Set filter component class's query method: "
451 return BT_FUNC_STATUS_OK
;
454 enum bt_component_class_set_method_status
455 bt_component_class_sink_set_query_method(
456 struct bt_component_class_sink
*comp_cls
,
457 bt_component_class_sink_query_method method
)
459 BT_ASSERT_PRE_NO_ERROR();
460 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
461 BT_ASSERT_PRE_NON_NULL(method
, "Method");
462 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
463 comp_cls
->methods
.query
= method
;
464 BT_LIB_LOGD("Set sink component class's query method: "
466 return BT_FUNC_STATUS_OK
;
469 enum bt_component_class_set_method_status
470 bt_component_class_filter_set_input_port_connected_method(
471 struct bt_component_class_filter
*comp_cls
,
472 bt_component_class_filter_input_port_connected_method method
)
474 BT_ASSERT_PRE_NO_ERROR();
475 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
476 BT_ASSERT_PRE_NON_NULL(method
, "Method");
477 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
478 comp_cls
->methods
.input_port_connected
= method
;
479 BT_LIB_LOGD("Set filter component class's \"input port connected\" method"
481 return BT_FUNC_STATUS_OK
;
484 enum bt_component_class_set_method_status
485 bt_component_class_sink_set_input_port_connected_method(
486 struct bt_component_class_sink
*comp_cls
,
487 bt_component_class_sink_input_port_connected_method method
)
489 BT_ASSERT_PRE_NO_ERROR();
490 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
491 BT_ASSERT_PRE_NON_NULL(method
, "Method");
492 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
493 comp_cls
->methods
.input_port_connected
= method
;
494 BT_LIB_LOGD("Set sink component class's \"input port connected\" method"
496 return BT_FUNC_STATUS_OK
;
499 enum bt_component_class_set_method_status
500 bt_component_class_source_set_output_port_connected_method(
501 struct bt_component_class_source
*comp_cls
,
502 bt_component_class_source_output_port_connected_method method
)
504 BT_ASSERT_PRE_NO_ERROR();
505 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
506 BT_ASSERT_PRE_NON_NULL(method
, "Method");
507 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
508 comp_cls
->methods
.output_port_connected
= method
;
509 BT_LIB_LOGD("Set source component class's \"output port connected\" method"
511 return BT_FUNC_STATUS_OK
;
514 enum bt_component_class_set_method_status
515 bt_component_class_filter_set_output_port_connected_method(
516 struct bt_component_class_filter
*comp_cls
,
517 bt_component_class_filter_output_port_connected_method method
)
519 BT_ASSERT_PRE_NO_ERROR();
520 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
521 BT_ASSERT_PRE_NON_NULL(method
, "Method");
522 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
523 comp_cls
->methods
.output_port_connected
= method
;
524 BT_LIB_LOGD("Set filter component class's \"output port connected\" method"
526 return BT_FUNC_STATUS_OK
;
529 enum bt_component_class_set_method_status
530 bt_component_class_sink_set_graph_is_configured_method(
531 struct bt_component_class_sink
*comp_cls
,
532 bt_component_class_sink_graph_is_configured_method method
)
534 BT_ASSERT_PRE_NO_ERROR();
535 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
536 BT_ASSERT_PRE_NON_NULL(method
, "Method");
537 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
538 comp_cls
->methods
.graph_is_configured
= method
;
539 BT_LIB_LOGD("Set sink component class's \"graph is configured\" method"
541 return BT_FUNC_STATUS_OK
;
544 enum bt_component_class_set_description_status
545 bt_component_class_set_description(
546 struct bt_component_class
*comp_cls
,
547 const char *description
)
549 BT_ASSERT_PRE_NO_ERROR();
550 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
551 BT_ASSERT_PRE_NON_NULL(description
, "Description");
552 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
553 g_string_assign(comp_cls
->description
, description
);
554 BT_LIB_LOGD("Set component class's description: "
555 "addr=%p, name=\"%s\", type=%s",
557 bt_component_class_get_name(comp_cls
),
558 bt_component_class_type_string(comp_cls
->type
));
559 return BT_FUNC_STATUS_OK
;
562 enum bt_component_class_set_help_status
bt_component_class_set_help(
563 struct bt_component_class
*comp_cls
,
566 BT_ASSERT_PRE_NO_ERROR();
567 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
568 BT_ASSERT_PRE_NON_NULL(help
, "Help");
569 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
570 g_string_assign(comp_cls
->help
, help
);
571 BT_LIB_LOGD("Set component class's help text: %!+C", comp_cls
);
572 return BT_FUNC_STATUS_OK
;
575 const char *bt_component_class_get_name(const struct bt_component_class
*comp_cls
)
577 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
578 return comp_cls
->name
->str
;
581 enum bt_component_class_type
bt_component_class_get_type(
582 const struct bt_component_class
*comp_cls
)
584 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
585 return comp_cls
->type
;
588 const char *bt_component_class_get_description(
589 const struct bt_component_class
*comp_cls
)
591 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
592 return comp_cls
->description
&&
593 comp_cls
->description
->str
[0] != '\0' ?
594 comp_cls
->description
->str
: NULL
;
597 const char *bt_component_class_get_help(
598 const struct bt_component_class
*comp_cls
)
600 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
601 return comp_cls
->help
&&
602 comp_cls
->help
->str
[0] != '\0' ? comp_cls
->help
->str
: NULL
;
606 void bt_component_class_add_destroy_listener(
607 struct bt_component_class
*comp_cls
,
608 bt_component_class_destroy_listener_func func
, void *data
)
610 struct bt_component_class_destroy_listener listener
;
614 listener
.func
= func
;
615 listener
.data
= data
;
616 g_array_append_val(comp_cls
->destroy_listeners
, listener
);
617 BT_LIB_LOGD("Added destroy listener to component class: "
618 "%![cc-]+C, listener-func-addr=%p", comp_cls
, func
);
622 void _bt_component_class_freeze(const struct bt_component_class
*comp_cls
)
625 BT_LIB_LOGD("Freezing component class: %!+C", comp_cls
);
626 ((struct bt_component_class
*) comp_cls
)->frozen
= true;
629 void bt_component_class_get_ref(
630 const struct bt_component_class
*component_class
)
632 bt_object_get_ref(component_class
);
635 void bt_component_class_put_ref(
636 const struct bt_component_class
*component_class
)
638 bt_object_put_ref(component_class
);
641 void bt_component_class_source_get_ref(
642 const struct bt_component_class_source
*component_class_source
)
644 bt_object_get_ref(component_class_source
);
647 void bt_component_class_source_put_ref(
648 const struct bt_component_class_source
*component_class_source
)
650 bt_object_put_ref(component_class_source
);
653 void bt_component_class_filter_get_ref(
654 const struct bt_component_class_filter
*component_class_filter
)
656 bt_object_get_ref(component_class_filter
);
659 void bt_component_class_filter_put_ref(
660 const struct bt_component_class_filter
*component_class_filter
)
662 bt_object_put_ref(component_class_filter
);
665 void bt_component_class_sink_get_ref(
666 const struct bt_component_class_sink
*component_class_sink
)
668 bt_object_get_ref(component_class_sink
);
671 void bt_component_class_sink_put_ref(
672 const struct bt_component_class_sink
*component_class_sink
)
674 bt_object_put_ref(component_class_sink
);