Fix: current-thread.h: append from message iterator, not from component
[babeltrace.git] / src / plugins / ctf / common / metadata / decoder.h
index b0f179be71857072c913c5ef7030918bb4db65c7..42e79bf25a91f5e217bb0913e7f5154a74277b12 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <babeltrace2/babeltrace.h>
 
+#include "common/macros.h"
+
 /* A CTF metadata decoder object */
 struct ctf_metadata_decoder;
 
@@ -34,6 +36,11 @@ enum ctf_metadata_decoder_status {
 
 /* Decoding configuration */
 struct ctf_metadata_decoder_config {
+       bt_logging_level log_level;
+
+       /* Weak */
+       bt_self_component *self_comp;
+
        int64_t clock_class_offset_s;
        int64_t clock_class_offset_ns;
 };
@@ -45,7 +52,6 @@ struct ctf_metadata_decoder_config {
  */
 BT_HIDDEN
 struct ctf_metadata_decoder *ctf_metadata_decoder_create(
-               bt_self_component_source *self_comp,
                const struct ctf_metadata_decoder_config *config);
 
 /*
@@ -100,14 +106,25 @@ struct ctf_trace_class *ctf_metadata_decoder_borrow_ctf_trace_class(
  * if so, sets `*byte_order` to the byte order of the first packet.
  */
 BT_HIDDEN
-bool ctf_metadata_decoder_is_packetized(FILE *fp, int *byte_order);
+bool ctf_metadata_decoder_is_packetized(FILE *fp, int *byte_order,
+               bt_logging_level log_level,
+               bt_self_component *self_comp);
 
 /*
  * Decodes a packetized metadata file stream to a NULL-terminated
  * text buffer using the given byte order.
  */
 BT_HIDDEN
-int ctf_metadata_decoder_packetized_file_stream_to_buf(
-               FILE *fp, char **buf, int byte_order);
+int ctf_metadata_decoder_packetized_file_stream_to_buf(FILE *fp,
+               char **buf, int byte_order, bool *is_uuid_set,
+               uint8_t *uuid, bt_logging_level log_level,
+               bt_self_component *self_comp);
+
+static inline
+bool ctf_metadata_decoder_is_packet_version_valid(unsigned int major,
+               unsigned int minor)
+{
+       return major == 1 && minor == 8;
+}
 
 #endif /* _METADATA_DECODER_H */
This page took 0.023637 seconds and 4 git commands to generate.