ref.h: doc: fix typo
[babeltrace.git] / include / babeltrace / plugin / notification / iterator.h
index 480f50c7800d22fff4ac89e552fe473d38766985..20bc1cbc388938e530440192207027d3b45a3ad5 100644 (file)
@@ -40,35 +40,36 @@ struct bt_notification_iterator;
  * Status code. Errors are always negative.
  */
 enum bt_notification_iterator_status {
+       /** No more notifications to be delivered. */
+       BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
+       /** No error, okay. */
+       BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
        /** Invalid arguments. */
-       /* -22 for compatibility with -EINVAL */
-       BT_NOTIFICATION_ITERATOR_STATUS_INVAL = -22,
-
-       /** End of trace. */
-       BT_NOTIFICATION_ITERATOR_STATUS_EOT = -3,
-
+       BT_NOTIFICATION_ITERATOR_STATUS_INVAL = -1,
        /** General error. */
        BT_NOTIFICATION_ITERATOR_STATUS_ERROR = -2,
-
+       /** Out of memory. */
+       BT_NOTIFICATION_ITERATOR_STATUS_NOMEM = -3,
        /** Unsupported iterator feature. */
-       BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -1,
+       BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -4,
 
-       /** No error, okay. */
-       BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
 };
 
 /**
  * Notification iterator seek reference.
  */
-enum bt_notification_iterator_seek_type {
+enum bt_notification_iterator_seek_origin {
        /** Seek at a time relative to the beginning of the trace. */
-       BT_NOTIFICATION_ITERATOR_SEEK_TYPE_BEGIN = 0,
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_BEGIN = 0,
 
        /** Seek at a time relative to the current position. */
-       BT_NOTIFICATION_ITERATOR_SEEK_TYPE_CURRENT = 1,
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_CURRENT = 1,
 
        /** Seek at a time relative to the end of the trace. */
-       BT_NOTIFICATION_ITERATOR_SEEK_TYPE_END = 1,
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_END = 2,
+
+       /** Seek at a time relative to EPOCH. */
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_EPOCH = 3,
 };
 
 /**
@@ -80,7 +81,7 @@ enum bt_notification_iterator_seek_type {
  * @param iterator     Iterator instance
  * @returns            Returns a bt_notification instance
  *
- * @see bt_notification_put()
+ * @see bt_put()
  */
 extern struct bt_notification *bt_notification_iterator_get_notification(
                struct bt_notification_iterator *iterator);
@@ -100,14 +101,16 @@ extern enum bt_notification_iterator_status
 bt_notification_iterator_next(struct bt_notification_iterator *iterator);
 
 /**
- * Seek iterator to position.
+ * Seek iterator to time.
  *
  * Sets the iterator's position for the trace associated with the iterator.
  * The new position is computed by adding \p time to the position specified
- * by \p whence.
+ * by \p seek_origin.
+ *
+ * time is expressed in nanoseconds.
  *
  * @param iterator     Iterator instance
- * @param whence       One of #bt_notification_iterator_seek_type values.
+ * @param seek_origin  One of #bt_notification_iterator_seek_type values.
  * @returns            One of #bt_notification_iterator_status values;
  *                     if \iterator does not support seeking,
  *                     #BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED is
@@ -115,29 +118,12 @@ bt_notification_iterator_next(struct bt_notification_iterator *iterator);
  *
  * @see bt_notification_iterator_get_notification()
  */
-extern enum bt_notification_iterator_status *bt_notification_iterator_seek(
-               struct bt_notification_iterator *iterator, int whence,
+extern enum bt_notification_iterator_status bt_notification_iterator_seek_time(
+               struct bt_notification_iterator *iterator,
+               enum bt_notification_iterator_seek_origin seek_origin,
                int64_t time);
 
-/**
- * Increments the reference count of \p iterator.
- *
- * @param iterator     Iterator of which to increment the reference count
- *
- * @see bt_notification_iterator_put()
- */
-extern void bt_notification_iterator_get(
-               struct bt_notification_iterator *iterator);
-
-/**
- * Decrements the reference count of \p iterator, destroying it when this
- * count reaches 0.
- *
- * @param iterator     Iterator of which to decrement the reference count
- *
- * @see bt_notification_iterator_get()
- */
-extern void bt_notification_iterator_put(
+extern struct bt_component *bt_notification_iterator_get_component(
                struct bt_notification_iterator *iterator);
 
 #ifdef __cplusplus
This page took 0.024139 seconds and 4 git commands to generate.