#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
* 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,
*
* Returns NULL on error.
*/
+BT_HIDDEN
struct bt_ctf_event_class *ctf_copy_event_class(FILE *err,
struct bt_ctf_event_class *event_class);
* 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);
*
* 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_trace *writer_trace,
* 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,
/*
* 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.
+ * The content_size and packet_size fields are not copied if skip_content_size
+ * is not 0.
*
* Returns BT_COMPONENT_STATUS_OK on success, and BT_COMPONENT_STATUS_ERROR on
* error.
*/
+BT_HIDDEN
struct bt_ctf_field *ctf_copy_packet_context(FILE *err,
struct bt_ctf_packet *packet,
- struct bt_ctf_stream *writer_stream);
+ struct bt_ctf_stream *writer_stream,
+ int skip_content_size);
/*
* Create and return a copy of the event passed in parameter. The caller has to
*
* 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,
bool override_ts64);
*
* 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,
* 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);