struct bt_component;
struct bt_private_component;
struct bt_private_port;
+struct bt_port;
struct bt_value;
struct bt_private_notification_iterator;
typedef enum bt_component_status (*bt_component_class_accept_port_connection_method)(
struct bt_private_component *private_component,
- struct bt_private_port *private_port);
+ struct bt_private_port *self_private_port,
+ struct bt_port *other_port);
typedef void (*bt_component_class_port_disconnected_method)(
struct bt_private_component *private_component,
BT_HIDDEN
enum bt_component_status bt_component_accept_port_connection(
- struct bt_component *component, struct bt_port *self_port);
+ struct bt_component *component, struct bt_port *self_port,
+ struct bt_port *other_port);
BT_HIDDEN
void bt_component_port_disconnected(struct bt_component *comp,
BT_HIDDEN
enum bt_component_status bt_component_accept_port_connection(
- struct bt_component *comp, struct bt_port *port)
+ struct bt_component *comp, struct bt_port *self_port,
+ struct bt_port *other_port)
{
enum bt_component_status status = BT_COMPONENT_STATUS_OK;
assert(comp);
- assert(port);
+ assert(self_port);
+ assert(other_port);
if (comp->class->methods.accept_port_connection) {
status = comp->class->methods.accept_port_connection(
bt_private_component_from_component(comp),
- bt_private_port_from_port(port));
+ bt_private_port_from_port(self_port),
+ other_port);
}
return status;
* invocation.
*/
component_status = bt_component_accept_port_connection(
- upstream_component, upstream_port);
+ upstream_component, upstream_port, downstream_port);
if (component_status != BT_COMPONENT_STATUS_OK) {
goto error_rollback;
}
component_status = bt_component_accept_port_connection(
- downstream_component, downstream_port);
+ downstream_component, downstream_port, upstream_port);
if (component_status != BT_COMPONENT_STATUS_OK) {
goto error_rollback;
}
static
enum bt_component_status text_accept_port_connection(
struct bt_private_component *component,
- struct bt_private_port *self_port)
+ struct bt_private_port *self_port,
+ struct bt_port *other_port)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
struct bt_private_connection *connection;
#include <babeltrace/component/component.h>
#include <babeltrace/component/private-component.h>
#include <babeltrace/component/private-port.h>
+#include <babeltrace/component/port.h>
#include <babeltrace/component/private-connection.h>
#include <babeltrace/component/component-sink.h>
#include <babeltrace/component/notification/iterator.h>
enum bt_component_status dummy_accept_port_connection(
struct bt_private_component *component,
- struct bt_private_port *self_port)
+ struct bt_private_port *self_port,
+ struct bt_port *other_port)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
struct dummy *dummy;
#include <glib.h>
#include <babeltrace/component/private-component.h>
#include <babeltrace/component/private-port.h>
+#include <babeltrace/component/port.h>
struct dummy {
GPtrArray *iterators;
void dummy_destroy(struct bt_private_component *component);
enum bt_component_status dummy_accept_port_connection(
struct bt_private_component *component,
- struct bt_private_port *own_port);
+ struct bt_private_port *self_port,
+ struct bt_port *other_port);
enum bt_component_status dummy_consume(struct bt_private_component *component);
#endif /* BABELTRACE_PLUGINS_UTILS_DUMMY_H */
static
enum bt_component_status writer_component_accept_port_connection(
struct bt_private_component *component,
- struct bt_private_port *self_port)
+ struct bt_private_port *self_port,
+ struct bt_port *other_port)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
struct bt_private_connection *connection;