]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
wimlib.h: Update add flag documentation
[wimlib] / include / wimlib.h
index 9d3c96160dddf269f31f081db821199892655a56..037f67d6327b1ec61ab49ccaa4acc321d26df466 100644 (file)
@@ -33,7 +33,7 @@
  *
  * @section sec_intro Introduction
  *
- * This is the documentation for the library interface of wimlib 1.6.2, a C
+ * This is the documentation for the library interface of wimlib 1.6.3, a C
  * library for creating, modifying, extracting, and mounting files in the
  * Windows Imaging Format.  This documentation is intended for developers only.
  * If you have installed wimlib and want to know how to use the @b wimlib-imagex
 #define WIMLIB_MINOR_VERSION 6
 
 /** Patch version of the library (for example, the 5 in 1.2.5). */
-#define WIMLIB_PATCH_VERSION 2
+#define WIMLIB_PATCH_VERSION 3
 
 #ifdef __cplusplus
 extern "C" {
@@ -392,6 +392,15 @@ typedef char wimlib_tchar;
 #  define WIMLIB_WIM_PATH_SEPARATOR_STRING "/"
 #endif
 
+/** Use this to specify the root directory of the WIM image.  */
+#define WIMLIB_WIM_ROOT_PATH WIMLIB_WIM_PATH_SEPARATOR_STRING
+
+/** Use this to test if the specified path refers to the root directory of the
+ * WIM image.  */
+#define WIMLIB_IS_WIM_ROOT_PATH(path) \
+               ((path)[0] == WIMLIB_WIM_PATH_SEPARATOR &&      \
+                (path)[1] == 0)
+
 #ifdef __GNUC__
 #  define _wimlib_deprecated __attribute__((deprecated))
 #else
@@ -567,9 +576,18 @@ enum wimlib_progress_msg {
 
        /** A file in the WIM image is being replaced as a result of a
         * ::wimlib_add_command without ::WIMLIB_ADD_FLAG_NO_REPLACE specified.
-        * This is only received when ::WIMLIB_ADD_FLAG_VERBOSE is also
-        * specified in the add command.  */
+        * @p info will point to ::wimlib_progress_info.replace.  This is only
+        * received when ::WIMLIB_ADD_FLAG_VERBOSE is also specified in the add
+        * command.  */
        WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM,
+
+       /** A WIM image is being applied with ::WIMLIB_EXTRACT_FLAG_WIMBOOT, and
+        * a file is being extracted normally (not as a WIMBoot "pointer file")
+        * due to it matching a pattern in the [PrepopulateList] section of the
+        * configuration file \Windows\System32\WimBootCompress.ini in the WIM
+        * image.  @info will point to ::wimlib_progress_info.wimboot_exclude.
+        */
+       WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE,
 };
 
 /** A pointer to this union is passed to the user-supplied
@@ -653,11 +671,10 @@ union wimlib_progress_info {
                int32_t  compression_type;
 
                /** Number of split WIM parts from which streams are being
-                * written (may be 0 if irrelevant).  */
+                * written (may be 0 if irrelevant).   */
                uint32_t total_parts;
 
-               /** Number of split WIM parts from which streams have been
-                * written (may be 0 if irrelevant).  */
+               /** This is currently broken and will always be 0.  */
                uint32_t completed_parts;
        } write_streams;
 
