lib: use object pool for event and packet notifications
[babeltrace.git] / include / babeltrace / graph / component.h
index e9ee509360c979336c1e5a6f22582cd313639529..f2db9d723c1f254056937b90e1be920fe016429f 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_get */
+#include <babeltrace/ref.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_get(bt_component_borrow_graph(component));
+}
 
 #ifdef __cplusplus
 }
This page took 0.044929 seconds and 4 git commands to generate.