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/graph/component-class-const.h>
32 #include <babeltrace2/graph/component-class-source.h>
33 #include <babeltrace2/graph/component-class-source-const.h>
34 #include <babeltrace2/graph/component-class-filter.h>
35 #include <babeltrace2/graph/component-class-filter-const.h>
36 #include <babeltrace2/graph/component-class-sink.h>
37 #include <babeltrace2/graph/component-class-sink-const.h>
38 #include <babeltrace2/types.h>
41 #include "component-class.h"
42 #include "lib/func-status.h"
43 #include "lib/graph/message-iterator-class.h"
45 #define BT_ASSERT_PRE_DEV_COMP_CLS_HOT(_cc) \
46 BT_ASSERT_PRE_DEV_HOT(((const struct bt_component_class *) (_cc)), \
47 "Component class", ": %!+C", (_cc))
50 void destroy_component_class(struct bt_object
*obj
)
52 struct bt_component_class
*class;
56 class = container_of(obj
, struct bt_component_class
, base
);
58 BT_LIB_LOGI("Destroying component class: %!+C", class);
60 /* Call destroy listeners in reverse registration order */
61 for (i
= class->destroy_listeners
->len
- 1; i
>= 0; i
--) {
62 struct bt_component_class_destroy_listener
*listener
=
63 &g_array_index(class->destroy_listeners
,
64 struct bt_component_class_destroy_listener
,
67 BT_LOGD("Calling destroy listener: func-addr=%p, data-addr=%p",
68 listener
->func
, listener
->data
);
69 listener
->func(class, listener
->data
);
73 g_string_free(class->name
, TRUE
);
77 if (class->description
) {
78 g_string_free(class->description
, TRUE
);
79 class->description
= NULL
;
83 g_string_free(class->help
, TRUE
);
87 if (class->plugin_name
) {
88 g_string_free(class->plugin_name
, TRUE
);
89 class->plugin_name
= NULL
;
92 if (class->destroy_listeners
) {
93 g_array_free(class->destroy_listeners
, TRUE
);
94 class->destroy_listeners
= NULL
;
97 if (bt_component_class_has_message_iterator_class(class)) {
98 struct bt_component_class_with_iterator_class
*class_with_iter_class
=
99 container_of(class, struct bt_component_class_with_iterator_class
, parent
);
101 BT_ASSERT(class_with_iter_class
->msg_iter_cls
);
102 bt_message_iterator_class_put_ref(class_with_iter_class
->msg_iter_cls
);
103 class_with_iter_class
->msg_iter_cls
= NULL
;
110 int bt_component_class_init(struct bt_component_class
*class,
111 enum bt_component_class_type type
, const char *name
)
115 bt_object_init_shared(&class->base
, destroy_component_class
);
117 class->name
= g_string_new(name
);
119 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
123 class->description
= g_string_new(NULL
);
124 if (!class->description
) {
125 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
129 class->help
= g_string_new(NULL
);
131 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
135 class->plugin_name
= g_string_new(NULL
);
136 if (!class->plugin_name
) {
137 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
141 class->destroy_listeners
= g_array_new(FALSE
, TRUE
,
142 sizeof(struct bt_component_class_destroy_listener
));
143 if (!class->destroy_listeners
) {
144 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GArray.");
151 BT_OBJECT_PUT_REF_AND_RESET(class);
159 int bt_component_class_with_iterator_class_init(
160 struct bt_component_class_with_iterator_class
*class,
161 enum bt_component_class_type type
, const char *name
,
162 struct bt_message_iterator_class
*message_iterator_class
)
166 ret
= bt_component_class_init(&class->parent
, type
, name
);
171 class->msg_iter_cls
= message_iterator_class
;
172 bt_message_iterator_class_get_ref(class->msg_iter_cls
);
173 bt_message_iterator_class_freeze(class->msg_iter_cls
);
179 struct bt_component_class_source
*bt_component_class_source_create(
181 struct bt_message_iterator_class
*message_iterator_class
)
183 struct bt_component_class_source
*source_class
= NULL
;
186 BT_ASSERT_PRE_NO_ERROR();
187 BT_ASSERT_PRE_NON_NULL(name
, "Name");
188 BT_ASSERT_PRE_NON_NULL(message_iterator_class
, "Message iterator class");
189 BT_LIB_LOGI("Creating source component class: "
190 "name=\"%s\", %![msg-iter-cls-]+I",
191 name
, message_iterator_class
);
192 source_class
= g_new0(struct bt_component_class_source
, 1);
194 BT_LIB_LOGE_APPEND_CAUSE(
195 "Failed to allocate one source component class.");
199 /* bt_component_class_init() logs errors */
200 ret
= bt_component_class_with_iterator_class_init(&source_class
->parent
,
201 BT_COMPONENT_CLASS_TYPE_SOURCE
, name
, message_iterator_class
);
204 * If bt_component_class_init() fails, the component
205 * class is put, therefore its memory is already
212 BT_LIB_LOGI("Created source component class: %!+C", source_class
);
215 return (void *) source_class
;
218 struct bt_component_class_filter
*bt_component_class_filter_create(
220 struct bt_message_iterator_class
*message_iterator_class
)
222 struct bt_component_class_filter
*filter_class
= NULL
;
225 BT_ASSERT_PRE_NO_ERROR();
226 BT_ASSERT_PRE_NON_NULL(name
, "Name");
227 BT_ASSERT_PRE_NON_NULL(message_iterator_class
, "Message iterator class");
228 BT_LIB_LOGI("Creating filter component class: "
229 "name=\"%s\", %![msg-iter-cls-]+I",
230 name
, message_iterator_class
);
231 filter_class
= g_new0(struct bt_component_class_filter
, 1);
233 BT_LIB_LOGE_APPEND_CAUSE(
234 "Failed to allocate one filter component class.");
238 /* bt_component_class_init() logs errors */
239 ret
= bt_component_class_with_iterator_class_init(&filter_class
->parent
,
240 BT_COMPONENT_CLASS_TYPE_FILTER
, name
, message_iterator_class
);
243 * If bt_component_class_init() fails, the component
244 * class is put, therefore its memory is already
251 BT_LIB_LOGI("Created filter component class: %!+C", filter_class
);
254 return (void *) filter_class
;
257 struct bt_component_class_sink
*bt_component_class_sink_create(
258 const char *name
, bt_component_class_sink_consume_method method
)
260 struct bt_component_class_sink
*sink_class
= NULL
;
263 BT_ASSERT_PRE_NO_ERROR();
264 BT_ASSERT_PRE_NON_NULL(name
, "Name");
265 BT_ASSERT_PRE_NON_NULL(method
, "Consume next method");
266 BT_LOGI("Creating sink component class: "
267 "name=\"%s\", consume-method-addr=%p",
269 sink_class
= g_new0(struct bt_component_class_sink
, 1);
271 BT_LIB_LOGE_APPEND_CAUSE(
272 "Failed to allocate one sink component class.");
276 /* bt_component_class_init() logs errors */
277 ret
= bt_component_class_init(&sink_class
->parent
,
278 BT_COMPONENT_CLASS_TYPE_SINK
, name
);
281 * If bt_component_class_init() fails, the component
282 * class is put, therefore its memory is already
289 sink_class
->methods
.consume
= method
;
290 BT_LIB_LOGI("Created sink component class: %!+C", sink_class
);
293 return (void *) sink_class
;
296 enum bt_component_class_set_method_status
297 bt_component_class_source_set_get_supported_mip_versions_method(
298 struct bt_component_class_source
*comp_cls
,
299 bt_component_class_source_get_supported_mip_versions_method method
)
301 BT_ASSERT_PRE_NO_ERROR();
302 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
303 BT_ASSERT_PRE_NON_NULL(method
, "Method");
304 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
305 comp_cls
->methods
.get_supported_mip_versions
= method
;
306 BT_LIB_LOGD("Set source component class's \"get supported MIP versions\" method: "
308 return BT_FUNC_STATUS_OK
;
311 enum bt_component_class_set_method_status
312 bt_component_class_filter_set_get_supported_mip_versions_method(
313 struct bt_component_class_filter
*comp_cls
,
314 bt_component_class_filter_get_supported_mip_versions_method method
)
316 BT_ASSERT_PRE_NO_ERROR();
317 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
318 BT_ASSERT_PRE_NON_NULL(method
, "Method");
319 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
320 comp_cls
->methods
.get_supported_mip_versions
= method
;
321 BT_LIB_LOGD("Set filter component class's \"get supported MIP versions\" method: "
323 return BT_FUNC_STATUS_OK
;
326 enum bt_component_class_set_method_status
327 bt_component_class_sink_set_get_supported_mip_versions_method(
328 struct bt_component_class_sink
*comp_cls
,
329 bt_component_class_sink_get_supported_mip_versions_method method
)
331 BT_ASSERT_PRE_NO_ERROR();
332 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
333 BT_ASSERT_PRE_NON_NULL(method
, "Method");
334 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
335 comp_cls
->methods
.get_supported_mip_versions
= method
;
336 BT_LIB_LOGD("Set sink component class's \"get supported MIP versions\" method: "
338 return BT_FUNC_STATUS_OK
;
341 enum bt_component_class_set_method_status
342 bt_component_class_source_set_initialize_method(
343 struct bt_component_class_source
*comp_cls
,
344 bt_component_class_source_initialize_method method
)
346 BT_ASSERT_PRE_NO_ERROR();
347 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
348 BT_ASSERT_PRE_NON_NULL(method
, "Method");
349 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
350 comp_cls
->methods
.init
= method
;
351 BT_LIB_LOGD("Set source component class's initialization method: "
353 return BT_FUNC_STATUS_OK
;
356 enum bt_component_class_set_method_status
357 bt_component_class_filter_set_initialize_method(
358 struct bt_component_class_filter
*comp_cls
,
359 bt_component_class_filter_initialize_method method
)
361 BT_ASSERT_PRE_NO_ERROR();
362 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
363 BT_ASSERT_PRE_NON_NULL(method
, "Method");
364 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
365 comp_cls
->methods
.init
= method
;
366 BT_LIB_LOGD("Set filter component class's initialization method: "
368 return BT_FUNC_STATUS_OK
;
371 enum bt_component_class_set_method_status
372 bt_component_class_sink_set_initialize_method(
373 struct bt_component_class_sink
*comp_cls
,
374 bt_component_class_sink_initialize_method method
)
376 BT_ASSERT_PRE_NO_ERROR();
377 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
378 BT_ASSERT_PRE_NON_NULL(method
, "Method");
379 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
380 comp_cls
->methods
.init
= method
;
381 BT_LIB_LOGD("Set sink component class's initialization method: "
383 return BT_FUNC_STATUS_OK
;
386 enum bt_component_class_set_method_status
387 bt_component_class_source_set_finalize_method(
388 struct bt_component_class_source
*comp_cls
,
389 bt_component_class_source_finalize_method method
)
391 BT_ASSERT_PRE_NO_ERROR();
392 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
393 BT_ASSERT_PRE_NON_NULL(method
, "Method");
394 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
395 comp_cls
->methods
.finalize
= method
;
396 BT_LIB_LOGD("Set source component class's finalization method: "
398 return BT_FUNC_STATUS_OK
;
401 enum bt_component_class_set_method_status
402 bt_component_class_filter_set_finalize_method(
403 struct bt_component_class_filter
*comp_cls
,
404 bt_component_class_filter_finalize_method method
)
406 BT_ASSERT_PRE_NO_ERROR();
407 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
408 BT_ASSERT_PRE_NON_NULL(method
, "Method");
409 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
410 comp_cls
->methods
.finalize
= method
;
411 BT_LIB_LOGD("Set filter component class's finalization method: "
413 return BT_FUNC_STATUS_OK
;
416 enum bt_component_class_set_method_status
417 bt_component_class_sink_set_finalize_method(
418 struct bt_component_class_sink
*comp_cls
,
419 bt_component_class_sink_finalize_method method
)
421 BT_ASSERT_PRE_NO_ERROR();
422 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
423 BT_ASSERT_PRE_NON_NULL(method
, "Method");
424 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
425 comp_cls
->methods
.finalize
= method
;
426 BT_LIB_LOGD("Set sink component class's finalization method: "
428 return BT_FUNC_STATUS_OK
;
431 enum bt_component_class_set_method_status
432 bt_component_class_source_set_query_method(
433 struct bt_component_class_source
*comp_cls
,
434 bt_component_class_source_query_method method
)
436 BT_ASSERT_PRE_NO_ERROR();
437 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
438 BT_ASSERT_PRE_NON_NULL(method
, "Method");
439 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
440 comp_cls
->methods
.query
= method
;
441 BT_LIB_LOGD("Set source component class's query method: "
443 return BT_FUNC_STATUS_OK
;
446 enum bt_component_class_set_method_status
447 bt_component_class_filter_set_query_method(
448 struct bt_component_class_filter
*comp_cls
,
449 bt_component_class_filter_query_method method
)
451 BT_ASSERT_PRE_NO_ERROR();
452 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
453 BT_ASSERT_PRE_NON_NULL(method
, "Method");
454 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
455 comp_cls
->methods
.query
= method
;
456 BT_LIB_LOGD("Set filter component class's query method: "
458 return BT_FUNC_STATUS_OK
;
461 enum bt_component_class_set_method_status
462 bt_component_class_sink_set_query_method(
463 struct bt_component_class_sink
*comp_cls
,
464 bt_component_class_sink_query_method method
)
466 BT_ASSERT_PRE_NO_ERROR();
467 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
468 BT_ASSERT_PRE_NON_NULL(method
, "Method");
469 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
470 comp_cls
->methods
.query
= method
;
471 BT_LIB_LOGD("Set sink component class's query method: "
473 return BT_FUNC_STATUS_OK
;
476 enum bt_component_class_set_method_status
477 bt_component_class_filter_set_input_port_connected_method(
478 struct bt_component_class_filter
*comp_cls
,
479 bt_component_class_filter_input_port_connected_method method
)
481 BT_ASSERT_PRE_NO_ERROR();
482 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
483 BT_ASSERT_PRE_NON_NULL(method
, "Method");
484 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
485 comp_cls
->methods
.input_port_connected
= method
;
486 BT_LIB_LOGD("Set filter component class's \"input port connected\" method"
488 return BT_FUNC_STATUS_OK
;
491 enum bt_component_class_set_method_status
492 bt_component_class_sink_set_input_port_connected_method(
493 struct bt_component_class_sink
*comp_cls
,
494 bt_component_class_sink_input_port_connected_method method
)
496 BT_ASSERT_PRE_NO_ERROR();
497 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
498 BT_ASSERT_PRE_NON_NULL(method
, "Method");
499 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
500 comp_cls
->methods
.input_port_connected
= method
;
501 BT_LIB_LOGD("Set sink component class's \"input port connected\" method"
503 return BT_FUNC_STATUS_OK
;
506 enum bt_component_class_set_method_status
507 bt_component_class_source_set_output_port_connected_method(
508 struct bt_component_class_source
*comp_cls
,
509 bt_component_class_source_output_port_connected_method method
)
511 BT_ASSERT_PRE_NO_ERROR();
512 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
513 BT_ASSERT_PRE_NON_NULL(method
, "Method");
514 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
515 comp_cls
->methods
.output_port_connected
= method
;
516 BT_LIB_LOGD("Set source component class's \"output port connected\" method"
518 return BT_FUNC_STATUS_OK
;
521 enum bt_component_class_set_method_status
522 bt_component_class_filter_set_output_port_connected_method(
523 struct bt_component_class_filter
*comp_cls
,
524 bt_component_class_filter_output_port_connected_method method
)
526 BT_ASSERT_PRE_NO_ERROR();
527 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
528 BT_ASSERT_PRE_NON_NULL(method
, "Method");
529 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
530 comp_cls
->methods
.output_port_connected
= method
;
531 BT_LIB_LOGD("Set filter component class's \"output port connected\" method"
533 return BT_FUNC_STATUS_OK
;
536 enum bt_component_class_set_method_status
537 bt_component_class_sink_set_graph_is_configured_method(
538 struct bt_component_class_sink
*comp_cls
,
539 bt_component_class_sink_graph_is_configured_method method
)
541 BT_ASSERT_PRE_NO_ERROR();
542 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
543 BT_ASSERT_PRE_NON_NULL(method
, "Method");
544 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
545 comp_cls
->methods
.graph_is_configured
= method
;
546 BT_LIB_LOGD("Set sink component class's \"graph is configured\" method"
548 return BT_FUNC_STATUS_OK
;
551 enum bt_component_class_set_description_status
552 bt_component_class_set_description(
553 struct bt_component_class
*comp_cls
,
554 const char *description
)
556 BT_ASSERT_PRE_NO_ERROR();
557 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
558 BT_ASSERT_PRE_NON_NULL(description
, "Description");
559 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
560 g_string_assign(comp_cls
->description
, description
);
561 BT_LIB_LOGD("Set component class's description: "
562 "addr=%p, name=\"%s\", type=%s",
564 bt_component_class_get_name(comp_cls
),
565 bt_component_class_type_string(comp_cls
->type
));
566 return BT_FUNC_STATUS_OK
;
569 enum bt_component_class_set_help_status
bt_component_class_set_help(
570 struct bt_component_class
*comp_cls
,
573 BT_ASSERT_PRE_NO_ERROR();
574 BT_ASSERT_PRE_NON_NULL(comp_cls
, "Component class");
575 BT_ASSERT_PRE_NON_NULL(help
, "Help");
576 BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls
);
577 g_string_assign(comp_cls
->help
, help
);
578 BT_LIB_LOGD("Set component class's help text: %!+C", comp_cls
);
579 return BT_FUNC_STATUS_OK
;
582 const char *bt_component_class_get_name(const struct bt_component_class
*comp_cls
)
584 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
585 return comp_cls
->name
->str
;
588 enum bt_component_class_type
bt_component_class_get_type(
589 const struct bt_component_class
*comp_cls
)
591 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
592 return comp_cls
->type
;
595 const char *bt_component_class_get_description(
596 const struct bt_component_class
*comp_cls
)
598 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
599 return comp_cls
->description
&&
600 comp_cls
->description
->str
[0] != '\0' ?
601 comp_cls
->description
->str
: NULL
;
604 const char *bt_component_class_get_help(
605 const struct bt_component_class
*comp_cls
)
607 BT_ASSERT_PRE_DEV_NON_NULL(comp_cls
, "Component class");
608 return comp_cls
->help
&&
609 comp_cls
->help
->str
[0] != '\0' ? comp_cls
->help
->str
: NULL
;
613 void bt_component_class_add_destroy_listener(
614 struct bt_component_class
*comp_cls
,
615 bt_component_class_destroy_listener_func func
, void *data
)
617 struct bt_component_class_destroy_listener listener
;
621 listener
.func
= func
;
622 listener
.data
= data
;
623 g_array_append_val(comp_cls
->destroy_listeners
, listener
);
624 BT_LIB_LOGD("Added destroy listener to component class: "
625 "%![cc-]+C, listener-func-addr=%p", comp_cls
, func
);
629 void _bt_component_class_freeze(const struct bt_component_class
*comp_cls
)
632 BT_LIB_LOGD("Freezing component class: %!+C", comp_cls
);
633 ((struct bt_component_class
*) comp_cls
)->frozen
= true;
636 void bt_component_class_get_ref(
637 const struct bt_component_class
*component_class
)
639 bt_object_get_ref(component_class
);
642 void bt_component_class_put_ref(
643 const struct bt_component_class
*component_class
)
645 bt_object_put_ref(component_class
);
648 void bt_component_class_source_get_ref(
649 const struct bt_component_class_source
*component_class_source
)
651 bt_object_get_ref(component_class_source
);
654 void bt_component_class_source_put_ref(
655 const struct bt_component_class_source
*component_class_source
)
657 bt_object_put_ref(component_class_source
);
660 void bt_component_class_filter_get_ref(
661 const struct bt_component_class_filter
*component_class_filter
)
663 bt_object_get_ref(component_class_filter
);
666 void bt_component_class_filter_put_ref(
667 const struct bt_component_class_filter
*component_class_filter
)
669 bt_object_put_ref(component_class_filter
);
672 void bt_component_class_sink_get_ref(
673 const struct bt_component_class_sink
*component_class_sink
)
675 bt_object_get_ref(component_class_sink
);
678 void bt_component_class_sink_put_ref(
679 const struct bt_component_class_sink
*component_class_sink
)
681 bt_object_put_ref(component_class_sink
);