summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.stub.php
blob: ab3a24b54dba9145502cc637dd05f272539c52b1 (plain)
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<?php

/**
 * @return resource|false
 */
function imap_open(string $mailbox, string $user, string $password, int $options = 0, int $n_retries = 0, array $params = UNKNOWN) {}

/**
 * @param resource $stream_id
 */
function imap_reopen($stream_id, string $mailbox, int $options = 0, int $n_retries = 0): bool {}

/**
 * @param resource $stream_id
 */
function imap_close($stream_id, int $options = 0): bool {}

/**
 * @param resource $stream_id
 * @return int|false
 */
function imap_num_msg($stream_id) {}

/**
 * @param resource $stream_id
 * @return int|false
 */
function imap_num_recent($stream_id) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_headers($stream_id) {}

/**
 * @param resource $stream_id
 * @return \stdClass|false
 */
function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN) {}

function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): \stdClass {}

/**
 * @return string|false
 */
function imap_rfc822_write_address(string $mailbox, string $host, string $personal) {}

function imap_rfc822_parse_adrlist(string $address_string, string $default_host): array {}


/**
 * @param resource $stream_id
 * @return string|false
 */
function imap_body($stream_id, int $msg_no, int $options = 0) {}


/**
 * @param resource $stream_id
 * @return \stdClass|false
 */
function imap_bodystruct($stream_id, int $msg_no, string $section) {}

/**
 * @param resource $stream_id
 * @return string|false
 */
function imap_fetchbody($stream_id, int $msg_no, string $section, int $options = 0) {}

/**
 * @param resource $stream_id
 * @return string|false
 */
function imap_fetchmime($stream_id, int $msg_no, string $section, int $options = 0) {}


/**
 * @param resource $stream_id
 * @todo: should $file be `resouce|string`? it looks like it tries to accept anything?
 */
function imap_savebody($stream_id, $file, int $msg_no, string $section = '', int $options = 0): bool {}

/**
 * @param resource $stream_id
 * @return string|false
 */
function imap_fetchheader($stream_id, int $msg_no, int $options = 0) {}

/**
 * @param resource $stream_id
 * @return \stdClass|false
 */
function imap_fetchstructure($stream_id, int $msg_no, int $options = 0) {}

/**
 * @param resource $stream_id
 */
function imap_gc($stream_id, int $flags): bool {}

/**
 * @param resource $stream_id
 */
function imap_expunge($stream_id): bool {}

/**
 * @param resource $stream_id
 */
function imap_delete($stream_id, string $msg_no, int $options = 0): bool {}

/**
 * @param resource $stream_id
 */
function imap_undelete($stream_id, string $msg_no, int $options = 0): bool {}

/**
 * @param resource $stream_id
 * @return \stdClass|false
 */
function imap_check($stream_id) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_listscan($stream_id, string $ref, string $pattern, string $content) {}

/**
 * @param resource $stream_id
 */
function imap_mail_copy($stream_id, string $msglist, string $mailbox, int $options = 0): bool {}

/**
 * @param resource $stream_id
 */
function imap_mail_move($stream_id, string $sequence, string $mailbox, int $options = 0): bool {}

/**
 * @return string|false
 */
function imap_mail_compose(array $envelope, array $body) {}

/**
 * @param resource $stream_id
 */
function imap_createmailbox($stream_id, string $mailbox): bool {}

/**
 * @param resource $stream_id
 */
function imap_renamemailbox($stream_id, string $old_name, string $new_name): bool {}

/**
 * @param resource $stream_id
 */
function imap_deletemailbox($stream_id, string $mailbox): bool {}

/**
 * @param resource $stream_id
 */
function imap_subscribe($stream_id, string $mailbox): bool {}

/**
 * @param resource $stream_id
 */
function imap_unsubscribe($stream_id, string $mailbox): bool {}

/**
 * @param resource $stream_id
 */
function imap_append($stream_id, string $folder, string $message, string $options = UNKNOWN, string $internal_date = UNKNOWN): bool {}

/**
 * @param resource $stream_id
 */
function imap_ping($stream_id): bool {}

/**
 * @return string|false
 */
function imap_base64(string $text) {}

/**
 * @return string|false
 */
function imap_qprint(string $text) {}

/**
 * @return string|false
 */
function imap_8bit(string $text) {}

/**
 * @return string|false
 */
function imap_binary(string $text) {}


function imap_utf8(string $mime_encoded_text): string {}

/**
 * @param resource $stream_id
 * @return \stdClass|false
 */
function imap_status($stream_id, string $mailbox, int $options) {}

/**
 * @param resource $stream_id
 */
function imap_mailboxmsginfo($stream_id): \stdClass {}

/**
 * @param resource $stream_id
 */
function imap_setflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}

/**
 * @param resource $stream_id
 */
function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN) {}


/**
 * @param resource $stream_id
 * @return int|false
 */
function imap_uid($stream_id, int $msg_no) {}

/**
 * @param resource $stream_id
 * @return int|false
 */
function imap_msgno($stream_id, int $unique_msg_id) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_list($stream_id, string $ref, string $pattern) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_lsub($stream_id, string $ref, string $pattern) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_getsubscribed($stream_id, string $ref, string $pattern) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_getmailboxes($stream_id, string $ref, string $pattern) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_fetch_overview($stream_id, string $sequence, int $options = 0) {}

/**
 * @return array|false
 */
function imap_alerts() {}

/**
 * @return array|false
 */
function imap_errors() {}

/**
 * @return string|false
 */
function imap_last_error() {}


/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_search($stream_id, string $criteria, int $options = \SE_FREE, string $charset = '') {}

/**
 * @return string|false
 */
function imap_utf7_decode(string $buf) {}

function imap_utf7_encode(string $buf): string {}

#ifdef HAVE_IMAP_MUTF7
/**
 * @return string|false
 */
function imap_utf8_to_mutf7(string $in) {}

/**
 * @return string|false
 */
function imap_mutf7_to_utf8(string $in) {}
#endif

/**
 * @return array|false
 */
function imap_mime_header_decode(string $str) {}


/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_thread($stream_id, int $options = \SE_FREE) {}

/**
 * @return int|bool
 */
function imap_timeout(int $timeout_type, int $timeout = -1) {}

#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_get_quota($stream_id, string $qroot) {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_get_quotaroot($stream_id, string $mbox) {}

/**
 * @param resource $stream_id
 */
function imap_set_quota($stream_id, string $qroot, int $mailbox_size): bool {}

/**
 * @param resource $stream_id
 */
function imap_setacl($stream_id, string $mailbox, string $id, string $rights): bool {}

/**
 * @param resource $stream_id
 * @return array|false
 */
function imap_getacl($stream_id, string $mailbox) {}
#endif

function imap_mail(string $to, string $subject, string $message, string $additional_headers = UNKNOWN, string $cc = UNKNOWN, string $bcc = UNKNOWN, string $rpath = UNKNOWN): bool {}