X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fgraph-internal.h;h=7e8ea45fc4226709c51bb438e9d5b52d87e5f558;hb=262e5473a362270731bac4792959c23af321f6b4;hp=405b8c38e2659d7b7f5d6238e0afa204a64afe2f;hpb=691f667d85efa52a5a4b09988b20c2c78e064ac8;p=babeltrace.git diff --git a/include/babeltrace/graph/graph-internal.h b/include/babeltrace/graph/graph-internal.h index 405b8c38..7e8ea45f 100644 --- a/include/babeltrace/graph/graph-internal.h +++ b/include/babeltrace/graph/graph-internal.h @@ -87,4 +87,29 @@ BT_HIDDEN void bt_graph_remove_connection(struct bt_graph *graph, struct bt_connection *connection); +static inline +const char *bt_graph_status_string(enum bt_graph_status status) +{ + switch (status) { + case BT_GRAPH_STATUS_CANCELED: + return "BT_GRAPH_STATUS_CANCELED"; + case BT_GRAPH_STATUS_AGAIN: + return "BT_GRAPH_STATUS_AGAIN"; + case BT_GRAPH_STATUS_END: + return "BT_GRAPH_STATUS_END"; + case BT_GRAPH_STATUS_OK: + return "BT_GRAPH_STATUS_OK"; + case BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH: + return "BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH"; + case BT_GRAPH_STATUS_INVALID: + return "BT_GRAPH_STATUS_INVALID"; + case BT_GRAPH_STATUS_NO_SINK: + return "BT_GRAPH_STATUS_NO_SINK"; + case BT_GRAPH_STATUS_ERROR: + return "BT_GRAPH_STATUS_ERROR"; + default: + return "(unknown)"; + } +} + #endif /* BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H */