X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fgraph.h;fp=include%2Fbabeltrace%2Fgraph%2Fgraph.h;h=a5077c4901991bcc9e343f6aaf4f3a048d375fb3;hb=36712f1d9ad9269638e493ca36a50979fe4da989;hp=a2dfbd8235f85e63d64e3a48fd6e2c6fd8fe7130;hpb=6f79a7cf4f5f065267895765f2277c6a12437f37;p=babeltrace.git diff --git a/include/babeltrace/graph/graph.h b/include/babeltrace/graph/graph.h index a2dfbd82..a5077c49 100644 --- a/include/babeltrace/graph/graph.h +++ b/include/babeltrace/graph/graph.h @@ -46,8 +46,6 @@ enum bt_graph_status { /** Downstream component does not support multiple inputs. */ BT_GRAPH_STATUS_END = 1, BT_GRAPH_STATUS_OK = 0, - /** Component is already part of another graph. */ - BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH = -2, /** Invalid arguments. */ BT_GRAPH_STATUS_INVALID = -22, /** No sink in graph. */ @@ -71,6 +69,19 @@ typedef void (*bt_graph_ports_disconnected_listener)( extern struct bt_graph *bt_graph_create(void); +extern enum bt_graph_status bt_graph_add_component( + struct bt_graph *graph, + struct bt_component_class *component_class, + const char *name, struct bt_value *params, + struct bt_component **component); + +extern enum bt_graph_status bt_graph_add_component_with_init_method_data( + struct bt_graph *graph, + struct bt_component_class *component_class, + const char *name, struct bt_value *params, + void *init_method_data, + struct bt_component **component); + /** * Creates a connection between two components using the two ports specified * and adds the connection and components (if not already added) to the graph.