X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fnotification-internal.h;h=00a8c7eeb7e9e148e0c5fd7915d916c6722cc239;hb=5af447e5102d6226ee198e4db52b51e12075f1bb;hp=dac0defbcff8b9ef1635e88d0648016f5c0dd30e;hpb=330cb9e025c2c1162763c75e8198efe229a635bc;p=babeltrace.git diff --git a/include/babeltrace/graph/notification-internal.h b/include/babeltrace/graph/notification-internal.h index dac0defb..00a8c7ee 100644 --- a/include/babeltrace/graph/notification-internal.h +++ b/include/babeltrace/graph/notification-internal.h @@ -34,10 +34,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - typedef struct bt_ctf_stream *(*get_stream_func)( struct bt_notification *notification); @@ -58,8 +54,31 @@ static inline void bt_notification_freeze(struct bt_notification *notification) notification->frozen = BT_TRUE; } -#ifdef __cplusplus +static inline +const char *bt_notification_type_string(enum bt_notification_type type) +{ + switch (type) { + case BT_NOTIFICATION_TYPE_SENTINEL: + return "BT_NOTIFICATION_TYPE_SENTINEL"; + case BT_NOTIFICATION_TYPE_UNKNOWN: + return "BT_NOTIFICATION_TYPE_UNKNOWN"; + case BT_NOTIFICATION_TYPE_ALL: + return "BT_NOTIFICATION_TYPE_ALL"; + case BT_NOTIFICATION_TYPE_EVENT: + return "BT_NOTIFICATION_TYPE_EVENT"; + case BT_NOTIFICATION_TYPE_INACTIVITY: + return "BT_NOTIFICATION_TYPE_INACTIVITY"; + case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + return "BT_NOTIFICATION_TYPE_STREAM_BEGIN"; + case BT_NOTIFICATION_TYPE_STREAM_END: + return "BT_NOTIFICATION_TYPE_STREAM_END"; + case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + return "BT_NOTIFICATION_TYPE_PACKET_BEGIN"; + case BT_NOTIFICATION_TYPE_PACKET_END: + return "BT_NOTIFICATION_TYPE_PACKET_END"; + default: + return "(unknown)"; + } } -#endif #endif /* BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H */