lib: Reset libbabeltrace2 to SONANE 0
[babeltrace.git] / include / babeltrace / graph / self-component-port.h
index 753cba54934a92b7e9c711ef4ee091620a8b0d59..c524cac30eaa5f1a6f10086c99e51385f11d79c8 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE_GRAPH_SELF_COMPONENT_PORT_H
 
 /*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * SOFTWARE.
  */
 
+/*
+ * For bt_port, bt_self_component_port, bt_self_component,
+ * bt_connection, __BT_UPCAST_CONST
+ */
+#include <babeltrace/types.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct bt_port;
-struct bt_self_component_port;
-struct bt_self_component;
-struct bt_connection;
-
-enum bt_self_component_port_status {
+typedef enum bt_self_component_port_status {
        BT_SELF_PORT_STATUS_OK = 0,
-       BT_SELF_PORT_STATUS_ERROR = -1,
-};
+} bt_self_component_port_status;
 
 static inline
-struct bt_port *bt_self_component_port_borrow_port(
-               struct bt_self_component_port *self_port)
+const bt_port *bt_self_component_port_as_port(
+               bt_self_component_port *self_port)
 {
-       return (void *) self_port;
+       return __BT_UPCAST_CONST(bt_port, self_port);
 }
 
-extern struct bt_self_component *bt_self_component_port_borrow_component(
-               struct bt_self_component_port *self_port);
-
-extern enum bt_self_component_port_status
-bt_self_component_port_remove_from_component(
-               struct bt_self_component_port *self_port);
+extern bt_self_component *bt_self_component_port_borrow_component(
+               bt_self_component_port *self_port);
 
 extern void *bt_self_component_port_get_data(
-               struct bt_self_component_port *self_port);
+               const bt_self_component_port *self_port);
 
 #ifdef __cplusplus
 }
This page took 0.023677 seconds and 4 git commands to generate.