/** Patch version of the library (for example, the 5 in 1.2.5). */
#define WIMLIB_PATCH_VERSION 0
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Opaque structure that represents a WIM file. This is an in-memory structure
* and need not correspond to a specific on-disk file. However, a ::WIMStruct
* @name Init flags
*
* The following flags can be passed to wimlib_global_init().
+ * @{
*/
/** Assume that strings are represented in UTF-8, even if this is not the
*
* The following flags can be passed to wimlib_reference_resource_files() and
* wimlib_reference_resources().
+ * @{
*/
/** wimlib_reference_resource_files() only: Enable shell-style filename
* @}
*/
+/** Data for a ::WIMLIB_UPDATE_OP_ADD operation. */
+struct wimlib_add_command {
+ /** 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. */
+ wimlib_tchar *wim_target_path;
+
+ /** Configuration for excluded files. @c NULL means
+ * exclude no files (use no configuration), unless
+ * ::WIMLIB_ADD_FLAG_WINCONFIG is specified in @p
+ * add_flags. */
+ struct wimlib_capture_config *config;
+
+ /** Bitwise OR of WIMLIB_ADD_FLAG_* flags. */
+ int add_flags;
+};
+
+/** 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. */
+ wimlib_tchar *wim_path;
+ /** 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. */
+ 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. */
+ wimlib_tchar *wim_target_path;
+ /** Reserved; set to 0. */
+ int rename_flags;
+};
+
/** Specification of an update to perform on a WIM image. */
struct wimlib_update_command {
WIMLIB_UPDATE_OP_RENAME,
} op;
union {
- /** Data for a ::WIMLIB_UPDATE_OP_ADD operation. */
- struct wimlib_add_command {
- /** 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. */
- wimlib_tchar *wim_target_path;
-
- /** Configuration for excluded files. @c NULL means
- * exclude no files (use no configuration), unless
- * ::WIMLIB_ADD_FLAG_WINCONFIG is specified in @p
- * add_flags. */
- struct wimlib_capture_config *config;
-
- /** Bitwise OR of WIMLIB_ADD_FLAG_* flags. */
- int add_flags;
- } add;
- /** 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. */
- wimlib_tchar *wim_path;
- /** Bitwise OR of WIMLIB_DELETE_FLAG_* flags. */
- int delete_flags;
- } delete;
- /** 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. */
- 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. */
- wimlib_tchar *wim_target_path;
- /** Reserved; set to 0. */
- int rename_flags;
- } rename;
+ struct wimlib_add_command add;
+ struct wimlib_delete_command delete_; /* Underscore is for C++
+ compatibility. */
+ struct wimlib_rename_command rename;
};
};
* wimlib_resolve_image() uses. However, unlike wimlib_extract_image(),
* only a single image (not all images) can be specified. Alternatively,
* specify @p NULL here to use the first image in the WIM if it contains
- * exactly one image but otherwise return @p WIMLIB_ERR_INVALID_IMAGE.
+ * exactly one image but otherwise return ::WIMLIB_ERR_INVALID_IMAGE.
* @param target
* Same as the corresponding parameter to wimlib_extract_image().
* @param extract_flags
* Number of filenames in @p swms.
* @param swm_open_flags
* Open flags for the split WIM parts (e.g.
- * ::WIMLIB_OPEN_FLAG_CHECK_INTEGRITY). Note: WIMLIB_OPEN_FLAG_SPLIT_OK is
- * automatically added to the value specified here.
+ * ::WIMLIB_OPEN_FLAG_CHECK_INTEGRITY). Note: ::WIMLIB_OPEN_FLAG_SPLIT_OK
+ * is automatically added to the value specified here.
* @param wim_write_flags
* Bitwise OR of relevant flags prefixed with WIMLIB_WRITE_FLAG, which will
* be used to write the joined WIM.
wimlib_xpress_decompress(const void *compressed_data, unsigned compressed_len,
void *uncompressed_data, unsigned uncompressed_len);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _WIMLIB_H */