Add stream packet header accessors
[babeltrace.git] / include / babeltrace / ctf-ir / stream.h
index 9cf025547a8d446ba06b7a15c62801d993a104e9..73fc5369d324b83ac6bf68d724e18cdf86d067a9 100644 (file)
@@ -137,6 +137,31 @@ extern int bt_ctf_stream_set_event_context(
                struct bt_ctf_stream *stream,
                struct bt_ctf_field *event_context);
 
+/*
+ * bt_ctf_stream_get_packet_header: get a stream's packet header.
+ *
+ * @param stream Stream instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern struct bt_ctf_field *bt_ctf_stream_get_packet_header(
+               struct bt_ctf_stream *stream);
+
+/*
+ * bt_ctf_stream_set_packet_header: set a stream's packet header.
+ *
+ * The packet header's type must match the trace's packet header
+ * type.
+ *
+ * @param stream Stream instance.
+ * @param packet_header Packet header instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern int bt_ctf_stream_set_packet_header(
+               struct bt_ctf_stream *stream,
+               struct bt_ctf_field *packet_header);
+
 /*
  * bt_ctf_stream_flush: flush a stream.
  *
This page took 0.023501 seconds and 4 git commands to generate.