X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fself-component-port.h;h=ad5daeb8cf52917a4486b92555e8b94b2622ba06;hb=efd923e5742993cedafc1eeeb04cfad4ddf5cc8d;hp=9eaacf1e29ddeb2cd3e59f7c8db5f75ffbb73951;hpb=bb61965be5ec1bfe6977d0eca85e2e83da65af5f;p=babeltrace.git diff --git a/include/babeltrace/graph/self-component-port.h b/include/babeltrace/graph/self-component-port.h index 9eaacf1e..ad5daeb8 100644 --- a/include/babeltrace/graph/self-component-port.h +++ b/include/babeltrace/graph/self-component-port.h @@ -2,7 +2,7 @@ #define BABELTRACE_GRAPH_SELF_COMPONENT_PORT_H /* - * Copyright 2017 Philippe Proulx + * Copyright 2017-2018 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,35 +23,31 @@ * SOFTWARE. */ +/* + * For bt_port, bt_self_component_port, bt_self_component, bt_connection + */ +#include + #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_component_port_status; static inline -struct bt_port *bt_self_component_port_as_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 (const void *) 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 }