enum bt_component_status handle_notification(struct bt_component *component,
struct bt_notification *notification)
{
+ switch (bt_notification_get_type(notification)) {
+ case BT_NOTIFICATION_TYPE_PACKET_START:
+ puts("<packet>");
+ break;
+ case BT_NOTIFICATION_TYPE_PACKET_END:
+ puts("</packet>");
+ break;
+ case BT_NOTIFICATION_TYPE_EVENT:
+ puts("<event>");
+ break;
+ default:
+ puts("Unhandled notification type");
+ }
return BT_COMPONENT_STATUS_OK;
}
}
/* Initialize plug-in entry points. */
-BT_PLUGIN_NAME("ctf-text");
+BT_PLUGIN_NAME("text");
BT_PLUGIN_DESCRIPTION("Babeltrace text output plug-in.");
BT_PLUGIN_AUTHOR("Jérémie Galarneau");
BT_PLUGIN_LICENSE("MIT");