#include "component-class.h"
#include "lib/func-status.h"
-#define BT_ASSERT_PRE_COMP_CLS_HOT(_cc) \
- BT_ASSERT_PRE_HOT(((const struct bt_component_class *) (_cc)), \
+#define BT_ASSERT_PRE_DEV_COMP_CLS_HOT(_cc) \
+ BT_ASSERT_PRE_DEV_HOT(((const struct bt_component_class *) (_cc)), \
"Component class", ": %!+C", (_cc))
static
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.init = method;
BT_LIB_LOGD("Set source component class's initialization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.init = method;
BT_LIB_LOGD("Set filter component class's initialization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.init = method;
BT_LIB_LOGD("Set sink component class's initialization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.finalize = method;
BT_LIB_LOGD("Set source component class's finalization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.finalize = method;
BT_LIB_LOGD("Set filter component class's finalization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.finalize = method;
BT_LIB_LOGD("Set sink component class's finalization method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.query = method;
BT_LIB_LOGD("Set source component class's query method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.query = method;
BT_LIB_LOGD("Set filter component class's query method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.query = method;
BT_LIB_LOGD("Set sink component class's query method: "
"%!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_init = method;
BT_LIB_LOGD("Set source component class's message iterator initialization method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_init = method;
BT_LIB_LOGD("Set filter component class's message iterator initialization method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_finalize = method;
BT_LIB_LOGD("Set source component class's message iterator finalization method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_finalize = method;
BT_LIB_LOGD("Set filter component class's message iterator finalization method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_seek_ns_from_origin = method;
BT_LIB_LOGD("Set filter component class's message iterator \"seek nanoseconds from origin\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_seek_ns_from_origin = method;
BT_LIB_LOGD("Set source component class's message iterator \"seek nanoseconds from origin\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_seek_beginning = method;
BT_LIB_LOGD("Set filter component class's message iterator \"seek beginning\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_seek_beginning = method;
BT_LIB_LOGD("Set source component class's message iterator \"seek beginning\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_can_seek_beginning = method;
BT_LIB_LOGD("Set filter component class's message iterator \"can seek beginning\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_can_seek_beginning = method;
BT_LIB_LOGD("Set source component class's message iterator \"can seek beginning\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_can_seek_ns_from_origin = method;
BT_LIB_LOGD("Set filter component class's message iterator \"can seek nanoseconds from origin\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(method, "Method");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ BT_ASSERT_PRE_DEV_COMP_CLS_HOT(comp_cls);
comp_cls->methods.msg_iter_can_seek_ns_from_origin = method;
BT_LIB_LOGD("Set source component class's message iterator \"can seek nanoseconds from origin\" method"
": %!+C", comp_cls);
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(description, "Description");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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",
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
BT_ASSERT_PRE_NON_NULL(help, "Help");
- BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls);
+ 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;
const char *bt_component_class_get_name(const struct bt_component_class *comp_cls)
{
- BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
+ BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class");
return comp_cls->name->str;
}
enum bt_component_class_type bt_component_class_get_type(
const struct bt_component_class *comp_cls)
{
- BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
+ BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class");
return comp_cls->type;
}
const char *bt_component_class_get_description(
const struct bt_component_class *comp_cls)
{
- BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
+ BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class");
return comp_cls->description &&
comp_cls->description->str[0] != '\0' ?
comp_cls->description->str : NULL;
const char *bt_component_class_get_help(
const struct bt_component_class *comp_cls)
{
- BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
+ BT_ASSERT_PRE_DEV_NON_NULL(comp_cls, "Component class");
return comp_cls->help &&
comp_cls->help->str[0] != '\0' ? comp_cls->help->str : NULL;
}