X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fcommon.h;h=6f9fb65df4bf069fbe24dc07a5ceb20784600a3f;hb=ef267d12284b855bc52ee429a5dc12da1d1e3b95;hp=8ac995358bf7d746977ebef36fa677a2e546d26c;hpb=86d8b7b82095055ced36135ecf4336753360cea4;p=babeltrace.git diff --git a/src/common/common.h b/src/common/common.h index 8ac99535..6f9fb65d 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -571,8 +573,8 @@ const char *bt_common_logging_level_string( enum bt_logging_level level) { switch (level) { - case BT_LOGGING_LEVEL_VERBOSE: - return "BT_LOGGING_LEVEL_VERBOSE"; + case BT_LOGGING_LEVEL_TRACE: + return "BT_LOGGING_LEVEL_TRACE"; case BT_LOGGING_LEVEL_DEBUG: return "BT_LOGGING_LEVEL_DEBUG"; case BT_LOGGING_LEVEL_INFO: @@ -590,6 +592,48 @@ const char *bt_common_logging_level_string( } }; +static inline +const char *bt_self_component_status_string( + enum bt_self_component_status status) +{ + switch (status) { + case BT_SELF_COMPONENT_STATUS_OK: + return "BT_SELF_COMPONENT_STATUS_OK"; + case BT_SELF_COMPONENT_STATUS_END: + return "BT_SELF_COMPONENT_STATUS_END"; + case BT_SELF_COMPONENT_STATUS_AGAIN: + return "BT_SELF_COMPONENT_STATUS_AGAIN"; + case BT_SELF_COMPONENT_STATUS_REFUSE_PORT_CONNECTION: + return "BT_SELF_COMPONENT_STATUS_REFUSE_PORT_CONNECTION"; + case BT_SELF_COMPONENT_STATUS_ERROR: + return "BT_SELF_COMPONENT_STATUS_ERROR"; + case BT_SELF_COMPONENT_STATUS_NOMEM: + return "BT_SELF_COMPONENT_STATUS_NOMEM"; + default: + return "(unknown)"; + } +} + +static inline +const char *bt_message_iterator_status_string( + enum bt_message_iterator_status status) +{ + switch (status) { + case BT_MESSAGE_ITERATOR_STATUS_AGAIN: + return "BT_MESSAGE_ITERATOR_STATUS_AGAIN"; + case BT_MESSAGE_ITERATOR_STATUS_END: + return "BT_MESSAGE_ITERATOR_STATUS_END"; + case BT_MESSAGE_ITERATOR_STATUS_OK: + return "BT_MESSAGE_ITERATOR_STATUS_OK"; + case BT_MESSAGE_ITERATOR_STATUS_ERROR: + return "BT_MESSAGE_ITERATOR_STATUS_ERROR"; + case BT_MESSAGE_ITERATOR_STATUS_NOMEM: + return "BT_MESSAGE_ITERATOR_STATUS_NOMEM"; + default: + return "(unknown)"; + } +} + #define NS_PER_S_I INT64_C(1000000000) #define NS_PER_S_U UINT64_C(1000000000)