Diffstat (limited to 'kmicromail/libetpan/generic/imapdriver_tools.h') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libetpan/generic/imapdriver_tools.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/kmicromail/libetpan/generic/imapdriver_tools.h b/kmicromail/libetpan/generic/imapdriver_tools.h new file mode 100644 index 0000000..6582a31 --- a/dev/null +++ b/kmicromail/libetpan/generic/imapdriver_tools.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * libEtPan! -- a mail stuff library | ||
3 | * | ||
4 | * Copyright (C) 2001, 2002 - DINH Viet Hoa | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions | ||
9 | * are met: | ||
10 | * 1. Redistributions of source code must retain the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer. | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the distribution. | ||
15 | * 3. Neither the name of the libEtPan! project nor the names of its | ||
16 | * contributors may be used to endorse or promote products derived | ||
17 | * from this software without specific prior written permission. | ||
18 | * | ||
19 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
29 | * SUCH DAMAGE. | ||
30 | */ | ||
31 | |||
32 | /* | ||
33 | * $Id$ | ||
34 | */ | ||
35 | |||
36 | #ifndef IMAPDRIVER_TOOLS_H | ||
37 | |||
38 | #define IMAPDRIVER_TOOLS_H | ||
39 | |||
40 | #include "mailimap.h" | ||
41 | #include "mailmime.h" | ||
42 | #include "imapdriver_types.h" | ||
43 | #include "mail_cache_db.h" | ||
44 | |||
45 | #ifdef __cplusplus | ||
46 | extern "C" { | ||
47 | #endif | ||
48 | |||
49 | int imap_list_to_list(clist * imap_list, struct mail_list ** result); | ||
50 | |||
51 | int | ||
52 | section_to_imap_section(struct mailmime_section * section, int type, | ||
53 | struct mailimap_section ** result); | ||
54 | |||
55 | int imap_get_msg_att_info(struct mailimap_msg_att * msg_att, | ||
56 | uint32_t * puid, | ||
57 | struct mailimap_envelope ** pimap_envelope, | ||
58 | char ** preferences, | ||
59 | size_t * pref_size, | ||
60 | struct mailimap_msg_att_dynamic ** patt_dyn, | ||
61 | struct mailimap_body ** pimap_body); | ||
62 | |||
63 | int imap_add_envelope_fetch_att(struct mailimap_fetch_type * fetch_type); | ||
64 | |||
65 | int imap_env_to_fields(struct mailimap_envelope * env, | ||
66 | char * ref_str, size_t ref_size, | ||
67 | struct mailimf_fields ** result); | ||
68 | |||
69 | int | ||
70 | imap_fetch_result_to_envelop_list(clist * fetch_result, | ||
71 | struct mailmessage_list * env_list); | ||
72 | |||
73 | int imap_body_to_body(struct mailimap_body * imap_body, | ||
74 | struct mailmime ** result); | ||
75 | |||
76 | #if 0 | ||
77 | int mail_search_to_imap_search(struct mail_search_key * key, | ||
78 | struct mailimap_search_key ** result); | ||
79 | #endif | ||
80 | |||
81 | int msg_list_to_imap_set(clist * msg_list, | ||
82 | struct mailimap_set ** result); | ||
83 | |||
84 | int imap_error_to_mail_error(int error); | ||
85 | |||
86 | int imap_store_flags(mailimap * imap, uint32_t first, uint32_t last, | ||
87 | struct mail_flags * flags); | ||
88 | |||
89 | int imap_fetch_flags(mailimap * imap, | ||
90 | uint32_t index, struct mail_flags ** result); | ||
91 | |||
92 | int imap_get_messages_list(mailimap * imap, | ||
93 | mailsession * session, mailmessage_driver * driver, | ||
94 | uint32_t first_index, | ||
95 | struct mailmessage_list ** result); | ||
96 | |||
97 | int | ||
98 | imapdriver_get_cached_envelope(struct mail_cache_db * cache_db, | ||
99 | MMAPString * mmapstr, | ||
100 | mailsession * session, mailmessage * msg, | ||
101 | struct mailimf_fields ** result); | ||
102 | |||
103 | int | ||
104 | imapdriver_write_cached_envelope(struct mail_cache_db * cache_db, | ||
105 | MMAPString * mmapstr, | ||
106 | mailsession * session, mailmessage * msg, | ||
107 | struct mailimf_fields * fields); | ||
108 | |||
109 | #ifdef __cplusplus | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | #endif | ||