struct bt_object base;
struct bt_component_class *class;
GString *name;
- /** No ownership of stream taken */
- FILE *error_stream;
/** Source, Sink or Filter destroy */
bt_component_destroy_cb destroy;
extern struct bt_component_class *bt_component_get_class(
struct bt_component *component);
-/**
- * Set component instance's error stream.
- *
- * @param component Component instance
- * @param error_stream Error stream
- * @returns One of #bt_component_status values
- */
-extern enum bt_component_status bt_component_set_error_stream(
- struct bt_component *component, FILE *error_stream);
-
#ifdef __cplusplus
}
#endif
return component ? bt_get(component->class) : NULL;
}
-enum bt_component_status bt_component_set_error_stream(
- struct bt_component *component, FILE *stream)
-{
- enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
-
- if (!component) {
- ret = BT_COMPONENT_STATUS_INVAL;
- goto end;
- }
-
- component->error_stream = stream;
-end:
- return ret;
-}
-
void *bt_component_get_private_data(struct bt_component *component)
{
return component ? component->user_data : NULL;