xref: /PHP-8.3/ext/imap/php_imap_arginfo.h (revision cc9ab533)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 45b8472a0d18e596a427daf14edbe1ec46bd06ef */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAP\\Connection, MAY_BE_FALSE)
5 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
6 	ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0)
7 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
8 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
10 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
11 ZEND_END_ARG_INFO()
12 
13 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_reopen, 0, 2, _IS_BOOL, 0)
14 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
15 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
16 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
17 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
18 ZEND_END_ARG_INFO()
19 
20 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_close, 0, 1, IS_TRUE, 0)
21 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
22 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
23 ZEND_END_ARG_INFO()
24 
25 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_is_open, 0, 1, _IS_BOOL, 0)
26 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
27 ZEND_END_ARG_INFO()
28 
29 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
30 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
31 ZEND_END_ARG_INFO()
32 
33 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_num_recent, 0, 1, IS_LONG, 0)
34 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
35 ZEND_END_ARG_INFO()
36 
37 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
38 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
39 ZEND_END_ARG_INFO()
40 
41 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdClass, MAY_BE_FALSE)
42 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
43 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
44 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_length, IS_LONG, 0, "0")
45 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subject_length, IS_LONG, 0, "0")
46 ZEND_END_ARG_INFO()
47 
48 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0)
49 	ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
50 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_hostname, IS_STRING, 0, "\"UNKNOWN\"")
51 ZEND_END_ARG_INFO()
52 
53 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_rfc822_write_address, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
54 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
55 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
56 	ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
57 ZEND_END_ARG_INFO()
58 
59 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_rfc822_parse_adrlist, 0, 2, IS_ARRAY, 0)
60 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
61 	ZEND_ARG_TYPE_INFO(0, default_hostname, IS_STRING, 0)
62 ZEND_END_ARG_INFO()
63 
64 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
65 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
66 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
67 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
68 ZEND_END_ARG_INFO()
69 
70 #define arginfo_imap_fetchtext arginfo_imap_body
71 
72 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_bodystruct, 0, 3, stdClass, MAY_BE_FALSE)
73 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
74 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
75 	ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
76 ZEND_END_ARG_INFO()
77 
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetchbody, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
79 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
80 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
81 	ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
82 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
83 ZEND_END_ARG_INFO()
84 
85 #define arginfo_imap_fetchmime arginfo_imap_fetchbody
86 
87 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_savebody, 0, 3, _IS_BOOL, 0)
88 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
89 	ZEND_ARG_INFO(0, file)
90 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
91 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, section, IS_STRING, 0, "\"\"")
92 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
93 ZEND_END_ARG_INFO()
94 
95 #define arginfo_imap_fetchheader arginfo_imap_body
96 
97 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_fetchstructure, 0, 2, stdClass, MAY_BE_FALSE)
98 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
99 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
100 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
101 ZEND_END_ARG_INFO()
102 
103 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_gc, 0, 2, IS_TRUE, 0)
104 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
105 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
106 ZEND_END_ARG_INFO()
107 
108 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_expunge, 0, 1, IS_TRUE, 0)
109 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
110 ZEND_END_ARG_INFO()
111 
112 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_delete, 0, 2, IS_TRUE, 0)
113 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
114 	ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
115 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
116 ZEND_END_ARG_INFO()
117 
118 #define arginfo_imap_undelete arginfo_imap_delete
119 
120 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_check, 0, 1, stdClass, MAY_BE_FALSE)
121 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
122 ZEND_END_ARG_INFO()
123 
124 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRAY|MAY_BE_FALSE)
125 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
126 	ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
127 	ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
128 	ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
129 ZEND_END_ARG_INFO()
130 
131 #define arginfo_imap_scan arginfo_imap_listscan
132 
133 #define arginfo_imap_scanmailbox arginfo_imap_listscan
134 
135 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, 0)
136 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
137 	ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
138 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
139 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
140 ZEND_END_ARG_INFO()
141 
142 #define arginfo_imap_mail_move arginfo_imap_mail_copy
143 
144 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
145 	ZEND_ARG_TYPE_INFO(0, envelope, IS_ARRAY, 0)
146 	ZEND_ARG_TYPE_INFO(0, bodies, IS_ARRAY, 0)
147 ZEND_END_ARG_INFO()
148 
149 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_createmailbox, 0, 2, _IS_BOOL, 0)
150 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
151 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
152 ZEND_END_ARG_INFO()
153 
154 #define arginfo_imap_create arginfo_imap_createmailbox
155 
156 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_renamemailbox, 0, 3, _IS_BOOL, 0)
157 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
158 	ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0)
159 	ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
160 ZEND_END_ARG_INFO()
161 
162 #define arginfo_imap_rename arginfo_imap_renamemailbox
163 
164 #define arginfo_imap_deletemailbox arginfo_imap_createmailbox
165 
166 #define arginfo_imap_subscribe arginfo_imap_createmailbox
167 
168 #define arginfo_imap_unsubscribe arginfo_imap_createmailbox
169 
170 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_append, 0, 3, _IS_BOOL, 0)
171 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
172 	ZEND_ARG_TYPE_INFO(0, folder, IS_STRING, 0)
173 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
174 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null")
175 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, internal_date, IS_STRING, 1, "null")
176 ZEND_END_ARG_INFO()
177 
178 #define arginfo_imap_ping arginfo_imap_is_open
179 
180 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_base64, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
181 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
182 ZEND_END_ARG_INFO()
183 
184 #define arginfo_imap_qprint arginfo_imap_base64
185 
186 #define arginfo_imap_8bit arginfo_imap_base64
187 
188 #define arginfo_imap_binary arginfo_imap_base64
189 
190 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf8, 0, 1, IS_STRING, 0)
191 	ZEND_ARG_TYPE_INFO(0, mime_encoded_text, IS_STRING, 0)
192 ZEND_END_ARG_INFO()
193 
194 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_status, 0, 3, stdClass, MAY_BE_FALSE)
195 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
196 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
197 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
198 ZEND_END_ARG_INFO()
199 
200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_mailboxmsginfo, 0, 1, stdClass, 0)
201 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
202 ZEND_END_ARG_INFO()
203 
204 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setflag_full, 0, 3, IS_TRUE, 0)
205 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
206 	ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
207 	ZEND_ARG_TYPE_INFO(0, flag, IS_STRING, 0)
208 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
209 ZEND_END_ARG_INFO()
210 
211 #define arginfo_imap_clearflag_full arginfo_imap_setflag_full
212 
213 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
214 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
215 	ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0)
216 	ZEND_ARG_TYPE_INFO(0, reverse, _IS_BOOL, 0)
217 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
218 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, search_criteria, IS_STRING, 1, "null")
219 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
220 ZEND_END_ARG_INFO()
221 
222 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
223 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
224 	ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
225 ZEND_END_ARG_INFO()
226 
227 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_msgno, 0, 2, IS_LONG, 0)
228 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
229 	ZEND_ARG_TYPE_INFO(0, message_uid, IS_LONG, 0)
230 ZEND_END_ARG_INFO()
231 
232 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
233 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
234 	ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
235 	ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
236 ZEND_END_ARG_INFO()
237 
238 #define arginfo_imap_listmailbox arginfo_imap_list
239 
240 #define arginfo_imap_lsub arginfo_imap_list
241 
242 #define arginfo_imap_listsubscribed arginfo_imap_list
243 
244 #define arginfo_imap_getsubscribed arginfo_imap_list
245 
246 #define arginfo_imap_getmailboxes arginfo_imap_list
247 
248 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetch_overview, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
249 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
250 	ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
251 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
252 ZEND_END_ARG_INFO()
253 
254 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_alerts, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
255 ZEND_END_ARG_INFO()
256 
257 #define arginfo_imap_errors arginfo_imap_alerts
258 
259 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_last_error, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
260 ZEND_END_ARG_INFO()
261 
262 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_search, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
263 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
264 	ZEND_ARG_TYPE_INFO(0, criteria, IS_STRING, 0)
265 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
266 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 0, "\"\"")
267 ZEND_END_ARG_INFO()
268 
269 #define arginfo_imap_utf7_decode arginfo_imap_base64
270 
271 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf7_encode, 0, 1, IS_STRING, 0)
272 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
273 ZEND_END_ARG_INFO()
274 
275 #if defined(HAVE_IMAP_MUTF7)
276 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf8_to_mutf7, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
277 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
278 ZEND_END_ARG_INFO()
279 #endif
280 
281 #if defined(HAVE_IMAP_MUTF7)
282 #define arginfo_imap_mutf7_to_utf8 arginfo_imap_utf8_to_mutf7
283 #endif
284 
285 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mime_header_decode, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
286 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
287 ZEND_END_ARG_INFO()
288 
289 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_thread, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
290 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
291 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
292 ZEND_END_ARG_INFO()
293 
294 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_timeout, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
295 	ZEND_ARG_TYPE_INFO(0, timeout_type, IS_LONG, 0)
296 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
297 ZEND_END_ARG_INFO()
298 
299 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
300 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quota, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
301 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
302 	ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
303 ZEND_END_ARG_INFO()
304 #endif
305 
306 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
307 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quotaroot, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
308 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
309 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
310 ZEND_END_ARG_INFO()
311 #endif
312 
313 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
314 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_set_quota, 0, 3, _IS_BOOL, 0)
315 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
316 	ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
317 	ZEND_ARG_TYPE_INFO(0, mailbox_size, IS_LONG, 0)
318 ZEND_END_ARG_INFO()
319 #endif
320 
321 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
322 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setacl, 0, 4, _IS_BOOL, 0)
323 	ZEND_ARG_OBJ_INFO(0, imap, IMAP\\Connection, 0)
324 	ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
325 	ZEND_ARG_TYPE_INFO(0, user_id, IS_STRING, 0)
326 	ZEND_ARG_TYPE_INFO(0, rights, IS_STRING, 0)
327 ZEND_END_ARG_INFO()
328 #endif
329 
330 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
331 #define arginfo_imap_getacl arginfo_imap_get_quotaroot
332 #endif
333 
334 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0)
335 	ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
336 	ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
337 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
338 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_headers, IS_STRING, 1, "null")
339 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cc, IS_STRING, 1, "null")
340 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bcc, IS_STRING, 1, "null")
341 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_path, IS_STRING, 1, "null")
342 ZEND_END_ARG_INFO()
343 
344 
345 ZEND_FUNCTION(imap_open);
346 ZEND_FUNCTION(imap_reopen);
347 ZEND_FUNCTION(imap_close);
348 ZEND_FUNCTION(imap_is_open);
349 ZEND_FUNCTION(imap_num_msg);
350 ZEND_FUNCTION(imap_num_recent);
351 ZEND_FUNCTION(imap_headers);
352 ZEND_FUNCTION(imap_headerinfo);
353 ZEND_FUNCTION(imap_rfc822_parse_headers);
354 ZEND_FUNCTION(imap_rfc822_write_address);
355 ZEND_FUNCTION(imap_rfc822_parse_adrlist);
356 ZEND_FUNCTION(imap_body);
357 ZEND_FUNCTION(imap_bodystruct);
358 ZEND_FUNCTION(imap_fetchbody);
359 ZEND_FUNCTION(imap_fetchmime);
360 ZEND_FUNCTION(imap_savebody);
361 ZEND_FUNCTION(imap_fetchheader);
362 ZEND_FUNCTION(imap_fetchstructure);
363 ZEND_FUNCTION(imap_gc);
364 ZEND_FUNCTION(imap_expunge);
365 ZEND_FUNCTION(imap_delete);
366 ZEND_FUNCTION(imap_undelete);
367 ZEND_FUNCTION(imap_check);
368 ZEND_FUNCTION(imap_listscan);
369 ZEND_FUNCTION(imap_mail_copy);
370 ZEND_FUNCTION(imap_mail_move);
371 ZEND_FUNCTION(imap_mail_compose);
372 ZEND_FUNCTION(imap_createmailbox);
373 ZEND_FUNCTION(imap_renamemailbox);
374 ZEND_FUNCTION(imap_deletemailbox);
375 ZEND_FUNCTION(imap_subscribe);
376 ZEND_FUNCTION(imap_unsubscribe);
377 ZEND_FUNCTION(imap_append);
378 ZEND_FUNCTION(imap_ping);
379 ZEND_FUNCTION(imap_base64);
380 ZEND_FUNCTION(imap_qprint);
381 ZEND_FUNCTION(imap_8bit);
382 ZEND_FUNCTION(imap_binary);
383 ZEND_FUNCTION(imap_utf8);
384 ZEND_FUNCTION(imap_status);
385 ZEND_FUNCTION(imap_mailboxmsginfo);
386 ZEND_FUNCTION(imap_setflag_full);
387 ZEND_FUNCTION(imap_clearflag_full);
388 ZEND_FUNCTION(imap_sort);
389 ZEND_FUNCTION(imap_uid);
390 ZEND_FUNCTION(imap_msgno);
391 ZEND_FUNCTION(imap_list);
392 ZEND_FUNCTION(imap_lsub);
393 ZEND_FUNCTION(imap_getsubscribed);
394 ZEND_FUNCTION(imap_getmailboxes);
395 ZEND_FUNCTION(imap_fetch_overview);
396 ZEND_FUNCTION(imap_alerts);
397 ZEND_FUNCTION(imap_errors);
398 ZEND_FUNCTION(imap_last_error);
399 ZEND_FUNCTION(imap_search);
400 ZEND_FUNCTION(imap_utf7_decode);
401 ZEND_FUNCTION(imap_utf7_encode);
402 #if defined(HAVE_IMAP_MUTF7)
403 ZEND_FUNCTION(imap_utf8_to_mutf7);
404 #endif
405 #if defined(HAVE_IMAP_MUTF7)
406 ZEND_FUNCTION(imap_mutf7_to_utf8);
407 #endif
408 ZEND_FUNCTION(imap_mime_header_decode);
409 ZEND_FUNCTION(imap_thread);
410 ZEND_FUNCTION(imap_timeout);
411 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
412 ZEND_FUNCTION(imap_get_quota);
413 #endif
414 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
415 ZEND_FUNCTION(imap_get_quotaroot);
416 #endif
417 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
418 ZEND_FUNCTION(imap_set_quota);
419 #endif
420 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
421 ZEND_FUNCTION(imap_setacl);
422 #endif
423 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
424 ZEND_FUNCTION(imap_getacl);
425 #endif
426 ZEND_FUNCTION(imap_mail);
427 
428 
429 static const zend_function_entry ext_functions[] = {
430 	ZEND_FE(imap_open, arginfo_imap_open)
431 	ZEND_FE(imap_reopen, arginfo_imap_reopen)
432 	ZEND_FE(imap_close, arginfo_imap_close)
433 	ZEND_FE(imap_is_open, arginfo_imap_is_open)
434 	ZEND_FE(imap_num_msg, arginfo_imap_num_msg)
435 	ZEND_FE(imap_num_recent, arginfo_imap_num_recent)
436 	ZEND_FE(imap_headers, arginfo_imap_headers)
437 	ZEND_FE(imap_headerinfo, arginfo_imap_headerinfo)
438 	ZEND_FE(imap_rfc822_parse_headers, arginfo_imap_rfc822_parse_headers)
439 	ZEND_FE(imap_rfc822_write_address, arginfo_imap_rfc822_write_address)
440 	ZEND_FE(imap_rfc822_parse_adrlist, arginfo_imap_rfc822_parse_adrlist)
441 	ZEND_FE(imap_body, arginfo_imap_body)
442 	ZEND_FALIAS(imap_fetchtext, imap_body, arginfo_imap_fetchtext)
443 	ZEND_FE(imap_bodystruct, arginfo_imap_bodystruct)
444 	ZEND_FE(imap_fetchbody, arginfo_imap_fetchbody)
445 	ZEND_FE(imap_fetchmime, arginfo_imap_fetchmime)
446 	ZEND_FE(imap_savebody, arginfo_imap_savebody)
447 	ZEND_FE(imap_fetchheader, arginfo_imap_fetchheader)
448 	ZEND_FE(imap_fetchstructure, arginfo_imap_fetchstructure)
449 	ZEND_FE(imap_gc, arginfo_imap_gc)
450 	ZEND_FE(imap_expunge, arginfo_imap_expunge)
451 	ZEND_FE(imap_delete, arginfo_imap_delete)
452 	ZEND_FE(imap_undelete, arginfo_imap_undelete)
453 	ZEND_FE(imap_check, arginfo_imap_check)
454 	ZEND_FE(imap_listscan, arginfo_imap_listscan)
455 	ZEND_FALIAS(imap_scan, imap_listscan, arginfo_imap_scan)
456 	ZEND_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_scanmailbox)
457 	ZEND_FE(imap_mail_copy, arginfo_imap_mail_copy)
458 	ZEND_FE(imap_mail_move, arginfo_imap_mail_move)
459 	ZEND_FE(imap_mail_compose, arginfo_imap_mail_compose)
460 	ZEND_FE(imap_createmailbox, arginfo_imap_createmailbox)
461 	ZEND_FALIAS(imap_create, imap_createmailbox, arginfo_imap_create)
462 	ZEND_FE(imap_renamemailbox, arginfo_imap_renamemailbox)
463 	ZEND_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_rename)
464 	ZEND_FE(imap_deletemailbox, arginfo_imap_deletemailbox)
465 	ZEND_FE(imap_subscribe, arginfo_imap_subscribe)
466 	ZEND_FE(imap_unsubscribe, arginfo_imap_unsubscribe)
467 	ZEND_FE(imap_append, arginfo_imap_append)
468 	ZEND_FE(imap_ping, arginfo_imap_ping)
469 	ZEND_FE(imap_base64, arginfo_imap_base64)
470 	ZEND_FE(imap_qprint, arginfo_imap_qprint)
471 	ZEND_FE(imap_8bit, arginfo_imap_8bit)
472 	ZEND_FE(imap_binary, arginfo_imap_binary)
473 	ZEND_FE(imap_utf8, arginfo_imap_utf8)
474 	ZEND_FE(imap_status, arginfo_imap_status)
475 	ZEND_FE(imap_mailboxmsginfo, arginfo_imap_mailboxmsginfo)
476 	ZEND_FE(imap_setflag_full, arginfo_imap_setflag_full)
477 	ZEND_FE(imap_clearflag_full, arginfo_imap_clearflag_full)
478 	ZEND_FE(imap_sort, arginfo_imap_sort)
479 	ZEND_FE(imap_uid, arginfo_imap_uid)
480 	ZEND_FE(imap_msgno, arginfo_imap_msgno)
481 	ZEND_FE(imap_list, arginfo_imap_list)
482 	ZEND_FALIAS(imap_listmailbox, imap_list, arginfo_imap_listmailbox)
483 	ZEND_FE(imap_lsub, arginfo_imap_lsub)
484 	ZEND_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_listsubscribed)
485 	ZEND_FE(imap_getsubscribed, arginfo_imap_getsubscribed)
486 	ZEND_FE(imap_getmailboxes, arginfo_imap_getmailboxes)
487 	ZEND_FE(imap_fetch_overview, arginfo_imap_fetch_overview)
488 	ZEND_FE(imap_alerts, arginfo_imap_alerts)
489 	ZEND_FE(imap_errors, arginfo_imap_errors)
490 	ZEND_FE(imap_last_error, arginfo_imap_last_error)
491 	ZEND_FE(imap_search, arginfo_imap_search)
492 	ZEND_FE(imap_utf7_decode, arginfo_imap_utf7_decode)
493 	ZEND_FE(imap_utf7_encode, arginfo_imap_utf7_encode)
494 #if defined(HAVE_IMAP_MUTF7)
495 	ZEND_FE(imap_utf8_to_mutf7, arginfo_imap_utf8_to_mutf7)
496 #endif
497 #if defined(HAVE_IMAP_MUTF7)
498 	ZEND_FE(imap_mutf7_to_utf8, arginfo_imap_mutf7_to_utf8)
499 #endif
500 	ZEND_FE(imap_mime_header_decode, arginfo_imap_mime_header_decode)
501 	ZEND_FE(imap_thread, arginfo_imap_thread)
502 	ZEND_FE(imap_timeout, arginfo_imap_timeout)
503 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
504 	ZEND_FE(imap_get_quota, arginfo_imap_get_quota)
505 #endif
506 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
507 	ZEND_FE(imap_get_quotaroot, arginfo_imap_get_quotaroot)
508 #endif
509 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
510 	ZEND_FE(imap_set_quota, arginfo_imap_set_quota)
511 #endif
512 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
513 	ZEND_FE(imap_setacl, arginfo_imap_setacl)
514 #endif
515 #if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
516 	ZEND_FE(imap_getacl, arginfo_imap_getacl)
517 #endif
518 	ZEND_FE(imap_mail, arginfo_imap_mail)
519 	ZEND_FE_END
520 };
521 
522 
523 static const zend_function_entry class_IMAP_Connection_methods[] = {
524 	ZEND_FE_END
525 };
526 
register_php_imap_symbols(int module_number)527 static void register_php_imap_symbols(int module_number)
528 {
529 	REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_DEPRECATED);
530 	REGISTER_LONG_CONSTANT("IMAP_OPENTIMEOUT", PHP_IMAP_OPENTIMEOUT, CONST_PERSISTENT);
531 	REGISTER_LONG_CONSTANT("IMAP_READTIMEOUT", PHP_IMAP_READTIMEOUT, CONST_PERSISTENT);
532 	REGISTER_LONG_CONSTANT("IMAP_WRITETIMEOUT", PHP_IMAP_WRITETIMEOUT, CONST_PERSISTENT);
533 	REGISTER_LONG_CONSTANT("IMAP_CLOSETIMEOUT", PHP_IMAP_CLOSETIMEOUT, CONST_PERSISTENT);
534 	REGISTER_LONG_CONSTANT("OP_DEBUG", OP_DEBUG, CONST_PERSISTENT);
535 	REGISTER_LONG_CONSTANT("OP_READONLY", OP_READONLY, CONST_PERSISTENT);
536 	REGISTER_LONG_CONSTANT("OP_ANONYMOUS", OP_ANONYMOUS, CONST_PERSISTENT);
537 	REGISTER_LONG_CONSTANT("OP_SHORTCACHE", OP_SHORTCACHE, CONST_PERSISTENT);
538 	REGISTER_LONG_CONSTANT("OP_SILENT", OP_SILENT, CONST_PERSISTENT);
539 	REGISTER_LONG_CONSTANT("OP_PROTOTYPE", OP_PROTOTYPE, CONST_PERSISTENT);
540 	REGISTER_LONG_CONSTANT("OP_HALFOPEN", OP_HALFOPEN, CONST_PERSISTENT);
541 	REGISTER_LONG_CONSTANT("OP_EXPUNGE", OP_EXPUNGE, CONST_PERSISTENT);
542 	REGISTER_LONG_CONSTANT("OP_SECURE", OP_SECURE, CONST_PERSISTENT);
543 	REGISTER_LONG_CONSTANT("CL_EXPUNGE", PHP_EXPUNGE, CONST_PERSISTENT);
544 	REGISTER_LONG_CONSTANT("FT_UID", FT_UID, CONST_PERSISTENT);
545 	REGISTER_LONG_CONSTANT("FT_PEEK", FT_PEEK, CONST_PERSISTENT);
546 	REGISTER_LONG_CONSTANT("FT_NOT", FT_NOT, CONST_PERSISTENT);
547 	REGISTER_LONG_CONSTANT("FT_INTERNAL", FT_INTERNAL, CONST_PERSISTENT);
548 	REGISTER_LONG_CONSTANT("FT_PREFETCHTEXT", FT_PREFETCHTEXT, CONST_PERSISTENT);
549 	REGISTER_LONG_CONSTANT("ST_UID", ST_UID, CONST_PERSISTENT);
550 	REGISTER_LONG_CONSTANT("ST_SILENT", ST_SILENT, CONST_PERSISTENT);
551 	REGISTER_LONG_CONSTANT("ST_SET", ST_SET, CONST_PERSISTENT);
552 	REGISTER_LONG_CONSTANT("CP_UID", CP_UID, CONST_PERSISTENT);
553 	REGISTER_LONG_CONSTANT("CP_MOVE", CP_MOVE, CONST_PERSISTENT);
554 	REGISTER_LONG_CONSTANT("SE_UID", SE_UID, CONST_PERSISTENT);
555 	REGISTER_LONG_CONSTANT("SE_FREE", SE_FREE, CONST_PERSISTENT);
556 	REGISTER_LONG_CONSTANT("SE_NOPREFETCH", SE_NOPREFETCH, CONST_PERSISTENT);
557 	REGISTER_LONG_CONSTANT("SO_FREE", SO_FREE, CONST_PERSISTENT);
558 	REGISTER_LONG_CONSTANT("SO_NOSERVER", SO_FREE, CONST_PERSISTENT);
559 	REGISTER_LONG_CONSTANT("SA_MESSAGES", SA_MESSAGES, CONST_PERSISTENT);
560 	REGISTER_LONG_CONSTANT("SA_RECENT", SA_RECENT, CONST_PERSISTENT);
561 	REGISTER_LONG_CONSTANT("SA_UNSEEN", SA_UNSEEN, CONST_PERSISTENT);
562 	REGISTER_LONG_CONSTANT("SA_UIDNEXT", SA_UIDNEXT, CONST_PERSISTENT);
563 	REGISTER_LONG_CONSTANT("SA_UIDVALIDITY", SA_UIDVALIDITY, CONST_PERSISTENT);
564 	REGISTER_LONG_CONSTANT("SA_ALL", SA_ALL, CONST_PERSISTENT);
565 	REGISTER_LONG_CONSTANT("LATT_NOINFERIORS", LATT_NOINFERIORS, CONST_PERSISTENT);
566 	REGISTER_LONG_CONSTANT("LATT_NOSELECT", LATT_NOSELECT, CONST_PERSISTENT);
567 	REGISTER_LONG_CONSTANT("LATT_MARKED", LATT_MARKED, CONST_PERSISTENT);
568 	REGISTER_LONG_CONSTANT("LATT_UNMARKED", LATT_UNMARKED, CONST_PERSISTENT);
569 #if defined(LATT_REFERRAL)
570 	REGISTER_LONG_CONSTANT("LATT_REFERRAL", LATT_REFERRAL, CONST_PERSISTENT);
571 #endif
572 #if defined(LATT_HASCHILDREN)
573 	REGISTER_LONG_CONSTANT("LATT_HASCHILDREN", LATT_HASCHILDREN, CONST_PERSISTENT);
574 #endif
575 #if defined(LATT_HASNOCHILDREN)
576 	REGISTER_LONG_CONSTANT("LATT_HASNOCHILDREN", LATT_HASNOCHILDREN, CONST_PERSISTENT);
577 #endif
578 	REGISTER_LONG_CONSTANT("SORTDATE", SORTDATE, CONST_PERSISTENT);
579 	REGISTER_LONG_CONSTANT("SORTARRIVAL", SORTARRIVAL, CONST_PERSISTENT);
580 	REGISTER_LONG_CONSTANT("SORTFROM", SORTFROM, CONST_PERSISTENT);
581 	REGISTER_LONG_CONSTANT("SORTSUBJECT", SORTSUBJECT, CONST_PERSISTENT);
582 	REGISTER_LONG_CONSTANT("SORTTO", SORTTO, CONST_PERSISTENT);
583 	REGISTER_LONG_CONSTANT("SORTCC", SORTCC, CONST_PERSISTENT);
584 	REGISTER_LONG_CONSTANT("SORTSIZE", SORTSIZE, CONST_PERSISTENT);
585 	REGISTER_LONG_CONSTANT("TYPETEXT", TYPETEXT, CONST_PERSISTENT);
586 	REGISTER_LONG_CONSTANT("TYPEMULTIPART", TYPEMULTIPART, CONST_PERSISTENT);
587 	REGISTER_LONG_CONSTANT("TYPEMESSAGE", TYPEMESSAGE, CONST_PERSISTENT);
588 	REGISTER_LONG_CONSTANT("TYPEAPPLICATION", TYPEAPPLICATION, CONST_PERSISTENT);
589 	REGISTER_LONG_CONSTANT("TYPEAUDIO", TYPEAUDIO, CONST_PERSISTENT);
590 	REGISTER_LONG_CONSTANT("TYPEIMAGE", TYPEIMAGE, CONST_PERSISTENT);
591 	REGISTER_LONG_CONSTANT("TYPEVIDEO", TYPEVIDEO, CONST_PERSISTENT);
592 	REGISTER_LONG_CONSTANT("TYPEMODEL", TYPEMODEL, CONST_PERSISTENT);
593 	REGISTER_LONG_CONSTANT("TYPEOTHER", TYPEOTHER, CONST_PERSISTENT);
594 	REGISTER_LONG_CONSTANT("ENC7BIT", ENC7BIT, CONST_PERSISTENT);
595 	REGISTER_LONG_CONSTANT("ENC8BIT", ENC8BIT, CONST_PERSISTENT);
596 	REGISTER_LONG_CONSTANT("ENCBINARY", ENCBINARY, CONST_PERSISTENT);
597 	REGISTER_LONG_CONSTANT("ENCBASE64", ENCBASE64, CONST_PERSISTENT);
598 	REGISTER_LONG_CONSTANT("ENCQUOTEDPRINTABLE", ENCQUOTEDPRINTABLE, CONST_PERSISTENT);
599 	REGISTER_LONG_CONSTANT("ENCOTHER", ENCOTHER, CONST_PERSISTENT);
600 	REGISTER_LONG_CONSTANT("IMAP_GC_ELT", GC_ELT, CONST_PERSISTENT);
601 	REGISTER_LONG_CONSTANT("IMAP_GC_ENV", GC_ENV, CONST_PERSISTENT);
602 	REGISTER_LONG_CONSTANT("IMAP_GC_TEXTS", GC_TEXTS, CONST_PERSISTENT);
603 
604 
605 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "imap_open", sizeof("imap_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
606 }
607 
register_class_IMAP_Connection(void)608 static zend_class_entry *register_class_IMAP_Connection(void)
609 {
610 	zend_class_entry ce, *class_entry;
611 
612 	INIT_NS_CLASS_ENTRY(ce, "IMAP", "Connection", class_IMAP_Connection_methods);
613 	class_entry = zend_register_internal_class_ex(&ce, NULL);
614 	class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
615 
616 	return class_entry;
617 }
618