+/*
+ * Type of callback function for beginning to read a blob.
+ *
+ * @blob:
+ * Blob that is about to be read.
+ *
+ * @ctx:
+ * User-provided context.
+ *
+ * Must return 0 on success, a positive error code on failure, or the special
+ * value BEGIN_BLOB_STATUS_SKIP_BLOB to indicate that the blob should not be
+ * read, and read_blob_list() should continue on to the next blob (without
+ * calling @consume_chunk or @end_blob).
+ */
+typedef int (*read_blob_list_begin_blob_t)(struct blob_descriptor *blob, void *ctx);
+
+#define BEGIN_BLOB_STATUS_SKIP_BLOB -1
+
+/*
+ * Type of callback function for finishing reading a blob.
+ *
+ * @blob:
+ * Blob that has been fully read, or blob that started being read but could
+ * not be fully read due to a read error.
+ *
+ * @status:
+ * 0 if reading the blob was successful; otherwise a nonzero error code
+ * that specifies the return status.
+ *
+ * @ctx:
+ * User-provided context.
+ */
+typedef int (*read_blob_list_end_blob_t)(struct blob_descriptor *blob,
+ int status,
+ void *ctx);
+
+
+/* Callback functions and contexts for read_blob_list(). */
+struct read_blob_list_callbacks {