-skip_wim_resource(struct wim_resource_descriptor *rdesc);
-
-/*
- * 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 {
-
- /* Called when a blob is about to be read. */
- read_blob_list_begin_blob_t begin_blob;
-
- /* Called when a chunk of data has been read. */
- consume_data_callback_t consume_chunk;
-
- /* Called when a blob has been fully read. A successful call to
- * @begin_blob will always be matched by a call to @end_blob. */
- read_blob_list_end_blob_t end_blob;
+skip_wim_resource(const struct wim_resource_descriptor *rdesc);
+
+/* Callback functions for reading blobs */
+struct read_blob_callbacks {
+
+ /* Called when starting to read a blob. Must return 0 on success, or a
+ * positive wimlib error code on failure, or in the case of
+ * read_blob_list(), the special value BEGIN_BLOB_STATUS_SKIP_BLOB which
+ * indicates that the data for this blob should not be read. */
+ int (*begin_blob)(struct blob_descriptor *blob, void *ctx);
+#define BEGIN_BLOB_STATUS_SKIP_BLOB (-1)
+
+ /* Called when the next chunk of uncompressed data is available. 'size'
+ * is guaranteed to be nonzero. Must return 0 on success, or a positive
+ * wimlib error code on failure. */
+ int (*consume_chunk)(const void *chunk, size_t size, void *ctx);
+
+ /* Called when a blob has been successfully read (status=0), or when
+ * begin_blob() was successfully called but an error occurred before the
+ * blob was fully read (status != 0; in this case the implementation
+ * should do cleanup and then pass on the status). Must return 0 on
+ * success, or a positive wimlib error code on failure. */
+ int (*end_blob)(struct blob_descriptor *blob, int status, void *ctx);
+
+ /* Parameter passed to each of the callback functions. */
+ void *ctx;
+};