support image/x-eps format via pdf_viewer
[claws.git] / src / plugins / archive / libarchive_archive.h
blobfc7f0c26ac28e8ad6274e787d59a529c0cfb6ae7
1 /* vim: set textwidth=80 tabstop=4: */
3 /*
4 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
5 * Copyright (C) 1999-2024 Michael Rasmussen and the Claws Mail Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef __LIBARCHIVE_ARCHIVE_H__
22 #define __LIBARCHIVE_ARCHIVE_H__
24 #include <glib.h>
25 #include "folder.h"
27 #include <archive.h>
29 typedef enum _COMPRESS_METHOD COMPRESS_METHOD;
30 enum _COMPRESS_METHOD {
31 GZIP,
32 BZIP2,
33 COMPRESS,
34 #if ARCHIVE_VERSION_NUMBER >= 2006990
35 LZMA,
36 XZ,
37 #endif
38 #if ARCHIVE_VERSION_NUMBER >= 3000000
39 LZIP,
40 #endif
41 #if ARCHIVE_VERSION_NUMBER >= 3001000
42 LRZIP,
43 LZOP,
44 GRZIP,
45 #endif
46 #if ARCHIVE_VERSION_NUMBER >= 3001900
47 LZ4,
48 #endif
49 NO_COMPRESS
52 typedef enum _ARCHIVE_FORMAT ARCHIVE_FORMAT;
53 enum _ARCHIVE_FORMAT {
54 NO_FORMAT,
55 TAR,
56 SHAR,
57 PAX,
58 CPIO
61 typedef struct _MsgTrash MsgTrash;
62 struct _MsgTrash {
63 FolderItem* item;
64 /* List of MsgInfos* */
65 GSList* msgs;
68 MsgTrash* new_msg_trash(FolderItem* item);
69 void archive_free_archived_files();
70 void archive_add_msg_mark(MsgTrash* trash, MsgInfo* msg);
71 void archive_add_file(gchar* path);
72 GSList* archive_get_file_list();
73 void archive_free_file_list(gboolean md5, gboolean rename);
74 const gchar* archive_create(const char* archive_name, GSList* files,
75 COMPRESS_METHOD method, ARCHIVE_FORMAT format);
76 gboolean before_date(time_t msg_mtime, const gchar* before);
77 void archiver_set_tooltip(GtkWidget* widget, gchar* text);
79 #ifdef DEBUG_ARCHIVE
80 void archive_set_permissions(int perm);
81 const gchar* archive_extract(const char* archive_name, int flags);
82 void archive_scan_folder(const char* dir);
83 #endif
85 #endif