From 731e119197092dafb1436f5863d0fadf57d8b845 Mon Sep 17 00:00:00 2001 From: Vadim Lebedev Date: Mon, 18 Jul 2022 11:59:04 +0200 Subject: [PATCH] upgrade archive write support --- libarchive/_libarchive.i | 40 +- libarchive/_libarchive.py | 81 ++++ libarchive/_libarchive_wrap.c | 793 +++++++++++++++++++++++++++++++++- 3 files changed, 895 insertions(+), 19 deletions(-) diff --git a/libarchive/_libarchive.i b/libarchive/_libarchive.i index 6b0bc27..56d29fa 100644 --- a/libarchive/_libarchive.i +++ b/libarchive/_libarchive.i @@ -293,42 +293,78 @@ extern int archive_write_close(struct archive *); extern int archive_write_header(struct archive *, struct archive_entry *); +extern int archive_write_set_format_option(struct archive *_a, + const char *m, const char *o, + const char *v); +/* Apply option to the filter only. */ +extern int archive_write_set_filter_option(struct archive *_a, + const char *m, const char *o, + const char *v); +/* Apply option to both the format and the filter. */ +extern int archive_write_set_option(struct archive *_a, + const char *m, const char *o, + const char *v); +/* Apply option string to both the format and the filter. */ +extern int archive_write_set_options(struct archive *_a, + const char *opts); + +/* password */ +extern int archive_write_set_passphrase(struct archive *_a, const char *p); /* data */ /* commit */ extern int archive_write_finish_entry(struct archive *); /* FILTERS */ +extern int archive_write_add_filter(struct archive *, int filter_code); +extern int archive_write_add_filter_by_name(struct archive *, + const char *name); +extern int archive_write_add_filter_b64encode(struct archive *); extern int archive_write_add_filter_bzip2(struct archive *); extern int archive_write_add_filter_compress(struct archive *); +extern int archive_write_add_filter_grzip(struct archive *); extern int archive_write_add_filter_gzip(struct archive *); +extern int archive_write_add_filter_lrzip(struct archive *); +extern int archive_write_add_filter_lz4(struct archive *); extern int archive_write_add_filter_lzip(struct archive *); extern int archive_write_add_filter_lzma(struct archive *); +extern int archive_write_add_filter_lzop(struct archive *); extern int archive_write_add_filter_none(struct archive *); +extern int archive_write_add_filter_program(struct archive *, + const char *cmd); +extern int archive_write_add_filter_uuencode(struct archive *); extern int archive_write_add_filter_xz(struct archive *); -/* FORMATS */ /* A convenience function to set the format based on the code or name. */ extern int archive_write_set_format(struct archive *, int format_code); extern int archive_write_set_format_by_name(struct archive *, const char *name); /* To minimize link pollution, use one or more of the following. */ +extern int archive_write_set_format_7zip(struct archive *); extern int archive_write_set_format_ar_bsd(struct archive *); extern int archive_write_set_format_ar_svr4(struct archive *); extern int archive_write_set_format_cpio(struct archive *); extern int archive_write_set_format_cpio_newc(struct archive *); extern int archive_write_set_format_gnutar(struct archive *); extern int archive_write_set_format_iso9660(struct archive *); -/*extern int archive_write_set_format_mtree(struct archive *);*/ +extern int archive_write_set_format_mtree(struct archive *); +extern int archive_write_set_format_mtree_classic(struct archive *); /* TODO: int archive_write_set_format_old_tar(struct archive *); */ extern int archive_write_set_format_pax(struct archive *); extern int archive_write_set_format_pax_restricted(struct archive *); +extern int archive_write_set_format_raw(struct archive *); extern int archive_write_set_format_shar(struct archive *); extern int archive_write_set_format_shar_dump(struct archive *); extern int archive_write_set_format_ustar(struct archive *); +extern int archive_write_set_format_v7tar(struct archive *); +extern int archive_write_set_format_warc(struct archive *); extern int archive_write_set_format_xar(struct archive *); extern int archive_write_set_format_zip(struct archive *); +extern int archive_write_set_format_filter_by_ext(struct archive *a, const char *filename); +extern int archive_write_set_format_filter_by_ext_def(struct archive *a, const char *filename, const char * def_ext); +extern int archive_write_zip_set_compression_deflate(struct archive *); +extern int archive_write_zip_set_compression_store(struct archive *); /* ARCHIVE ENTRY */ extern struct archive_entry *archive_entry_new(void); diff --git a/libarchive/_libarchive.py b/libarchive/_libarchive.py index 36aadd7..9ddcf02 100644 --- a/libarchive/_libarchive.py +++ b/libarchive/_libarchive.py @@ -293,27 +293,69 @@ def archive_write_close(arg1): def archive_write_header(arg1, arg2): return __libarchive.archive_write_header(arg1, arg2) +def archive_write_set_format_option(_a, m, o, v): + return __libarchive.archive_write_set_format_option(_a, m, o, v) + +def archive_write_set_filter_option(_a, m, o, v): + return __libarchive.archive_write_set_filter_option(_a, m, o, v) + +def archive_write_set_option(_a, m, o, v): + return __libarchive.archive_write_set_option(_a, m, o, v) + +def archive_write_set_options(_a, opts): + return __libarchive.archive_write_set_options(_a, opts) + +def archive_write_set_passphrase(_a, p): + return __libarchive.archive_write_set_passphrase(_a, p) + def archive_write_finish_entry(arg1): return __libarchive.archive_write_finish_entry(arg1) +def archive_write_add_filter(arg1, filter_code): + return __libarchive.archive_write_add_filter(arg1, filter_code) + +def archive_write_add_filter_by_name(arg1, name): + return __libarchive.archive_write_add_filter_by_name(arg1, name) + +def archive_write_add_filter_b64encode(arg1): + return __libarchive.archive_write_add_filter_b64encode(arg1) + def archive_write_add_filter_bzip2(arg1): return __libarchive.archive_write_add_filter_bzip2(arg1) def archive_write_add_filter_compress(arg1): return __libarchive.archive_write_add_filter_compress(arg1) +def archive_write_add_filter_grzip(arg1): + return __libarchive.archive_write_add_filter_grzip(arg1) + def archive_write_add_filter_gzip(arg1): return __libarchive.archive_write_add_filter_gzip(arg1) +def archive_write_add_filter_lrzip(arg1): + return __libarchive.archive_write_add_filter_lrzip(arg1) + +def archive_write_add_filter_lz4(arg1): + return __libarchive.archive_write_add_filter_lz4(arg1) + def archive_write_add_filter_lzip(arg1): return __libarchive.archive_write_add_filter_lzip(arg1) def archive_write_add_filter_lzma(arg1): return __libarchive.archive_write_add_filter_lzma(arg1) +def archive_write_add_filter_lzop(arg1): + return __libarchive.archive_write_add_filter_lzop(arg1) + def archive_write_add_filter_none(arg1): return __libarchive.archive_write_add_filter_none(arg1) +def archive_write_add_filter_program(arg1, cmd): + return __libarchive.archive_write_add_filter_program(arg1, cmd) + +def archive_write_add_filter_uuencode(arg1): + return __libarchive.archive_write_add_filter_uuencode(arg1) + def archive_write_add_filter_xz(arg1): return __libarchive.archive_write_add_filter_xz(arg1) @@ -323,6 +365,9 @@ def archive_write_set_format(arg1, format_code): def archive_write_set_format_by_name(arg1, name): return __libarchive.archive_write_set_format_by_name(arg1, name) +def archive_write_set_format_7zip(arg1): + return __libarchive.archive_write_set_format_7zip(arg1) + def archive_write_set_format_ar_bsd(arg1): return __libarchive.archive_write_set_format_ar_bsd(arg1) @@ -341,12 +386,21 @@ def archive_write_set_format_gnutar(arg1): def archive_write_set_format_iso9660(arg1): return __libarchive.archive_write_set_format_iso9660(arg1) +def archive_write_set_format_mtree(arg1): + return __libarchive.archive_write_set_format_mtree(arg1) + +def archive_write_set_format_mtree_classic(arg1): + return __libarchive.archive_write_set_format_mtree_classic(arg1) + def archive_write_set_format_pax(arg1): return __libarchive.archive_write_set_format_pax(arg1) def archive_write_set_format_pax_restricted(arg1): return __libarchive.archive_write_set_format_pax_restricted(arg1) +def archive_write_set_format_raw(arg1): + return __libarchive.archive_write_set_format_raw(arg1) + def archive_write_set_format_shar(arg1): return __libarchive.archive_write_set_format_shar(arg1) @@ -356,12 +410,30 @@ def archive_write_set_format_shar_dump(arg1): def archive_write_set_format_ustar(arg1): return __libarchive.archive_write_set_format_ustar(arg1) +def archive_write_set_format_v7tar(arg1): + return __libarchive.archive_write_set_format_v7tar(arg1) + +def archive_write_set_format_warc(arg1): + return __libarchive.archive_write_set_format_warc(arg1) + def archive_write_set_format_xar(arg1): return __libarchive.archive_write_set_format_xar(arg1) def archive_write_set_format_zip(arg1): return __libarchive.archive_write_set_format_zip(arg1) +def archive_write_set_format_filter_by_ext(a, filename): + return __libarchive.archive_write_set_format_filter_by_ext(a, filename) + +def archive_write_set_format_filter_by_ext_def(a, filename, def_ext): + return __libarchive.archive_write_set_format_filter_by_ext_def(a, filename, def_ext) + +def archive_write_zip_set_compression_deflate(arg1): + return __libarchive.archive_write_zip_set_compression_deflate(arg1) + +def archive_write_zip_set_compression_store(arg1): + return __libarchive.archive_write_zip_set_compression_store(arg1) + def archive_entry_new(): return __libarchive.archive_entry_new() @@ -451,6 +523,10 @@ ARCHIVE_FILTER_XZ = __libarchive.ARCHIVE_FILTER_XZ ARCHIVE_FILTER_UU = __libarchive.ARCHIVE_FILTER_UU ARCHIVE_FILTER_RPM = __libarchive.ARCHIVE_FILTER_RPM ARCHIVE_FILTER_LZIP = __libarchive.ARCHIVE_FILTER_LZIP +ARCHIVE_FILTER_LRZIP = __libarchive.ARCHIVE_FILTER_LRZIP +ARCHIVE_FILTER_LZOP = __libarchive.ARCHIVE_FILTER_LZOP +ARCHIVE_FILTER_GRZIP = __libarchive.ARCHIVE_FILTER_GRZIP +ARCHIVE_FILTER_LZ4 = __libarchive.ARCHIVE_FILTER_LZ4 ARCHIVE_FORMAT_BASE_MASK = __libarchive.ARCHIVE_FORMAT_BASE_MASK ARCHIVE_FORMAT_CPIO = __libarchive.ARCHIVE_FORMAT_CPIO ARCHIVE_FORMAT_CPIO_POSIX = __libarchive.ARCHIVE_FORMAT_CPIO_POSIX @@ -481,6 +557,7 @@ ARCHIVE_FORMAT_LHA = __libarchive.ARCHIVE_FORMAT_LHA ARCHIVE_FORMAT_CAB = __libarchive.ARCHIVE_FORMAT_CAB ARCHIVE_FORMAT_RAR = __libarchive.ARCHIVE_FORMAT_RAR ARCHIVE_FORMAT_7ZIP = __libarchive.ARCHIVE_FORMAT_7ZIP +ARCHIVE_FORMAT_WARC = __libarchive.ARCHIVE_FORMAT_WARC ARCHIVE_EXTRACT_OWNER = __libarchive.ARCHIVE_EXTRACT_OWNER ARCHIVE_EXTRACT_PERM = __libarchive.ARCHIVE_EXTRACT_PERM ARCHIVE_EXTRACT_TIME = __libarchive.ARCHIVE_EXTRACT_TIME @@ -495,6 +572,10 @@ ARCHIVE_EXTRACT_NO_AUTODIR = __libarchive.ARCHIVE_EXTRACT_NO_AUTODIR ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER = __libarchive.ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER ARCHIVE_EXTRACT_SPARSE = __libarchive.ARCHIVE_EXTRACT_SPARSE ARCHIVE_EXTRACT_MAC_METADATA = __libarchive.ARCHIVE_EXTRACT_MAC_METADATA +ARCHIVE_EXTRACT_NO_HFS_COMPRESSION = __libarchive.ARCHIVE_EXTRACT_NO_HFS_COMPRESSION +ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED = __libarchive.ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED +ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS = __libarchive.ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS +ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS = __libarchive.ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS def archive_read_data_into_str(archive, len): return __libarchive.archive_read_data_into_str(archive, len) diff --git a/libarchive/_libarchive_wrap.c b/libarchive/_libarchive_wrap.c index aa9555a..315ecd2 100644 --- a/libarchive/_libarchive_wrap.c +++ b/libarchive/_libarchive_wrap.c @@ -5372,6 +5372,237 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject *swig_obj[4] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_option", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_option" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_option" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_format_option" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_format_option" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + result = (int)archive_write_set_format_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_filter_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject *swig_obj[4] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_filter_option", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_filter_option" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_filter_option" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_filter_option" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_filter_option" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + result = (int)archive_write_set_filter_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject *swig_obj[4] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_option", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_option" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_option" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_option" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_option" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + result = (int)archive_write_set_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_options(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_options", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_options" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_options" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)archive_write_set_options(arg1,(char const *)arg2); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_passphrase", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_passphrase" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_passphrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)archive_write_set_passphrase(arg1,(char const *)arg2); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_finish_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5395,6 +5626,92 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_add_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_write_add_filter" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (int)archive_write_add_filter(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_by_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter_by_name", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_by_name" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_add_filter_by_name" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)archive_write_add_filter_by_name(arg1,(char const *)arg2); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_b64encode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_b64encode" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_b64encode(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_add_filter_bzip2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5441,7 +5758,145 @@ fail: } -SWIGINTERN PyObject *_wrap_archive_write_add_filter_gzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archive_write_add_filter_grzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_grzip" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_grzip(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_gzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_gzip" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_gzip(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_lrzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lrzip" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_lrzip(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_lz4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lz4" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_lz4(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzip" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_lzip(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzma" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_add_filter_lzma(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; void *argp1 = 0 ; @@ -5453,10 +5908,10 @@ SWIGINTERN PyObject *_wrap_archive_write_add_filter_gzip(PyObject *SWIGUNUSEDPAR swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_gzip" "', argument " "1"" of type '" "struct archive *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzop" "', argument " "1"" of type '" "struct archive *""'"); } arg1 = (struct archive *)(argp1); - result = (int)archive_write_add_filter_gzip(arg1); + result = (int)archive_write_add_filter_lzop(arg1); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -5464,7 +5919,7 @@ fail: } -SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archive_write_add_filter_none(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; void *argp1 = 0 ; @@ -5476,10 +5931,10 @@ SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzip(PyObject *SWIGUNUSEDPAR swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzip" "', argument " "1"" of type '" "struct archive *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_none" "', argument " "1"" of type '" "struct archive *""'"); } arg1 = (struct archive *)(argp1); - result = (int)archive_write_add_filter_lzip(arg1); + result = (int)archive_write_add_filter_none(arg1); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -5487,30 +5942,40 @@ fail: } -SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archive_write_add_filter_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; + if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter_program", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzma" "', argument " "1"" of type '" "struct archive *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_program" "', argument " "1"" of type '" "struct archive *""'"); } arg1 = (struct archive *)(argp1); - result = (int)archive_write_add_filter_lzma(arg1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_add_filter_program" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)archive_write_add_filter_program(arg1,(char const *)arg2); resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_archive_write_add_filter_none(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archive_write_add_filter_uuencode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; void *argp1 = 0 ; @@ -5522,10 +5987,10 @@ SWIGINTERN PyObject *_wrap_archive_write_add_filter_none(PyObject *SWIGUNUSEDPAR swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_none" "', argument " "1"" of type '" "struct archive *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_uuencode" "', argument " "1"" of type '" "struct archive *""'"); } arg1 = (struct archive *)(argp1); - result = (int)archive_write_add_filter_none(arg1); + result = (int)archive_write_add_filter_uuencode(arg1); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -5619,6 +6084,29 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_7zip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_7zip" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_7zip(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_set_format_ar_bsd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5757,6 +6245,52 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_mtree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_mtree" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_mtree(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_format_mtree_classic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_mtree_classic" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_mtree_classic(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_set_format_pax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5803,6 +6337,29 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_raw" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_raw(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_set_format_shar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5872,6 +6429,52 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_v7tar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_v7tar" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_v7tar(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_format_warc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_warc" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_set_format_warc(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_write_set_format_xar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive *arg1 = (struct archive *) 0 ; @@ -5918,6 +6521,129 @@ fail: } +SWIGINTERN PyObject *_wrap_archive_write_set_format_filter_by_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_filter_by_ext", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_filter_by_ext" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_filter_by_ext" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)archive_write_set_format_filter_by_ext(arg1,(char const *)arg2); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_set_format_filter_by_ext_def(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_filter_by_ext_def", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + result = (int)archive_write_set_format_filter_by_ext_def(arg1,(char const *)arg2,(char const *)arg3); + resultobj = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_zip_set_compression_deflate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_zip_set_compression_deflate" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_zip_set_compression_deflate(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_archive_write_zip_set_compression_store(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct archive *arg1 = (struct archive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_zip_set_compression_store" "', argument " "1"" of type '" "struct archive *""'"); + } + arg1 = (struct archive *)(argp1); + result = (int)archive_write_zip_set_compression_store(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_archive_entry_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct archive_entry *result = 0 ; @@ -6680,29 +7406,53 @@ static PyMethodDef SwigMethods[] = { { "archive_write_open_memory", _wrap_archive_write_open_memory, METH_VARARGS, NULL}, { "archive_write_close", _wrap_archive_write_close, METH_O, NULL}, { "archive_write_header", _wrap_archive_write_header, METH_VARARGS, NULL}, + { "archive_write_set_format_option", _wrap_archive_write_set_format_option, METH_VARARGS, NULL}, + { "archive_write_set_filter_option", _wrap_archive_write_set_filter_option, METH_VARARGS, NULL}, + { "archive_write_set_option", _wrap_archive_write_set_option, METH_VARARGS, NULL}, + { "archive_write_set_options", _wrap_archive_write_set_options, METH_VARARGS, NULL}, + { "archive_write_set_passphrase", _wrap_archive_write_set_passphrase, METH_VARARGS, NULL}, { "archive_write_finish_entry", _wrap_archive_write_finish_entry, METH_O, NULL}, + { "archive_write_add_filter", _wrap_archive_write_add_filter, METH_VARARGS, NULL}, + { "archive_write_add_filter_by_name", _wrap_archive_write_add_filter_by_name, METH_VARARGS, NULL}, + { "archive_write_add_filter_b64encode", _wrap_archive_write_add_filter_b64encode, METH_O, NULL}, { "archive_write_add_filter_bzip2", _wrap_archive_write_add_filter_bzip2, METH_O, NULL}, { "archive_write_add_filter_compress", _wrap_archive_write_add_filter_compress, METH_O, NULL}, + { "archive_write_add_filter_grzip", _wrap_archive_write_add_filter_grzip, METH_O, NULL}, { "archive_write_add_filter_gzip", _wrap_archive_write_add_filter_gzip, METH_O, NULL}, + { "archive_write_add_filter_lrzip", _wrap_archive_write_add_filter_lrzip, METH_O, NULL}, + { "archive_write_add_filter_lz4", _wrap_archive_write_add_filter_lz4, METH_O, NULL}, { "archive_write_add_filter_lzip", _wrap_archive_write_add_filter_lzip, METH_O, NULL}, { "archive_write_add_filter_lzma", _wrap_archive_write_add_filter_lzma, METH_O, NULL}, + { "archive_write_add_filter_lzop", _wrap_archive_write_add_filter_lzop, METH_O, NULL}, { "archive_write_add_filter_none", _wrap_archive_write_add_filter_none, METH_O, NULL}, + { "archive_write_add_filter_program", _wrap_archive_write_add_filter_program, METH_VARARGS, NULL}, + { "archive_write_add_filter_uuencode", _wrap_archive_write_add_filter_uuencode, METH_O, NULL}, { "archive_write_add_filter_xz", _wrap_archive_write_add_filter_xz, METH_O, NULL}, { "archive_write_set_format", _wrap_archive_write_set_format, METH_VARARGS, NULL}, { "archive_write_set_format_by_name", _wrap_archive_write_set_format_by_name, METH_VARARGS, NULL}, + { "archive_write_set_format_7zip", _wrap_archive_write_set_format_7zip, METH_O, NULL}, { "archive_write_set_format_ar_bsd", _wrap_archive_write_set_format_ar_bsd, METH_O, NULL}, { "archive_write_set_format_ar_svr4", _wrap_archive_write_set_format_ar_svr4, METH_O, NULL}, { "archive_write_set_format_cpio", _wrap_archive_write_set_format_cpio, METH_O, NULL}, { "archive_write_set_format_cpio_newc", _wrap_archive_write_set_format_cpio_newc, METH_O, NULL}, { "archive_write_set_format_gnutar", _wrap_archive_write_set_format_gnutar, METH_O, NULL}, { "archive_write_set_format_iso9660", _wrap_archive_write_set_format_iso9660, METH_O, NULL}, + { "archive_write_set_format_mtree", _wrap_archive_write_set_format_mtree, METH_O, NULL}, + { "archive_write_set_format_mtree_classic", _wrap_archive_write_set_format_mtree_classic, METH_O, NULL}, { "archive_write_set_format_pax", _wrap_archive_write_set_format_pax, METH_O, NULL}, { "archive_write_set_format_pax_restricted", _wrap_archive_write_set_format_pax_restricted, METH_O, NULL}, + { "archive_write_set_format_raw", _wrap_archive_write_set_format_raw, METH_O, NULL}, { "archive_write_set_format_shar", _wrap_archive_write_set_format_shar, METH_O, NULL}, { "archive_write_set_format_shar_dump", _wrap_archive_write_set_format_shar_dump, METH_O, NULL}, { "archive_write_set_format_ustar", _wrap_archive_write_set_format_ustar, METH_O, NULL}, + { "archive_write_set_format_v7tar", _wrap_archive_write_set_format_v7tar, METH_O, NULL}, + { "archive_write_set_format_warc", _wrap_archive_write_set_format_warc, METH_O, NULL}, { "archive_write_set_format_xar", _wrap_archive_write_set_format_xar, METH_O, NULL}, { "archive_write_set_format_zip", _wrap_archive_write_set_format_zip, METH_O, NULL}, + { "archive_write_set_format_filter_by_ext", _wrap_archive_write_set_format_filter_by_ext, METH_VARARGS, NULL}, + { "archive_write_set_format_filter_by_ext_def", _wrap_archive_write_set_format_filter_by_ext_def, METH_VARARGS, NULL}, + { "archive_write_zip_set_compression_deflate", _wrap_archive_write_zip_set_compression_deflate, METH_O, NULL}, + { "archive_write_zip_set_compression_store", _wrap_archive_write_zip_set_compression_store, METH_O, NULL}, { "archive_entry_new", _wrap_archive_entry_new, METH_NOARGS, NULL}, { "archive_entry_free", _wrap_archive_entry_free, METH_O, NULL}, { "archive_entry_pathname", _wrap_archive_entry_pathname, METH_O, NULL}, @@ -7528,8 +8278,8 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); - SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_NUMBER",SWIG_From_int((int)(3005003))); - SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_STRING",SWIG_FromCharPtr("libarchive 3.5.2")); + SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_NUMBER",SWIG_From_int((int)(3002002))); + SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_STRING",SWIG_FromCharPtr("libarchive 3.2.2")); SWIG_Python_SetConstant(d, "ARCHIVE_EOF",SWIG_From_int((int)(1))); SWIG_Python_SetConstant(d, "ARCHIVE_OK",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, "ARCHIVE_RETRY",SWIG_From_int((int)((-10)))); @@ -7546,6 +8296,10 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_UU",SWIG_From_int((int)(7))); SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_RPM",SWIG_From_int((int)(8))); SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZIP",SWIG_From_int((int)(9))); + SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LRZIP",SWIG_From_int((int)(10))); + SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZOP",SWIG_From_int((int)(11))); + SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_GRZIP",SWIG_From_int((int)(12))); + SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZ4",SWIG_From_int((int)(13))); SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_BASE_MASK",SWIG_From_int((int)(0xff0000))); SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO",SWIG_From_int((int)(0x10000))); SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_POSIX",SWIG_From_int((int)((0x10000|1)))); @@ -7576,6 +8330,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CAB",SWIG_From_int((int)(0xC0000))); SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_RAR",SWIG_From_int((int)(0xD0000))); SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_7ZIP",SWIG_From_int((int)(0xE0000))); + SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_WARC",SWIG_From_int((int)(0xF0000))); SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_OWNER",SWIG_From_int((int)((0x0001)))); SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_PERM",SWIG_From_int((int)((0x0002)))); SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_TIME",SWIG_From_int((int)((0x0004)))); @@ -7590,6 +8345,10 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER",SWIG_From_int((int)((0x0800)))); SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SPARSE",SWIG_From_int((int)((0x1000)))); SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_MAC_METADATA",SWIG_From_int((int)((0x2000)))); + SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_HFS_COMPRESSION",SWIG_From_int((int)((0x4000)))); + SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED",SWIG_From_int((int)((0x8000)))); + SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS",SWIG_From_int((int)((0x10000)))); + SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS",SWIG_From_int((int)((0x20000)))); #if PY_VERSION_HEX >= 0x03000000 return m; #else