* SOFTWARE.
*/
-#include <babeltrace/graph/component-status.h>
+/* For BT_COMPONENT_CLASS_TYPE_* */
#include <babeltrace/graph/component-class.h>
-#include <babeltrace/graph/notification-iterator.h>
-#include <babeltrace/values.h>
+
+/* For bt_bool */
#include <babeltrace/types.h>
+/* For bt_object_get_ref */
+#include <babeltrace/object.h>
+
#ifdef __cplusplus
extern "C" {
#endif
BT_COMPONENT_CLASS_TYPE_SINK;
}
-extern struct bt_graph *bt_component_get_graph(struct bt_component *component);
+extern struct bt_graph *bt_component_borrow_graph(struct bt_component *component);
+
+static inline
+struct bt_graph *bt_component_get_graph(struct bt_component *component)
+{
+ return bt_object_get_ref(bt_component_borrow_graph(component));
+}
#ifdef __cplusplus
}