Small fixes to include/
[deliverable/babeltrace.git] / include / babeltrace / graph / self-component.h
index b5d8f551d5e4d5af7c10b11f810706dc8b14f02b..65ff2e67de9853d0f3ec567e9ff41c2c310fa64b 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE_GRAPH_SELF_COMPONENT_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_component, bt_self_component */
+#include <babeltrace/types.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct bt_component;
-struct bt_self_component;
-
-enum bt_self_component_status {
+typedef enum bt_self_component_status {
        BT_SELF_COMPONENT_STATUS_OK = 0,
        BT_SELF_COMPONENT_STATUS_END = 1,
        BT_SELF_COMPONENT_STATUS_AGAIN = 11,
        BT_SELF_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 111,
        BT_SELF_COMPONENT_STATUS_ERROR = -1,
        BT_SELF_COMPONENT_STATUS_NOMEM = -12,
-};
+} bt_self_component_status;
 
 static inline
-struct bt_component *bt_self_component_as_component(
-               struct bt_self_component *self_component)
+const bt_component *bt_self_component_as_component(
+               bt_self_component *self_component)
 {
-       return (void *) self_component;
+       return (const void *) self_component;
 }
 
 extern void *bt_self_component_get_data(
-               struct bt_self_component *private_component);
+               const bt_self_component *self_component);
 
 extern void bt_self_component_set_data(
-               struct bt_self_component *private_component, void *data);
+               bt_self_component *self_component, void *data);
 
 #ifdef __cplusplus
 }
This page took 0.02715 seconds and 5 git commands to generate.