* 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
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)
{
return ret;
}
-BT_HIDDEN
struct ctf_metadata_decoder *
ctf_metadata_decoder_create(const struct ctf_metadata_decoder_config *config)
{
return mdec;
}
-BT_HIDDEN
void ctf_metadata_decoder_destroy(struct ctf_metadata_decoder *mdec)
{
if (!mdec) {
g_free(mdec);
}
-BT_HIDDEN
enum ctf_metadata_decoder_status
ctf_metadata_decoder_append_content(struct ctf_metadata_decoder *mdec, FILE *fp)
{
return status;
}
-BT_HIDDEN
bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(struct ctf_metadata_decoder *mdec)
{
BT_ASSERT_DBG(mdec);
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)
{
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);
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;
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)
{