Plugins are alive!
[babeltrace.git] / plugins / text / text.c
index a269fe160742c1cfa49a435a258f50c662f365ee..40bc1c5ea6b54f69c1a0211b16deafa8643b3182 100644 (file)
@@ -116,6 +116,19 @@ static
 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;
 }
 
@@ -155,7 +168,7 @@ error:
 }
 
 /* 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");
This page took 0.023991 seconds and 4 git commands to generate.