Add event header accessors and support for custom event headers
[babeltrace.git] / include / babeltrace / ctf-ir / event.h
index 948747a929a3d1b9d7359d0cbdba1e84e894c4d9..c6b30960cb6a023eda08c46d10f0be1f52a59592 100644 (file)
@@ -275,6 +275,31 @@ extern int bt_ctf_event_set_payload(struct bt_ctf_event *event,
 extern struct bt_ctf_field *bt_ctf_event_get_payload_by_index(
                struct bt_ctf_event *event, int index);
 
+/*
+ * bt_ctf_event_get_header: get an event's header.
+ *
+ * @param event Event instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern struct bt_ctf_field *bt_ctf_event_get_header(
+               struct bt_ctf_event *event);
+
+/*
+ * bt_ctf_event_set_header: set an event's header.
+ *
+ * The event header's type must match the stream class' event
+ * header type.
+ *
+ * @param event Event instance.
+ * @param header Event header field instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern int bt_ctf_event_set_header(
+               struct bt_ctf_event *event,
+               struct bt_ctf_field *header);
+
 /*
  * bt_ctf_event_get_event_context: Get an event's context
  *
This page took 0.024073 seconds and 4 git commands to generate.