forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compress.h
55 lines (48 loc) · 1.73 KB
/
compress.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* @file
* Compressed mbox local mailbox type
*
* @authors
* Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
* Copyright (C) 2016 Richard Russon <rich@flatcap.org>
*
* @copyright
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MUTT_COMPRESS_H
#define MUTT_COMPRESS_H
#include <stdbool.h>
#include "mx.h"
struct Context;
/**
* struct CompressInfo - Private data for compress
*
* This object gets attached to the Mailbox.
*/
struct CompressInfo
{
const char *cmd_append; ///< append-hook command
const char *cmd_close; ///< close-hook command
const char *cmd_open; ///< open-hook command
long size; ///< size of the compressed file
const struct MxOps *child_ops; ///< callbacks of de-compressed file
bool locked; ///< if realpath is locked
FILE *fp_lock; ///< fp used for locking
};
bool mutt_comp_can_append(struct Mailbox *m);
bool mutt_comp_can_read(const char *path);
int mutt_comp_valid_command(const char *cmd);
int comp_path_probe(const char *path, const struct stat *st);
extern struct MxOps MxCompOps;
#endif /* MUTT_COMPRESS_H */