forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib.h
117 lines (103 loc) · 4.1 KB
/
lib.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* @file
* IMAP network mailbox
*
* @authors
* Copyright (C) 1996-1998 Michael R. Elkins <[email protected]>
* Copyright (C) 2000-2007,2017 Brendan Cully <[email protected]>
* Copyright (C) 2018 Richard Russon <[email protected]>
*
* @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/>.
*/
/**
* @page lib_imap Imap Mailbox
*
* IMAP network mailbox
*
* | File | Description |
* | :---------------- | :----------------------- |
* | imap/adata.c | @subpage imap_adata |
* | imap/auth.c | @subpage imap_auth |
* | imap/auth_anon.c | @subpage imap_auth_anon |
* | imap/auth_cram.c | @subpage imap_auth_cram |
* | imap_auth_gsasl | @subpage imap_auth_gsasl |
* | imap/auth_gss.c | @subpage imap_auth_gss |
* | imap/auth_login.c | @subpage imap_auth_login |
* | imap/auth_oauth.c | @subpage imap_auth_oauth |
* | imap/auth_plain.c | @subpage imap_auth_plain |
* | imap/auth_sasl.c | @subpage imap_auth_sasl |
* | imap/browse.c | @subpage imap_browse |
* | imap/command.c | @subpage imap_command |
* | imap/config.c | @subpage imap_config |
* | imap/edata.c | @subpage imap_edata |
* | imap/imap.c | @subpage imap_imap |
* | imap/mdata.c | @subpage imap_mdata |
* | imap/message.c | @subpage imap_message |
* | imap/msg_set.c | @subpage imap_msg_set |
* | imap/msn.c | @subpage imap_msn |
* | imap/search.c | @subpage imap_search |
* | imap/utf7.c | @subpage imap_utf7 |
* | imap/util.c | @subpage imap_util |
*/
#ifndef MUTT_IMAP_LIB_H
#define MUTT_IMAP_LIB_H
#include "config.h"
#include <stddef.h>
#include <stdbool.h>
#include <sys/types.h>
#include "core/lib.h"
#include "external.h"
struct BrowserState;
struct Buffer;
struct ConnAccount;
struct Email;
struct EmailArray;
struct PatternList;
struct stat;
/* imap.c */
void imap_init(void);
int imap_access(const char *path);
enum MxStatus imap_check_mailbox(struct Mailbox *m, bool force);
int imap_delete_mailbox(struct Mailbox *m, char *path);
enum MxStatus imap_sync_mailbox(struct Mailbox *m, bool expunge, bool close);
int imap_path_status(const char *path, bool queue);
int imap_mailbox_status(struct Mailbox *m, bool queue);
int imap_subscribe(char *path, bool subscribe);
int imap_complete(struct Buffer *buf, const char *path);
int imap_fast_trash(struct Mailbox *m, const char *dest);
enum MailboxType imap_path_probe(const char *path, const struct stat *st);
int imap_path_canon(struct Buffer *buf);
void imap_notify_delete_email(struct Mailbox *m, struct Email *e);
extern const struct MxOps MxImapOps;
/* browse.c */
int imap_browse(const char *path, struct BrowserState *state);
int imap_mailbox_create(const char *folder);
int imap_mailbox_rename(const char *path);
/* message.c */
int imap_copy_messages(struct Mailbox *m, struct EmailArray *ea, const char *dest, enum MessageSaveOpt save_opt);
/* socket.c */
void imap_logout_all(void);
/* util.c */
int imap_expand_path(struct Buffer *buf);
int imap_parse_path(const char *path, struct ConnAccount *cac, char *mailbox, size_t mailboxlen);
void imap_pretty_mailbox(char *path, size_t pathlen, const char *folder);
int imap_mxcmp(const char *mx1, const char *mx2);
int imap_wait_keep_alive(pid_t pid);
void imap_keep_alive(void);
void imap_get_parent_path(const char *path, char *buf, size_t buflen);
void imap_clean_path(char *path, size_t plen);
/* search.c */
bool imap_search(struct Mailbox *m, const struct PatternList *pat);
#endif /* MUTT_IMAP_LIB_H */