author | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
commit | e3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff) | |
tree | 162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/libetpan/mime/mailmime_types_helper.h | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2 |
Initial revision
Diffstat (limited to 'kmicromail/libetpan/mime/mailmime_types_helper.h') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libetpan/mime/mailmime_types_helper.h | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/kmicromail/libetpan/mime/mailmime_types_helper.h b/kmicromail/libetpan/mime/mailmime_types_helper.h new file mode 100644 index 0000000..608acca --- a/dev/null +++ b/kmicromail/libetpan/mime/mailmime_types_helper.h | |||
@@ -0,0 +1,165 @@ | |||
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 MAILMIME_TYPES_HELPER_H | ||
37 | |||
38 | #define MAILMIME_TYPES_HELPER_H | ||
39 | |||
40 | #ifdef __cplusplus | ||
41 | extern "C" { | ||
42 | #endif | ||
43 | |||
44 | #include <libetpan/mailmime_types.h> | ||
45 | |||
46 | int mailmime_transfer_encoding_get(struct mailmime_fields * fields); | ||
47 | |||
48 | struct mailmime_disposition * | ||
49 | mailmime_disposition_new_filename(int type, char * filename); | ||
50 | |||
51 | struct mailmime_fields * mailmime_fields_new_empty(void); | ||
52 | |||
53 | int mailmime_fields_add(struct mailmime_fields * fields, | ||
54 | struct mailmime_field * field); | ||
55 | |||
56 | struct mailmime_fields * | ||
57 | mailmime_fields_new_with_data(struct mailmime_mechanism * encoding, | ||
58 | char * id, | ||
59 | char * description, | ||
60 | struct mailmime_disposition * disposition, | ||
61 | struct mailmime_language * language); | ||
62 | |||
63 | struct mailmime_fields * | ||
64 | mailmime_fields_new_with_version(struct mailmime_mechanism * encoding, | ||
65 | char * id, | ||
66 | char * description, | ||
67 | struct mailmime_disposition * disposition, | ||
68 | struct mailmime_language * language); | ||
69 | |||
70 | struct mailmime_content * mailmime_get_content_message(void); | ||
71 | struct mailmime_content * mailmime_get_content_text(void); | ||
72 | /* struct mailmime_content * mailmime_get_content(char * mime_type); */ | ||
73 | |||
74 | #define mailmime_get_content mailmime_content_new_with_str | ||
75 | |||
76 | struct mailmime_data * | ||
77 | mailmime_data_new_data(int encoding, int encoded, | ||
78 | const char * data, size_t length); | ||
79 | |||
80 | struct mailmime_data * | ||
81 | mailmime_data_new_file(int encoding, int encoded, | ||
82 | char * filename); | ||
83 | |||
84 | #if 0 | ||
85 | struct mailmime * | ||
86 | mailmime_new_message_file(char * filename); | ||
87 | |||
88 | struct mailmime * | ||
89 | mailmime_new_message_text(char * data_str, size_t length); | ||
90 | #endif | ||
91 | |||
92 | struct mailmime * | ||
93 | mailmime_new_message_data(struct mailmime * msg_mime); | ||
94 | |||
95 | struct mailmime * | ||
96 | mailmime_new_empty(struct mailmime_content * content, | ||
97 | struct mailmime_fields * mime_fields); | ||
98 | |||
99 | int | ||
100 | mailmime_new_with_content(const char * content_type, | ||
101 | struct mailmime_fields * mime_fields, | ||
102 | struct mailmime ** result); | ||
103 | |||
104 | int mailmime_set_preamble_file(struct mailmime * build_info, | ||
105 | char * filename); | ||
106 | |||
107 | int mailmime_set_epilogue_file(struct mailmime * build_info, | ||
108 | char * filename); | ||
109 | |||
110 | int mailmime_set_preamble_text(struct mailmime * build_info, | ||
111 | char * data_str, size_t length); | ||
112 | |||
113 | int mailmime_set_epilogue_text(struct mailmime * build_info, | ||
114 | char * data_str, size_t length); | ||
115 | |||
116 | int mailmime_set_body_file(struct mailmime * build_info, | ||
117 | char * filename); | ||
118 | |||
119 | int mailmime_set_body_text(struct mailmime * build_info, | ||
120 | char * data_str, size_t length); | ||
121 | |||
122 | int mailmime_add_part(struct mailmime * build_info, | ||
123 | struct mailmime * part); | ||
124 | |||
125 | void mailmime_remove_part(struct mailmime * mime); | ||
126 | |||
127 | void mailmime_set_imf_fields(struct mailmime * build_info, | ||
128 | struct mailimf_fields * fields); | ||
129 | |||
130 | |||
131 | struct mailmime_disposition * | ||
132 | mailmime_disposition_new_with_data(int type, | ||
133 | char * filename, char * creation_date, char * modification_date, | ||
134 | char * read_date, size_t size); | ||
135 | |||
136 | void mailmime_single_fields_init(struct mailmime_single_fields * single_fields, | ||
137 | struct mailmime_fields * fld_fields, | ||
138 | struct mailmime_content * fld_content); | ||
139 | |||
140 | struct mailmime_single_fields * | ||
141 | mailmime_single_fields_new(struct mailmime_fields * fld_fields, | ||
142 | struct mailmime_content * fld_content); | ||
143 | |||
144 | void mailmime_single_fields_free(struct mailmime_single_fields * | ||
145 | single_fields); | ||
146 | |||
147 | int mailmime_smart_add_part(struct mailmime * mime, | ||
148 | struct mailmime * mime_sub); | ||
149 | |||
150 | int mailmime_smart_remove_part(struct mailmime * mime); | ||
151 | |||
152 | struct mailmime_content * mailmime_content_new_with_str(const char * str); | ||
153 | |||
154 | struct mailmime_fields * mailmime_fields_new_encoding(int type); | ||
155 | |||
156 | struct mailmime * mailmime_multiple_new(const char * type); | ||
157 | |||
158 | struct mailmime_fields * mailmime_fields_new_filename(int dsp_type, | ||
159 | char * filename, int encoding_type); | ||
160 | |||
161 | #ifdef __cplusplus | ||
162 | } | ||
163 | #endif | ||
164 | |||
165 | #endif | ||