Normalize public header include guards
[babeltrace.git] / include / babeltrace / graph / component-class.h
index c2d59da6de656a159d134175609cc5dcfcf157ed..e30c329cf894f4f6d295e7c2c623339e8c388173 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_H
+#ifndef BABELTRACE_GRAPH_COMPONENT_CLASS_H
+#define BABELTRACE_GRAPH_COMPONENT_CLASS_H
 
 /*
  * Babeltrace - Component Class Interface.
  * SOFTWARE.
  */
 
-#include <babeltrace/graph/component.h>
 #include <stdint.h>
+#include <stdbool.h>
+#include <babeltrace/graph/component-status.h>
+#include <babeltrace/graph/notification-iterator.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -169,8 +171,29 @@ extern struct bt_value *bt_component_class_query(
 extern enum bt_component_class_type bt_component_class_get_type(
                struct bt_component_class *component_class);
 
+static inline
+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
+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
+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;
+}
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_H */
+#endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_H */
This page took 0.024513 seconds and 4 git commands to generate.