X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fgraph-internal.h;fp=include%2Fbabeltrace%2Fgraph%2Fgraph-internal.h;h=dc1399a8e93fde94fde2f7ae75d6d6684e430eac;hb=4725a2013cb518374822ccb490610b45f74dbdbf;hp=7c1ac085693ac4fdc821ad0df51f4802b9a2e741;hpb=13d428598c645803f8745b6db2c6dc2cde5e33c4;p=babeltrace.git diff --git a/include/babeltrace/graph/graph-internal.h b/include/babeltrace/graph/graph-internal.h index 7c1ac085..dc1399a8 100644 --- a/include/babeltrace/graph/graph-internal.h +++ b/include/babeltrace/graph/graph-internal.h @@ -73,23 +73,21 @@ struct bt_graph { */ bool can_consume; + /* + * True if the graph is configured, that is, components are + * added and connected. + */ + bool is_configured; + struct { GArray *source_output_port_added; GArray *filter_output_port_added; GArray *filter_input_port_added; GArray *sink_input_port_added; - GArray *source_output_port_removed; - GArray *filter_output_port_removed; - GArray *filter_input_port_removed; - GArray *sink_input_port_removed; GArray *source_filter_ports_connected; GArray *source_sink_ports_connected; GArray *filter_filter_ports_connected; GArray *filter_sink_ports_connected; - GArray *source_filter_ports_disconnected; - GArray *source_sink_ports_disconnected; - GArray *filter_filter_ports_disconnected; - GArray *filter_sink_ports_disconnected; } listeners; /* Pool of `struct bt_message_event *` */ @@ -131,6 +129,19 @@ void _bt_graph_set_can_consume(struct bt_graph *graph, bool can_consume) # define bt_graph_set_can_consume(_graph, _can_consume) #endif +static inline +void _bt_graph_set_is_configured(struct bt_graph *graph, bool is_configured) +{ + BT_ASSERT(graph); + graph->is_configured = is_configured; +} + +#ifdef BT_DEV_MODE +# define bt_graph_set_is_configured _bt_graph_set_is_configured +#else +# define bt_graph_set_is_configured(_graph, _is_configured) +#endif + BT_HIDDEN enum bt_graph_status bt_graph_consume_sink_no_check(struct bt_graph *graph, struct bt_component_sink *sink); @@ -138,21 +149,10 @@ enum bt_graph_status bt_graph_consume_sink_no_check(struct bt_graph *graph, BT_HIDDEN void bt_graph_notify_port_added(struct bt_graph *graph, struct bt_port *port); -BT_HIDDEN -void bt_graph_notify_port_removed(struct bt_graph *graph, - struct bt_component *comp, struct bt_port *port); - BT_HIDDEN void bt_graph_notify_ports_connected(struct bt_graph *graph, struct bt_port *upstream_port, struct bt_port *downstream_port); -BT_HIDDEN -void bt_graph_notify_ports_disconnected(struct bt_graph *graph, - struct bt_component *upstream_comp, - struct bt_component *downstream_comp, - struct bt_port *upstream_port, - struct bt_port *downstream_port); - BT_HIDDEN void bt_graph_remove_connection(struct bt_graph *graph, struct bt_connection *connection);