lib: add internal object pool API and use it; adapt plugins/tests
[babeltrace.git] / plugins / ctf / common / notif-iter / notif-iter.h
index ff70730900bf66c78f374a4aaa48a8fed75962dc..baaa9cd67e7854103f8fddd50bcf92262607633d 100644 (file)
@@ -226,7 +226,7 @@ struct bt_notif_iter_medium_ops {
         * @returns             Stream instance (weak reference) or
         *                      \c NULL on error
         */
-       struct bt_stream * (* get_stream)(
+       struct bt_stream * (* borrow_stream)(
                        struct bt_stream_class *stream_class,
                        uint64_t stream_id, void *data);
 };
@@ -318,7 +318,7 @@ enum bt_notif_iter_status bt_notif_iter_get_next_notification(
 
 /**
  * Returns the first packet header and context fields. This function
- * never needs to call the `get_stream()` medium operation because
+ * never needs to call the `borrow_stream()` medium operation because
  * it does not create packet or event objects.
  *
  * @param notif_iter           CTF notification iterator
@@ -329,7 +329,7 @@ enum bt_notif_iter_status bt_notif_iter_get_next_notification(
  * @returns                    One of #bt_notif_iter_status values
  */
 BT_HIDDEN
-enum bt_notif_iter_status bt_notif_iter_get_packet_header_context_fields(
+enum bt_notif_iter_status bt_notif_iter_borrow_packet_header_context_fields(
                struct bt_notif_iter *notit,
                struct bt_field **packet_header_field,
                struct bt_field **packet_context_field);
@@ -355,6 +355,15 @@ BT_HIDDEN
 off_t bt_notif_iter_get_current_packet_size(
                struct bt_notif_iter *notit);
 
+/*
+ * Resets the iterator so that the next requested medium bytes are
+ * assumed to be the first bytes of a new stream. The first notification
+ * which this iterator emits after calling bt_notif_iter_reset() is a
+ * BT_NOTIFICATION_TYPE_STREAM_BEGIN one.
+ */
+BT_HIDDEN
+void bt_notif_iter_reset(struct bt_notif_iter *notit);
+
 static inline
 const char *bt_notif_iter_medium_status_string(
                enum bt_notif_iter_medium_status status)
This page took 0.025308 seconds and 4 git commands to generate.