Add time seek interface stub
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 24 Nov 2016 18:59:13 +0000 (13:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:07 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/plugin/notification/iterator.h
lib/plugin-system/iterator.c

index 06f1c8a59b40e55d3526dcc4f2f9dfd931af81a5..20bc1cbc388938e530440192207027d3b45a3ad5 100644 (file)
@@ -58,15 +58,18 @@ enum bt_notification_iterator_status {
 /**
  * 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,
 };
 
 /**
@@ -98,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
@@ -113,8 +118,9 @@ 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);
 
 extern struct bt_component *bt_notification_iterator_get_component(
index 8a67e1ab4862c512a3d573f1767fd3cbcb4a95e2..a1629f90d9d9534c47d39938039fdcbe1f514fb2 100644 (file)
@@ -183,3 +183,12 @@ struct bt_component *bt_notification_iterator_get_component(
        return bt_get(iterator->component);
 }
 
+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)
+{
+       enum bt_notification_iterator_status ret = BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED;
+end:
+       return ret;
+}
This page took 0.026966 seconds and 4 git commands to generate.