sink.text.pretty: abort on unknown field class type
[babeltrace.git] / src / plugins / ctf / common / metadata / decoder.cpp
index 740cbf05e264b515de41f3cf7591cfc9e748b376..deaeedb45408e80853b2def9ca576a5647d4a0d8 100644 (file)
@@ -4,30 +4,31 @@
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (mdec->config.self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (mdec->config.self_comp_class)
-#define BT_LOG_OUTPUT_LEVEL         (mdec->config.log_level)
+#define BT_LOG_OUTPUT_LEVEL         ((enum bt_log_level) mdec->config.log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/DECODER"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <inttypes.h>
 #include "common/assert.h"
 #include "common/uuid.h"
 #include "compat/memstream.h"
-#include <babeltrace2/babeltrace.h>
-#include <glib.h>
-#include <string.h>
 
 #include "ast.hpp"
+#include "decoder-packetized-file-stream-to-buf.hpp"
 #include "decoder.hpp"
-#include "scanner.hpp"
-#include "logging.hpp"
 #include "parser-wrap.hpp"
-#include "decoder-packetized-file-stream-to-buf.hpp"
+#include "scanner.hpp"
 
 #define TSDL_MAGIC 0x75d11d57
 
@@ -58,7 +59,6 @@ struct packet_header
     uint8_t minor;
 } __attribute__((__packed__));
 
-BT_HIDDEN
 int ctf_metadata_decoder_is_packetized(FILE *fp, bool *is_packetized, int *byte_order,
                                        bt_logging_level log_level, bt_self_component *self_comp)
 {
@@ -92,7 +92,6 @@ end:
     return ret;
 }
 
-BT_HIDDEN
 struct ctf_metadata_decoder *
 ctf_metadata_decoder_create(const struct ctf_metadata_decoder_config *config)
 {
@@ -154,7 +153,6 @@ end:
     return mdec;
 }
 
-BT_HIDDEN
 void ctf_metadata_decoder_destroy(struct ctf_metadata_decoder *mdec)
 {
     if (!mdec) {
@@ -174,7 +172,6 @@ void ctf_metadata_decoder_destroy(struct ctf_metadata_decoder *mdec)
     g_free(mdec);
 }
 
-BT_HIDDEN
 enum ctf_metadata_decoder_status
 ctf_metadata_decoder_append_content(struct ctf_metadata_decoder *mdec, FILE *fp)
 {
@@ -362,7 +359,6 @@ end:
     return status;
 }
 
-BT_HIDDEN
 bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(struct ctf_metadata_decoder *mdec)
 {
     BT_ASSERT_DBG(mdec);
@@ -370,7 +366,6 @@ bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(struct ctf_metadata_deco
     return ctf_visitor_generate_ir_get_ir_trace_class(mdec->visitor);
 }
 
-BT_HIDDEN
 struct ctf_trace_class *
 ctf_metadata_decoder_borrow_ctf_trace_class(struct ctf_metadata_decoder *mdec)
 {
@@ -379,7 +374,6 @@ ctf_metadata_decoder_borrow_ctf_trace_class(struct ctf_metadata_decoder *mdec)
     return ctf_visitor_generate_ir_borrow_ctf_trace_class(mdec->visitor);
 }
 
-BT_HIDDEN
 const char *ctf_metadata_decoder_get_text(struct ctf_metadata_decoder *mdec)
 {
     BT_ASSERT_DBG(mdec);
@@ -387,14 +381,12 @@ const char *ctf_metadata_decoder_get_text(struct ctf_metadata_decoder *mdec)
     return mdec->text->str;
 }
 
-BT_HIDDEN
 int ctf_metadata_decoder_get_byte_order(struct ctf_metadata_decoder *mdec)
 {
     BT_ASSERT_DBG(mdec);
     return mdec->bo;
 }
 
-BT_HIDDEN
 int ctf_metadata_decoder_get_uuid(struct ctf_metadata_decoder *mdec, bt_uuid_t uuid)
 {
     int ret = 0;
@@ -456,7 +448,6 @@ end:
     return status;
 }
 
-BT_HIDDEN
 enum ctf_metadata_decoder_status
 ctf_metadata_decoder_get_trace_class_uuid(struct ctf_metadata_decoder *mdec, bt_uuid_t uuid)
 {
This page took 0.024232 seconds and 4 git commands to generate.