Print timestamps in text plug-in
[babeltrace.git] / include / babeltrace / ctf-ir / event.h
index 5b2e6f995d95fb852a9691a1f98c813ac4bce817..63926ba8c54849b8eab8aafb90b5cb5d8510bfcc 100644 (file)
 extern "C" {
 #endif
 
+struct bt_ctf_clock;
+struct bt_ctf_clock_value;
 struct bt_ctf_event_class;
 struct bt_ctf_event;
 struct bt_ctf_field;
 struct bt_ctf_field_type;
 struct bt_ctf_stream_class;
+struct bt_ctf_packet;
 
 /*
  * bt_ctf_event_create: instanciate an event.
@@ -81,16 +84,6 @@ extern struct bt_ctf_event_class *bt_ctf_event_get_class(
 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.
- *
- * @param event Event.
- *
- * Returns the event's clock, NULL on error.
- */
-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.
  *
@@ -115,7 +108,7 @@ extern int bt_ctf_event_set_payload_field(struct bt_ctf_event *event,
 /*
  * bt_ctf_event_get_payload: get an event's field.
  *
- * Returns the field matching "name". bt_ctf_field_put() must be called on the
+ * Returns the field matching "name". bt_put() must be called on the
  * returned value.
  *
  * @param event Event instance.
@@ -135,7 +128,7 @@ extern struct bt_ctf_field *bt_ctf_event_get_payload(struct bt_ctf_event *event,
  *
  * Set a manually allocated field as an event's payload. The event will share
  * the field's ownership by using its reference count.
- * bt_ctf_field_put() must be called on the returned value.
+ * bt_put() must be called on the returned value.
  *
  * @param event Event instance.
  * @param name Event field name, see notes.
@@ -154,7 +147,7 @@ extern int bt_ctf_event_set_payload(struct bt_ctf_event *event,
 /*
  * bt_ctf_event_get_payload_by_index: Get event's field by index.
  *
- * Returns the field associated with the provided index. bt_ctf_field_put()
+ * Returns the field associated with the provided index. bt_put()
  * must be called on the returned value. The indexes to be provided are
  * the same as can be retrieved from the event class.
  *
@@ -241,37 +234,18 @@ extern struct bt_ctf_field *bt_ctf_event_get_stream_event_context(
 extern int bt_ctf_event_set_stream_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);
+extern struct bt_ctf_packet *bt_ctf_event_get_packet(
+               struct bt_ctf_event *event);
 
-/*
- * bt_ctf_event_get and bt_ctf_event_put: increment and decrement
- * the event's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with event objects.
- *
- * These functions ensure that the event won't be destroyed while it
- * is in use. The same number of get and put (plus one extra put to
- * release the initial reference done at creation) have to be done to
- * destroy an event.
- *
- * When the event's reference count is decremented to 0 by a
- * bt_ctf_event_put, the event is freed.
- *
- * @param event Event instance.
- */
-extern void bt_ctf_event_get(struct bt_ctf_event *event);
-extern void bt_ctf_event_put(struct bt_ctf_event *event);
+extern int bt_ctf_event_set_packet(struct bt_ctf_event *event,
+               struct bt_ctf_packet *packet);
+
+extern struct bt_ctf_clock_value *bt_ctf_event_get_clock_value(
+               struct bt_ctf_event *event, struct bt_ctf_clock *clock);
+
+extern int bt_ctf_event_set_clock_value(
+               struct bt_ctf_event *event, struct bt_ctf_clock *clock,
+               struct bt_ctf_clock_value *value);
 
 #ifdef __cplusplus
 }
This page took 0.024889 seconds and 4 git commands to generate.