@@ -703,10 +720,7 @@ union wimlib_progress_info {
                union {
                        /** Target path in the WIM image.  Only valid on
                         * messages ::WIMLIB_PROGRESS_MSG_SCAN_BEGIN and
-                        * ::WIMLIB_PROGRESS_MSG_SCAN_END.  If capturing a full
-                        * image, this will be the empty string; otherwise it
-                        * will name the place in the WIM image at which the
-                        * directory tree is being added.  */
+                        * ::WIMLIB_PROGRESS_MSG_SCAN_END.  */
                        const wimlib_tchar *wim_target_path;
 
                        /** For ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY and a status
@@ -824,8 +838,8 @@ union wimlib_progress_info {
                 * data stream, or a reparse data buffer.  */
                uint64_t num_streams;
 
-               /** This will be the empty string.  */
-               const wimlib_tchar *extract_root_wim_source_path;
+               /** Reserved.  */
+               const wimlib_tchar *reserved_2;
 
                /** Currently only used for
                 * ::WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN.  */
@@ -925,6 +939,15 @@ union wimlib_progress_info {
                /** Path to the file in the WIM image that is being replaced  */
                const wimlib_tchar *path_in_wim;
        } replace;
+
+       /** Valid on messages ::WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE  */
+       struct wimlib_progress_info_wimboot_exclude {
+               /** Path to the file in the WIM image  */
+               const wimlib_tchar *path_in_wim;
+
+               /** Path to which the file is being extracted  */
+               const wimlib_tchar *extraction_path;
+       } wimboot_exclude;
 };
 
 /** A user-supplied function that will be called periodically during certain WIM
@@ -950,9 +973,8 @@ struct wimlib_capture_source {
         * filesystem to be included in the WIM image. */
        wimlib_tchar *fs_source_path;
 
-       /** Destination path in the WIM image.  Leading and trailing slashes are
-        * ignored.  The empty string or @c NULL means the root directory of the
-        * WIM image. */
+       /** Destination path in the WIM image.  Use ::WIMLIB_WIM_ROOT_PATH to
+        * specify the root directory of the WIM image.  */
        wimlib_tchar *wim_target_path;
 
        /** Reserved; set to 0. */
@@ -1263,8 +1285,8 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  * ::WIMLIB_ADD_FLAG_UNIX_DATA.   */
 #define WIMLIB_ADD_FLAG_NTFS                   0x00000001
 
-/** Follow symlinks; archive and dump the files they point to.  Cannot be used
- * with ::WIMLIB_ADD_FLAG_NTFS. */
+/** Follow symlinks; archive and dump the files they point to.  Currently only
+ * supported on UNIX-like systems.  */
 #define WIMLIB_ADD_FLAG_DEREFERENCE            0x00000002
 
 /** Call the progress function with the message
@@ -1280,7 +1302,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  * alternate data stream to each regular file, symbolic link, and directory to
  * contain this information.  Please note that this flag is for convenience
  * only; Microsoft's implementation will not understand this special
- * information.  This flag cannot be combined with ::WIMLIB_ADD_FLAG_NTFS.  */
+ * information.  */
 #define WIMLIB_ADD_FLAG_UNIX_DATA              0x00000010
 
 /** Do not capture security descriptors.  Only has an effect in NTFS capture
@@ -1317,8 +1339,8 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
 #define WIMLIB_ADD_FLAG_NORPFIX                        0x00000200
 
 /** Do not automatically exclude unsupported files or directories from capture;
- * e.g. encrypted directories in NTFS-3g capture mode, or device files and FIFOs
- * on UNIX-like systems.  Instead, fail with ::WIMLIB_ERR_UNSUPPORTED_FILE when
+ * e.g. encrypted files in NTFS-3g capture mode, or device files and FIFOs on
+ * UNIX-like systems.  Instead, fail with ::WIMLIB_ERR_UNSUPPORTED_FILE when
  * such a file is encountered.  */
 #define WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE 0x00000400
 
@@ -1803,12 +1825,11 @@ enum wimlib_update_op {
 
 /** Data for a ::WIMLIB_UPDATE_OP_ADD operation. */
 struct wimlib_add_command {
-       /** Filesystem path to the file or directory tree to
-        * add. */
+       /** Filesystem path to the file or directory tree to add.  */
        wimlib_tchar *fs_source_path;
-       /** Path, specified from the root of the WIM image, at
-        * which to add the file or directory tree within the
-        * WIM image. */
+
+       /** Destination path in the WIM image.  Use ::WIMLIB_WIM_ROOT_PATH to
+        * specify the root directory of the WIM image.  */
        wimlib_tchar *wim_target_path;
 
        /** Path to capture configuration file to use, or @c NULL for default.
@@ -1821,25 +1842,27 @@ struct wimlib_add_command {
 
 /** Data for a ::WIMLIB_UPDATE_OP_DELETE operation. */
 struct wimlib_delete_command {
-       /** Path, specified from the root of the WIM image, for
-        * the file or directory tree within the WIM image to be
-        * deleted. */
+
+       /** Path, specified from the root of the WIM image, for the file or
+        * directory tree within the WIM image to be deleted.  */
        wimlib_tchar *wim_path;
-       /** Bitwise OR of WIMLIB_DELETE_FLAG_* flags. */
+
+       /** Bitwise OR of WIMLIB_DELETE_FLAG_* flags.  */
        int delete_flags;
 };
 
 /** Data for a ::WIMLIB_UPDATE_OP_RENAME operation. */
 struct wimlib_rename_command {
-       /** Path, specified from the root of the WIM image, for
-        * the source file or directory tree within the WIM
-        * image. */
+
+       /** Path, specified from the root of the WIM image, for the source file
+        * or directory tree within the WIM image.  */
        wimlib_tchar *wim_source_path;
-       /** Path, specified from the root of the WIM image, for
-        * the destination file or directory tree within the WIM
-        * image. */
+
+       /** Path, specified from the root of the WIM image, for the destination
+        * file or directory tree within the WIM image.  */
        wimlib_tchar *wim_target_path;
-       /** Reserved; set to 0. */
+
+       /** Reserved; set to 0.  */
        int rename_flags;
 };