Decouple component class from plugin subsystem, remove component factory
[babeltrace.git] / plugins / text / text.h
index f1ff92dfda6dc649709c093b29925523123e8536..9f1706e4f8bb088ed8794cc4f35050fe8604dfc8 100644 (file)
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/plugin/component.h>
-
-enum loglevel {
-        LOGLEVEL_EMERG                  = 0,
-        LOGLEVEL_ALERT                  = 1,
-        LOGLEVEL_CRIT                   = 2,
-        LOGLEVEL_ERR                    = 3,
-        LOGLEVEL_WARNING                = 4,
-        LOGLEVEL_NOTICE                 = 5,
-        LOGLEVEL_INFO                   = 6,
-        LOGLEVEL_DEBUG_SYSTEM           = 7,
-        LOGLEVEL_DEBUG_PROGRAM          = 8,
-        LOGLEVEL_DEBUG_PROCESS          = 9,
-        LOGLEVEL_DEBUG_MODULE           = 10,
-        LOGLEVEL_DEBUG_UNIT             = 11,
-        LOGLEVEL_DEBUG_FUNCTION         = 12,
-        LOGLEVEL_DEBUG_LINE             = 13,
-        LOGLEVEL_DEBUG                  = 14,
-};
+#include <babeltrace/component/component.h>
 
 enum text_default {
        TEXT_DEFAULT_UNSET,
@@ -71,7 +53,6 @@ struct text_options {
        bool print_delta_field;
        bool print_loglevel_field;
        bool print_emf_field;
-       bool print_callsite_field;
        bool print_trace_field;
        bool print_trace_domain_field;
        bool print_trace_procname_field;
@@ -88,12 +69,17 @@ struct text_options {
 struct text_component {
        struct text_options options;
        FILE *out, *err;
-       bool processed_first_event;
-       uint64_t last_real_timestamp;
+       bool processed_first_event; /* Should be per-iterator. */
        int depth;      /* nesting, used for tabulation alignment. */
        bool start_line;
        GString *string;
        struct bt_value *plugin_opt_map;        /* Temporary parameter map. */
+
+       uint64_t last_cycles_timestamp;
+       uint64_t delta_cycles;
+
+       uint64_t last_real_timestamp;
+       uint64_t delta_real_timestamp;
 };
 
 BT_HIDDEN
This page took 0.023844 seconds and 4 git commands to generate.