Text output identical with babeltrace 1
[babeltrace.git] / plugins / text / text.h
index 5ae994e2ca48d6215cc2c34195dc86f8f1b9bec2..222035e8f1714e72853fc28ffd020ce55d896a71 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/graph/component.h>
+
+enum text_default {
+       TEXT_DEFAULT_UNSET,
+       TEXT_DEFAULT_SHOW,
+       TEXT_DEFAULT_HIDE,
+};
+
+enum text_color_option {
+       TEXT_COLOR_OPT_NEVER,
+       TEXT_COLOR_OPT_AUTO,
+       TEXT_COLOR_OPT_ALWAYS,
 };
 
 struct text_options {
-       bool print_scope_field_names : 1;
-       bool print_header_field_names : 1;
-       bool print_context_field_names : 1;
-       bool print_payload_field_names : 1;
-       bool print_delta_field : 1;
-       bool print_loglevel_field : 1;
-       bool print_trace_field : 1;
-       bool print_trace_domain_field : 1;
-       bool print_trace_procname_field : 1;
-       bool print_trace_vpid_field : 1;
-       bool print_trace_hostname_field : 1;
-       bool print_timestamp_cycles : 1;
-       bool no_size_limit : 1;
+       char *output_path;
+       char *debug_info_dir;
+       char *debug_info_target_prefix;
+
+       enum text_default name_default;
+       enum text_default field_default;
+
+       bool print_scope_field_names;
+       bool print_header_field_names;
+       bool print_context_field_names;
+       bool print_payload_field_names;
+
+       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;
+       bool print_trace_vpid_field;
+       bool print_trace_hostname_field;
+
+       bool print_timestamp_cycles;
+       bool clock_seconds;
+       bool clock_date;
+       bool clock_gmt;
+       bool debug_info_full_path;
+       enum text_color_option color;
+       bool verbose;
 };
 
 struct text_component {
        struct text_options options;
+       struct bt_notification_iterator *input_iterator;
        FILE *out, *err;
-       bool processed_first_event;
+       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. */
+       bool use_colors;
+
+       uint64_t last_cycles_timestamp;
+       uint64_t delta_cycles;
+
        uint64_t last_real_timestamp;
+       uint64_t delta_real_timestamp;
 };
 
+enum stream_packet_context_quarks_enum {
+       Q_TIMESTAMP_BEGIN,
+       Q_TIMESTAMP_END,
+       Q_EVENTS_DISCARDED,
+       Q_CONTENT_SIZE,
+       Q_PACKET_SIZE,
+       Q_PACKET_SEQ_NUM,
+       STREAM_PACKET_CONTEXT_QUARKS_LEN, /* Always the last one of this enum. */
+};
+
+GQuark stream_packet_context_quarks[STREAM_PACKET_CONTEXT_QUARKS_LEN];
+
 BT_HIDDEN
 enum bt_component_status text_print_event(struct text_component *text,
                struct bt_ctf_event *event);
This page took 0.025257 seconds and 4 git commands to generate.