always copy packet/content_size, they are overwritten by the lib when necessary
[babeltrace.git] / plugins / libctfcopytrace / ctfcopytrace.h
index 344f1727235a3a9d3b3ef53ddbfcf07d93c933f8..2ca5b789e810d954aa5ab2a8af8e5fd95692ce3f 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
 #include <babeltrace/ctf-writer/writer.h>
 
 #ifdef __cplusplus
@@ -51,6 +51,7 @@ struct bt_ctf_clock_class *ctf_copy_clock_class(FILE *err,
  * Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
  * error.
  */
+BT_HIDDEN
 enum bt_component_status ctf_copy_clock_classes(FILE *err,
                struct bt_ctf_trace *writer_trace,
                struct bt_ctf_stream_class *writer_stream_class,
@@ -61,6 +62,7 @@ enum bt_component_status ctf_copy_clock_classes(FILE *err,
  *
  * Returns NULL on error.
  */
+BT_HIDDEN
 struct bt_ctf_event_class *ctf_copy_event_class(FILE *err,
                struct bt_ctf_event_class *event_class);
 
@@ -71,6 +73,7 @@ struct bt_ctf_event_class *ctf_copy_event_class(FILE *err,
  * Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
  * error.
  */
+BT_HIDDEN
 enum bt_component_status ctf_copy_event_classes(FILE *err,
                struct bt_ctf_stream_class *stream_class,
                struct bt_ctf_stream_class *writer_stream_class);
@@ -80,8 +83,11 @@ enum bt_component_status ctf_copy_event_classes(FILE *err,
  *
  * Returns NULL or error.
  */
+BT_HIDDEN
 struct bt_ctf_stream_class *ctf_copy_stream_class(FILE *err,
-               struct bt_ctf_stream_class *stream_class);
+               struct bt_ctf_stream_class *stream_class,
+               struct bt_ctf_trace *writer_trace,
+               bool override_ts64);
 
 /*
  * Copy the value of a packet context field and add it to the
@@ -90,6 +96,7 @@ struct bt_ctf_stream_class *ctf_copy_stream_class(FILE *err,
  * Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
  * error.
  */
+BT_HIDDEN
 enum bt_component_status ctf_copy_packet_context_field(FILE *err,
                struct bt_ctf_field *field, const char *field_name,
                struct bt_ctf_field *writer_packet_context,
@@ -98,13 +105,12 @@ enum bt_component_status ctf_copy_packet_context_field(FILE *err,
 /*
  * Copy all the field values of the packet context from the packet passed in
  * parameter and set it to the current packet in the writer stream.
- * The content_size and packet_size fields are not copied since they are
- * already handled by the ctf_writer library.
  *
  * Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
  * error.
  */
-enum bt_component_status ctf_copy_packet_context(FILE *err,
+BT_HIDDEN
+struct bt_ctf_field *ctf_copy_packet_context(FILE *err,
                struct bt_ctf_packet *packet,
                struct bt_ctf_stream *writer_stream);
 
@@ -114,8 +120,21 @@ enum bt_component_status ctf_copy_packet_context(FILE *err,
  *
  * Returns NULL on error.
  */
+BT_HIDDEN
 struct bt_ctf_event *ctf_copy_event(FILE *err, struct bt_ctf_event *event,
-               struct bt_ctf_event_class *writer_event_class);
+               struct bt_ctf_event_class *writer_event_class,
+               bool override_ts64);
+
+/*
+ * Copies the content of the event header to writer_event_header.
+ *
+ * Returns 0 on success, -1 on error.
+ */
+BT_HIDDEN
+int ctf_copy_event_header(FILE *err, struct bt_ctf_event *event,
+               struct bt_ctf_event_class *writer_event_class,
+               struct bt_ctf_event *writer_event,
+               struct bt_ctf_field *event_header);
 
 /*
  * Copy the environment and the packet header from the input trace to the
@@ -124,6 +143,7 @@ struct bt_ctf_event *ctf_copy_event(FILE *err, struct bt_ctf_event *event,
  * Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
  * error.
  */
+BT_HIDDEN
 enum bt_component_status ctf_copy_trace(FILE *err, struct bt_ctf_trace *trace,
                struct bt_ctf_trace *writer_trace);
 
This page took 0.023657 seconds and 4 git commands to generate.