Rename: bt_put(), bt_get() -> bt_object_put_ref(), bt_object_get_ref()
[babeltrace.git] / include / babeltrace / graph / component.h
index e9ee509360c979336c1e5a6f22582cd313639529..c35685aa93e4a2c7daa3b88749294c213f9e55ab 100644 (file)
  * 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
@@ -84,7 +87,13 @@ bt_bool bt_component_is_sink(struct bt_component *component)
                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
 }
This page took 0.036406 seconds and 4 git commands to generate.