Remove default port API
[babeltrace.git] / include / babeltrace / graph / port.h
index 9d802440c41a4585166fcceb22b0bbb6928ed9e9..b759b6ab07d1e2dc5cddf81f4781733e4d955a82 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <stdint.h>
+#include <stdbool.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -48,8 +49,6 @@ enum bt_port_type {
        BT_PORT_TYPE_UNKOWN = -1,
 };
 
-extern const char *BT_DEFAULT_PORT_NAME;
-
 extern const char *bt_port_get_name(struct bt_port *port);
 extern enum bt_port_type bt_port_get_type(struct bt_port *port);
 extern struct bt_connection *bt_port_get_connection(struct bt_port *port);
@@ -58,6 +57,18 @@ extern int bt_port_remove_from_component(struct bt_port *port);
 extern int bt_port_disconnect(struct bt_port *port);
 extern int bt_port_is_connected(struct bt_port *port);
 
+static inline
+bool bt_port_is_input(struct bt_port *port)
+{
+       return bt_port_get_type(port) == BT_PORT_TYPE_INPUT;
+}
+
+static inline
+bool bt_port_is_output(struct bt_port *port)
+{
+       return bt_port_get_type(port) == BT_PORT_TYPE_OUTPUT;
+}
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.024504 seconds and 4 git commands to generate.