X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fcomponent-class.h;h=454abba81534b5962599a6976943c38b2462808c;hb=7b53201cfb06ec02f4203e28458dfbcf53d87988;hp=46cb59d2e08b559e216db9bd7d353622423369b5;hpb=3a2cb327fd24e53a9b163372b9079003dd422655;p=babeltrace.git diff --git a/include/babeltrace/graph/component-class.h b/include/babeltrace/graph/component-class.h index 46cb59d2..454abba8 100644 --- a/include/babeltrace/graph/component-class.h +++ b/include/babeltrace/graph/component-class.h @@ -23,8 +23,8 @@ * SOFTWARE. */ -/* For bt_bool */ -#include +/* For enum bt_query_executor_status */ +#include #ifdef __cplusplus extern "C" { @@ -32,44 +32,22 @@ extern "C" { struct bt_component_class; -enum bt_component_class_type { - BT_COMPONENT_CLASS_TYPE_SOURCE = 0, - BT_COMPONENT_CLASS_TYPE_FILTER = 1, - BT_COMPONENT_CLASS_TYPE_SINK = 2, +enum bt_query_status { + BT_QUERY_STATUS_OK = BT_QUERY_EXECUTOR_STATUS_OK, + BT_QUERY_STATUS_AGAIN = BT_QUERY_EXECUTOR_STATUS_AGAIN, + BT_QUERY_STATUS_ERROR = BT_QUERY_EXECUTOR_STATUS_ERROR, + BT_QUERY_STATUS_NOMEM = BT_QUERY_EXECUTOR_STATUS_NOMEM, + BT_QUERY_STATUS_INVALID_OBJECT = BT_QUERY_EXECUTOR_STATUS_INVALID_OBJECT, + BT_QUERY_STATUS_INVALID_PARAMS = BT_QUERY_EXECUTOR_STATUS_INVALID_PARAMS, }; -extern const char *bt_component_class_get_name( - struct bt_component_class *component_class); +extern int bt_component_class_set_description( + struct bt_component_class *component_class, + const char *description); -extern const char *bt_component_class_get_description( - struct bt_component_class *component_class); - -extern const char *bt_component_class_get_help( - struct bt_component_class *component_class); - -extern enum bt_component_class_type bt_component_class_get_type( - struct bt_component_class *component_class); - -static inline -bt_bool bt_component_class_is_source(struct bt_component_class *component_class) -{ - return bt_component_class_get_type(component_class) == - BT_COMPONENT_CLASS_TYPE_SOURCE; -} - -static inline -bt_bool bt_component_class_is_filter(struct bt_component_class *component_class) -{ - return bt_component_class_get_type(component_class) == - BT_COMPONENT_CLASS_TYPE_FILTER; -} - -static inline -bt_bool bt_component_class_is_sink(struct bt_component_class *component_class) -{ - return bt_component_class_get_type(component_class) == - BT_COMPONENT_CLASS_TYPE_SINK; -} +extern int bt_component_class_set_help( + struct bt_component_class *component_class, + const char *help); #ifdef __cplusplus }