X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib.h;h=6585d0b8b5541aa7d7c2bd13bc80f8aa02d87a28;hb=4ef92180bc9fd850f60433d1f81e5e9647b0fe86;hp=62caa2db3f199e4e350a96aeed30127ca2e9866e;hpb=8a53f9af136d2945255ac871353fee172dd5030a;p=wimlib diff --git a/include/wimlib.h b/include/wimlib.h index 62caa2db..6585d0b8 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -686,10 +686,14 @@ struct wimlib_wim_info { * table. */ uint64_t total_bytes; - /** 1 if the WIM has an integrity table */ + /** 1 if the WIM has an integrity table. Note: if the ::WIMStruct was + * created via wimlib_create_new_wim() rather than wimlib_open_wim(), + * this will always be 0, even if the ::WIMStruct was written to + * somewhere by calling wimlib_write() with the + * ::WIMLIB_WRITE_FLAG_CHECK_INTEGRITY flag specified. */ uint32_t has_integrity_table : 1; - /** 1 if the WIM was created via wimlib_open_wim() rather than + /** 1 if the ::WIMStruct was created via wimlib_open_wim() rather than * wimlib_create_new_wim(). */ uint32_t opened_from_file : 1; @@ -1815,18 +1819,10 @@ extern void wimlib_global_cleanup(void); /** - * Returns true if the WIM has an integrity table. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. - * @return - * @c true if the WIM has an integrity table; @c false otherwise. If @a - * wim is a ::WIMStruct created with wimlib_create_new_wim() rather than - * wimlib_open_wim(), @c false will be returned, even if wimlib_write() has - * been called on @a wim with ::WIMLIB_WRITE_FLAG_CHECK_INTEGRITY set. + * Deprecated in favor of wimlib_get_wim_info(). */ extern bool -wimlib_has_integrity_table(const WIMStruct *wim); +wimlib_has_integrity_table(const WIMStruct *wim) _wimlib_deprecated; /** * Determines if an image name is already used by some image in the WIM. @@ -2229,120 +2225,32 @@ wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads, extern void wimlib_print_available_images(const WIMStruct *wim, int image); -/** - * Prints the full paths to all files contained in an image, or all images, in a - * WIM file. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. - * @param image - * Which image to print files for. Can be the number of an image, or - * ::WIMLIB_ALL_IMAGES to print the files contained in all images. - * - * @return 0 on success; nonzero on error. - * @retval ::WIMLIB_ERR_DECOMPRESSION - * The metadata resource for one of the specified images could not be - * decompressed. - * @retval ::WIMLIB_ERR_INVALID_DENTRY - * A directory entry in the metadata resource for one of the specified - * images is invaled. - * @retval ::WIMLIB_ERR_INVALID_IMAGE - * @a image does not specify a valid image in @a wim, and is not - * ::WIMLIB_ALL_IMAGES. - * @retval ::WIMLIB_ERR_INVALID_RESOURCE_SIZE - * The metadata resource for one of the specified images is invalid. - * @retval ::WIMLIB_ERR_INVALID_SECURITY_DATA - * The security data for one of the specified images is invalid. - * @retval ::WIMLIB_ERR_NOMEM - * Failed to allocate needed memory. - * @retval ::WIMLIB_ERR_READ - * An unexpected read error or end-of-file occurred when reading the - * metadata resource for one of the specified images. - * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED - * @a wim was not a standalone WIM and was not the first part of a split - * WIM. - */ +/** TODO: wimlib-imagex uses this for the 'dir' command, but a better API is + * needed for this. */ extern int wimlib_print_files(WIMStruct *wim, int image); -/** - * Prints detailed information from the header of a WIM file. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. It may be either a - * standalone WIM or part of a split WIM. - * - * @return This function has no return value. - * - */ +/** TODO: wimlib-imagex uses this for the 'info --header' command, but a better + * API is needed for this. */ extern void wimlib_print_header(const WIMStruct *wim); -/** - * Prints the lookup table of a WIM file. The lookup table maps SHA1 message - * digests, as found in the directory entry tree in the WIM file, to file - * resources in the WIM file. This table includes one entry for each unique - * file in the WIM, so it can be quite long. There is only one lookup table per - * WIM file, but each split WIM part has its own lookup table. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. - * - * @return This function has no return value. - */ +/** TODO: wimlib-imagex uses this for the 'info --lookup-table' command, but a + * better API is needed for this. */ extern void wimlib_print_lookup_table(WIMStruct *wim); -/** - * Prints the metadata of the specified image in a WIM file. The metadata - * consists of the security data as well as the directory entry tree. Each - * image has its own metadata. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. - * @param image - * Which image to print the metadata for. Can be the number of an image, - * or ::WIMLIB_ALL_IMAGES to print the metadata for all images in the WIM. - * - * @return 0 on success; nonzero on error. - * @retval ::WIMLIB_ERR_DECOMPRESSION - * The metadata resource for one of the specified images could not be - * decompressed. - * @retval ::WIMLIB_ERR_INVALID_DENTRY - * A directory entry in the metadata resource for one of the specified - * images is invaled. - * @retval ::WIMLIB_ERR_INVALID_IMAGE - * @a image does not specify a valid image in @a wim, and is not - * ::WIMLIB_ALL_IMAGES. - * @retval ::WIMLIB_ERR_INVALID_RESOURCE_SIZE - * The metadata resource for one of the specified images is invalid. - * @retval ::WIMLIB_ERR_INVALID_SECURITY_DATA - * The security data for one of the specified images is invalid. - * @retval ::WIMLIB_ERR_NOMEM - * Failed to allocate needed memory. - * @retval ::WIMLIB_ERR_READ - * An unexpected read error or end-of-file occurred when reading the - * metadata resource for one of the specified images. - * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED - * @a wim was not a standalone WIM and was not the first part of a split - * WIM. - */ +/** TODO: wimlib-imagex uses this for the 'info --metadata' command, but a + * better API is needed for this. */ extern int wimlib_print_metadata(WIMStruct *wim, int image); /** - * Prints some basic information about a WIM file. All information printed by - * this function is also printed by wimlib_print_header(), but - * wimlib_print_wim_information() prints some of this information more concisely - * and in a more readable form. - * - * @param wim - * Pointer to the ::WIMStruct for a WIM file. - * - * @return This function has no return value. + * Deprecated in favor of wimlib_get_wim_info(), which provides the information + * in a way that can be accessed programatically. */ extern void -wimlib_print_wim_information(const WIMStruct *wim); +wimlib_print_wim_information(const WIMStruct *wim) _wimlib_deprecated; /** * Translates a string specifying the name or number of an image in the WIM into