* Status code. Errors are always negative.
*/
enum bt_notification_iterator_status {
+ /** 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,
-
/** Unsupported iterator feature. */
- BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -1,
+ BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -3,
- /** No error, okay. */
- BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
};
/**
* @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);
* @see bt_notification_iterator_get_notification()
*/
extern enum bt_notification_iterator_status *bt_notification_iterator_seek(
- struct bt_notification_iterator *iterator,
- int whence,
+ struct bt_notification_iterator *iterator, int whence,
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