- * @returns 0 on success, or a negative value on error
- * (the user function breaking the loop is \b not
- * considered an error here)
- */
-extern int bt_object_map_foreach(const struct bt_object *map_obj,
- bt_object_map_foreach_cb cb, void *data);
+ * @returns \link bt_object_status::BT_OBJECT_STATUS_OK
+ * <code>BT_OBJECT_STATUS_OK</code>\endlink if
+ * there's no error and the traversal was not
+ * cancelled by the user function,
+ * \link bt_object_status::BT_OBJECT_STATUS_CANCELLED
+ * <code>BT_OBJECT_STATUS_CANCELLED</code>\endlink
+ * if the function was cancelled by the user
+ * function, or
+ * \link bt_object_status::BT_OBJECT_STATUS_ERROR
+ * <code>BT_OBJECT_STATUS_ERROR</code>\endlink on
+ * any other error
+ */
+extern enum bt_object_status bt_object_map_foreach(
+ const struct bt_object *map_obj, bt_object_map_foreach_cb cb,
+ void *data);