#include <stdint.h>
#include <unistd.h>
#include <glib.h>
-#include <babeltrace/babeltrace.h>
+#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/types.h>
#include <babeltrace/format.h>
FILE *fp; /* File pointer. NULL if unset. */
int depth;
int dummy; /* disable output */
+ int print_names; /* print field names */
+ int field_nr;
+ uint64_t last_real_timestamp; /* to print delta */
+ uint64_t last_cycles_timestamp; /* to print delta */
+ GString *string; /* Current string */
};
static inline
/*
* Write only is supported for now.
*/
-void ctf_text_integer_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_float_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_string_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_enum_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_struct_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_variant_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_array_write(struct stream_pos *pos, struct definition *definition);
-void ctf_text_sequence_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_integer_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_float_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_string_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_enum_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_struct_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_variant_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_array_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_sequence_write(struct stream_pos *pos, struct definition *definition);
static inline
void print_pos_tabs(struct ctf_text_stream_pos *pos)
fprintf(pos->fp, "\t");
}
+/*
+ * Check if the field must be printed.
+ */
+int print_field(struct definition *definition);
+
#endif /* _BABELTRACE_CTF_TEXT_TYPES_H */