ir: add bt_ctf_event_get_payload_field()
[babeltrace.git] / include / babeltrace / ctf-ir / event.h
index 13abc80aed79abb5543b123a68de0683f43efd69..2f1ca8c842bf6b9e623459c2adc6d49a34bbe399 100644 (file)
@@ -347,6 +347,16 @@ extern struct bt_ctf_event *bt_ctf_event_create(
 extern struct bt_ctf_event_class *bt_ctf_event_get_class(
                struct bt_ctf_event *event);
 
+/*
+ * bt_ctf_event_get_stream: get an event's associated stream.
+ *
+ * @param event Event.
+ *
+ * Returns the event's associated stream, NULL on error.
+ */
+extern struct bt_ctf_stream *bt_ctf_event_get_stream(
+               struct bt_ctf_event *event);
+
 /*
  * bt_ctf_event_get_clock: get an event's associated clock.
  *
@@ -357,6 +367,16 @@ extern struct bt_ctf_event_class *bt_ctf_event_get_class(
 extern struct bt_ctf_clock *bt_ctf_event_get_clock(
                struct bt_ctf_event *event);
 
+/*
+ * bt_ctf_event_get_payload_field: get an event's payload.
+ *
+ * @param event Event instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern struct bt_ctf_field *bt_ctf_event_get_payload_field(
+               struct bt_ctf_event *event);
+
 /*
  * bt_ctf_event_get_payload: get an event's field.
  *
@@ -464,6 +484,19 @@ extern struct bt_ctf_field *bt_ctf_event_get_event_context(
 extern int bt_ctf_event_set_event_context(struct bt_ctf_event *event,
                struct bt_ctf_field *context);
 
+/*
+ * bt_ctf_event_copy: Deep-copy an event.
+ *
+ * Get an event's deep copy.
+ *
+ * On success, the returned copy has its reference count set to 1.
+ *
+ * @param event Event to copy.
+ *
+ * Returns the deep-copied event on success, NULL on error.
+ */
+extern struct bt_ctf_event *bt_ctf_event_copy(struct bt_ctf_event *event);
+
 /*
  * bt_ctf_event_get and bt_ctf_event_put: increment and decrement
  * the event's reference count.
This page took 0.023951 seconds and 4 git commands to generate.