List detected component classes
[babeltrace.git] / plugins / ctf / text / text.c
index b77c9fcd8659bc3e73a1096f48ece628c60d434a..75574973f8561ff43138234665f3f1d5070720e0 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Babeltrace CTF Text Output Plugin
  *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * SOFTWARE.
  */
 
-#include <babeltrace/plugin/plugin.h>
+#include <babeltrace/plugin/plugin-macros.h>
 #include <babeltrace/plugin/component.h>
 #include <babeltrace/plugin/sink.h>
 #include <babeltrace/plugin/notification/notification.h>
 #include <glib.h>
 #include <stdio.h>
+#include <stdbool.h>
 
-const char *plugin_name = "ctf-text";
-
-static enum bt_component_status ctf_text_init(struct bt_component *);
-static void ctf_text_exit(void);
+static
+enum bt_component_status ctf_text_init(struct bt_component *,
+               struct bt_value *params);
 
 /* Initialize plug-in entry points. */
 BT_PLUGIN_NAME("ctf-text");
+BT_PLUGIN_DESCRIPTION("Babeltrace text output plug-in.");
 BT_PLUGIN_AUTHOR("Jérémie Galarneau");
-BT_PLUGIN_LICENSE("MIT License");
-BT_PLUGIN_EXIT(ctf_text_exit);
+BT_PLUGIN_LICENSE("MIT");
 
 BT_PLUGIN_COMPONENT_CLASSES_BEGIN
-BT_PLUGIN_SINK_COMPONENT_CLASS_ENTRY(plugin_name, ctf_text_init)
+BT_PLUGIN_SINK_COMPONENT_CLASS_ENTRY("text", "Formats CTF-IR to text. Formerly known as ctf-text.", ctf_text_init)
 BT_PLUGIN_COMPONENT_CLASSES_END
 
 enum loglevel {
@@ -66,6 +66,7 @@ enum loglevel {
         LOGLEVEL_DEBUG                  = 14,
 };
 
+static
 const char *loglevel_str [] = {
        [LOGLEVEL_EMERG] =              "TRACE_EMERG",
        [LOGLEVEL_ALERT] =              "TRACE_ALERT",
@@ -99,18 +100,13 @@ struct ctf_text_component {
        bool opt_print_trace_default_fields : 1;
        bool opt_print_loglevel_field : 1;
        bool opt_print_emf_field : 1;
-       bool opt_print_callsite_field : 1;
        bool opt_print_delta_field : 1;
 };
 
 static
-enum bt_component_status ctf_text_init(struct bt_component *component)
+enum bt_component_status ctf_text_init(
+               struct bt_component *component, struct bt_value *params)
 {
+       printf("ctf_text_init\n");
        return BT_COMPONENT_STATUS_OK;
 }
-
-static
-void ctf_text_exit(void)
-{
-       printf("in ctf_text_exit\n");
-}
This page took 0.034318 seconds and 4 git commands to generate.