]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Add WIMLIB_ERR_FVE_LOCKED_VOLUME
[wimlib] / include / wimlib.h
index d28fd3443ecc157538e8931147f83880836dbe7a..d8d0e755488810ba75f63177685e3eb1d1375b20 100644 (file)
@@ -700,6 +700,20 @@ enum wimlib_progress_msg {
        /** wimlib_verify_wim() is verifying stream integrity.  @p info will
         * point to ::wimlib_progress_info.verify_streams.  */
        WIMLIB_PROGRESS_MSG_VERIFY_STREAMS = 29,
+
+       /**
+        * The progress function is being asked whether a file should be
+        * excluded from capture or not.  @p info will point to
+        * ::wimlib_progress_info.test_file_exclusion.  This is a bidirectional
+        * message that allows the progress function to set a flag if the file
+        * should be excluded.
+        *
+        * This message is only received if the flag
+        * ::WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION is used.  This method for file
+        * exclusions is independent of the "capture configuration file"
+        * mechanism.
+        */
+       WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION = 30,
 };
 
 /** Valid return values from user-provided progress functions
@@ -1170,6 +1184,32 @@ union wimlib_progress_info {
                uint64_t completed_streams;
                uint64_t completed_bytes;
        } verify_streams;
+
+       /** Valid on messages ::WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION.  */
+       struct wimlib_progress_info_test_file_exclusion {
+
+               /**
+                * Path to the file for which exclusion is being tested.
+                *
+                * UNIX capture mode:  The path will be a standard relative or
+                * absolute UNIX filesystem path.
+                *
+                * NTFS-3g capture mode:  The path will be given relative to the
+                * root of the NTFS volume, with a leading slash.
+                *
+                * Windows capture mode:  The path will be a Win32 namespace
+                * path to the file.
+                */
+               const wimlib_tchar *path;
+
+               /**
+                * Indicates whether the file or directory will be excluded from
+                * capture or not.  This will be <tt>false</tt> by default.  The
+                * progress function can set this to <tt>true</tt> if it decides
+                * that the file needs to be excluded.
+                */
+               bool will_exclude;
+       } test_file_exclusion;
 };
 
 /**
@@ -1682,6 +1722,15 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  */
 #define WIMLIB_ADD_FLAG_NO_REPLACE             0x00002000
 
+/**
+ * Send ::WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION messages to the progress
+ * function.
+ *
+ * Note: This method for file exclusions is independent from the capture
+ * configuration file mechanism.
+ */
+#define WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION 0x00004000
+
 #define WIMLIB_ADD_IMAGE_FLAG_NTFS             WIMLIB_ADD_FLAG_NTFS
 #define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE      WIMLIB_ADD_FLAG_DEREFERENCE
 #define WIMLIB_ADD_IMAGE_FLAG_VERBOSE          WIMLIB_ADD_FLAG_VERBOSE
@@ -2385,6 +2434,7 @@ enum wimlib_error_code {
        WIMLIB_ERR_MOUNTED_IMAGE_IS_BUSY              = 79,
        WIMLIB_ERR_NOT_A_MOUNTPOINT                   = 80,
        WIMLIB_ERR_NOT_PERMITTED_TO_UNMOUNT           = 81,
+       WIMLIB_ERR_FVE_LOCKED_VOLUME                  = 82,
 };
 
 
@@ -4290,6 +4340,9 @@ wimlib_unmount_image_with_progress(const wimlib_tchar *dir,
  * be rolled back, and no visible changes shall have been made to @p wim.
  * Possible error codes include:
  *
+ * @retval ::WIMLIB_ERR_FVE_LOCKED_VOLUME
+ *     Windows-only: One of the "add" commands attempted to add files from an
+ *     encrypted BitLocker volume that hasn't yet been unlocked.
  * @retval ::WIMLIB_ERR_INVALID_CAPTURE_CONFIG
  *     The capture configuration structure specified for an add command was
  *     invalid.