py_res = PyObject_CallFunction(py_callable, "(OiOi)",
py_component_ptr, component_class_type, py_port_ptr, port_type);
if (!py_res) {
- loge_exception("Graph's port added listener (Python)",
+ loge_exception_append_cause(
+ "Graph's port added listener (Python)",
BT_LOG_OUTPUT_LEVEL);
PyErr_Clear();
status = __BT_FUNC_STATUS_ERROR;
goto error;
}
-
PyTuple_SET_ITEM(py_listener_ids, 3, py_listener_id);
py_listener_id = NULL;
Py_INCREF(py_listener_ids);
end:
-
Py_XDECREF(py_listener_id);
return py_listener_ids;
}
py_downstream_component_ptr, downstream_component_class_type,
py_downstream_port_ptr);
if (!py_res) {
- loge_exception("Graph's port connected listener (Python)",
+ loge_exception_append_cause(
+ "Graph's port connected listener (Python)",
BT_LOG_OUTPUT_LEVEL);
PyErr_Clear();
status = __BT_FUNC_STATUS_ERROR;
Py_XDECREF(py_listener_id);
return py_listener_ids;
}
+
+static
+bt_graph_add_component_status
+bt_bt2_graph_add_source_component(
+ bt_graph *graph,
+ const bt_component_class_source *component_class,
+ const char *name, const bt_value *params,
+ PyObject *obj, bt_logging_level log_level,
+ const bt_component_source **component)
+{
+ return bt_graph_add_source_component_with_initialize_method_data(graph,
+ component_class, name, params, obj == Py_None ? NULL : obj,
+ log_level, component);
+}
+
+static
+bt_graph_add_component_status
+bt_bt2_graph_add_filter_component(
+ bt_graph *graph,
+ const bt_component_class_filter *component_class,
+ const char *name, const bt_value *params,
+ PyObject *obj, bt_logging_level log_level,
+ const bt_component_filter **component)
+{
+ return bt_graph_add_filter_component_with_initialize_method_data(graph,
+ component_class, name, params, obj == Py_None ? NULL : obj,
+ log_level, component);
+}
+
+static
+bt_graph_add_component_status
+bt_bt2_graph_add_sink_component(
+ bt_graph *graph,
+ const bt_component_class_sink *component_class,
+ const char *name, const bt_value *params,
+ PyObject *obj, bt_logging_level log_level,
+ const bt_component_sink **component)
+{
+ return bt_graph_add_sink_component_with_initialize_method_data(graph,
+ component_class, name, params, obj == Py_None ? NULL : obj,
+ log_level, component);
+}