X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Fwriter%2Fwriter.c;h=971e6bf8a61b26facedce6ac3b1daddd16c107c8;hb=6ba0b073d3cc5040234aad3ab820b7ca4022e3e9;hp=525f0d579fc80c9eff5e52ddc59c81991e8ccc2d;hpb=996a07a111a6913458fca1b970120bfa167dc4b7;p=babeltrace.git diff --git a/plugins/writer/writer.c b/plugins/writer/writer.c index 525f0d57..971e6bf8 100644 --- a/plugins/writer/writer.c +++ b/plugins/writer/writer.c @@ -27,13 +27,13 @@ */ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -126,10 +126,10 @@ enum bt_component_status handle_notification( } switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_START: + case BT_NOTIFICATION_TYPE_PACKET_BEGIN: { struct bt_ctf_packet *packet = - bt_notification_packet_start_get_packet(notification); + bt_notification_packet_begin_get_packet(notification); if (!packet) { ret = BT_COMPONENT_STATUS_ERROR; @@ -143,7 +143,7 @@ enum bt_component_status handle_notification( case BT_NOTIFICATION_TYPE_PACKET_END: { struct bt_ctf_packet *packet = - bt_notification_packet_start_get_packet(notification); + bt_notification_packet_end_get_packet(notification); if (!packet) { ret = BT_COMPONENT_STATUS_ERROR; @@ -272,13 +272,11 @@ error: } /* Initialize plug-in entry points. */ -BT_PLUGIN_NAME("writer"); +BT_PLUGIN(writer); BT_PLUGIN_DESCRIPTION("Babeltrace CTF-Writer output plug-in."); BT_PLUGIN_AUTHOR("Jérémie Galarneau"); BT_PLUGIN_LICENSE("MIT"); - -BT_PLUGIN_COMPONENT_CLASSES_BEGIN -BT_PLUGIN_SINK_COMPONENT_CLASS_ENTRY("writer", - "Formats CTF-IR to CTF.", - writer_component_init) -BT_PLUGIN_COMPONENT_CLASSES_END +BT_PLUGIN_COMPONENT_CLASS(BT_COMPONENT_TYPE_SINK, writer, + writer_component_init); +BT_PLUGIN_COMPONENT_CLASS_DESCRIPTION(BT_COMPONENT_TYPE_SINK, writer, + "Formats CTF-IR to CTF.");