2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2013 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
15 | Authors: Rex Logan <veebert@dimensional.com> |
16 | Mark Musone <musone@afterfive.com> |
17 | Brian Wang <brian@vividnet.com> |
18 | Kaj-Michael Lang <milang@tal.org> |
19 | Antoni Pamies Olive <toni@readysoft.net> |
20 | Rasmus Lerdorf <rasmus@php.net> |
21 | Chuck Hagenbuch <chuck@horde.org> |
22 | Andrew Skalski <askalski@chekinc.com> |
23 | Hartmut Holzgraefe <hholzgra@php.net> |
24 | Jani Taskinen <sniper@iki.fi> |
25 | Daniel R. Kalowsky <kalowsky@php.net> |
26 | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
27 +----------------------------------------------------------------------+
37 #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
38 /* these are used for quota support */
39 # include "c-client.h" /* includes mail.h and rfc822.h */
40 # include "imap4r1.h" /* location of c-client quota functions */
46 extern zend_module_entry imap_module_entry
;
47 #define imap_module_ptr &imap_module_entry
53 #define LSIZE text.size
54 #define LTEXT text.data
56 #define CONTENT_PART nested.part
57 #define CONTENT_MSG_BODY nested.msg->body
58 #define IMAPVER "Imap 4R1"
63 #define CONTENT_PART contents.part
64 #define CONTENT_MSG_BODY contents.msg.body
65 #define IMAPVER "Imap 4"
69 /* Determines how mm_list() and mm_lsub() are to return their results. */
75 typedef struct php_imap_le_struct
{
76 MAILSTREAM
*imap_stream
;
80 typedef struct php_imap_mailbox_struct
{
84 struct php_imap_mailbox_struct
*next
;
87 typedef struct php_imap_error_struct
{
90 struct php_imap_error_struct
*next
;
93 typedef struct _php_imap_message_struct
{
95 struct _php_imap_message_struct
*next
;
101 PHP_MINIT_FUNCTION(imap
);
102 PHP_RINIT_FUNCTION(imap
);
103 PHP_RSHUTDOWN_FUNCTION(imap
);
104 PHP_MINFO_FUNCTION(imap
);
106 PHP_FUNCTION(imap_open
);
107 PHP_FUNCTION(imap_popen
);
108 PHP_FUNCTION(imap_reopen
);
109 PHP_FUNCTION(imap_num_msg
);
110 PHP_FUNCTION(imap_num_recent
);
111 PHP_FUNCTION(imap_headers
);
112 PHP_FUNCTION(imap_headerinfo
);
113 PHP_FUNCTION(imap_rfc822_parse_headers
);
114 PHP_FUNCTION(imap_body
);
115 PHP_FUNCTION(imap_fetchstructure
);
116 PHP_FUNCTION(imap_fetchbody
);
117 PHP_FUNCTION(imap_fetchmime
);
118 PHP_FUNCTION(imap_savebody
);
119 PHP_FUNCTION(imap_gc
);
120 PHP_FUNCTION(imap_expunge
);
121 PHP_FUNCTION(imap_delete
);
122 PHP_FUNCTION(imap_undelete
);
123 PHP_FUNCTION(imap_check
);
124 PHP_FUNCTION(imap_close
);
125 PHP_FUNCTION(imap_mail_copy
);
126 PHP_FUNCTION(imap_mail_move
);
127 PHP_FUNCTION(imap_createmailbox
);
128 PHP_FUNCTION(imap_renamemailbox
);
129 PHP_FUNCTION(imap_deletemailbox
);
130 PHP_FUNCTION(imap_listmailbox
);
131 PHP_FUNCTION(imap_scanmailbox
);
132 PHP_FUNCTION(imap_subscribe
);
133 PHP_FUNCTION(imap_unsubscribe
);
134 PHP_FUNCTION(imap_append
);
135 PHP_FUNCTION(imap_ping
);
136 PHP_FUNCTION(imap_base64
);
137 PHP_FUNCTION(imap_qprint
);
138 PHP_FUNCTION(imap_8bit
);
139 PHP_FUNCTION(imap_binary
);
140 PHP_FUNCTION(imap_mailboxmsginfo
);
141 PHP_FUNCTION(imap_rfc822_write_address
);
142 PHP_FUNCTION(imap_rfc822_parse_adrlist
);
143 PHP_FUNCTION(imap_setflag_full
);
144 PHP_FUNCTION(imap_clearflag_full
);
145 PHP_FUNCTION(imap_sort
);
146 PHP_FUNCTION(imap_fetchheader
);
147 PHP_FUNCTION(imap_fetchtext
);
148 PHP_FUNCTION(imap_uid
);
149 PHP_FUNCTION(imap_msgno
);
150 PHP_FUNCTION(imap_list
);
151 PHP_FUNCTION(imap_list_full
);
152 PHP_FUNCTION(imap_listscan
);
153 PHP_FUNCTION(imap_lsub
);
154 PHP_FUNCTION(imap_lsub_full
);
155 PHP_FUNCTION(imap_create
);
156 PHP_FUNCTION(imap_rename
);
157 PHP_FUNCTION(imap_status
);
158 PHP_FUNCTION(imap_bodystruct
);
159 PHP_FUNCTION(imap_fetch_overview
);
160 PHP_FUNCTION(imap_mail_compose
);
161 PHP_FUNCTION(imap_alerts
);
162 PHP_FUNCTION(imap_errors
);
163 PHP_FUNCTION(imap_last_error
);
164 PHP_FUNCTION(imap_mail
);
165 PHP_FUNCTION(imap_search
);
166 PHP_FUNCTION(imap_utf8
);
167 PHP_FUNCTION(imap_utf7_decode
);
168 PHP_FUNCTION(imap_utf7_encode
);
169 #ifdef HAVE_IMAP_MUTF7
170 PHP_FUNCTION(imap_utf8_to_mutf7
);
171 PHP_FUNCTION(imap_mutf7_to_utf8
);
173 PHP_FUNCTION(imap_mime_header_decode
);
174 PHP_FUNCTION(imap_thread
);
175 PHP_FUNCTION(imap_timeout
);
177 #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
178 PHP_FUNCTION(imap_get_quota
);
179 PHP_FUNCTION(imap_get_quotaroot
);
180 PHP_FUNCTION(imap_set_quota
);
181 PHP_FUNCTION(imap_setacl
);
182 PHP_FUNCTION(imap_getacl
);
186 ZEND_BEGIN_MODULE_GLOBALS(imap
)
190 STRINGLIST
*imap_alertstack
;
191 ERRORLIST
*imap_errorstack
;
193 STRINGLIST
*imap_folders
;
194 STRINGLIST
*imap_folders_tail
;
195 STRINGLIST
*imap_sfolders
;
196 STRINGLIST
*imap_sfolders_tail
;
197 MESSAGELIST
*imap_messages
;
198 MESSAGELIST
*imap_messages_tail
;
199 FOBJECTLIST
*imap_folder_objects
;
200 FOBJECTLIST
*imap_folder_objects_tail
;
201 FOBJECTLIST
*imap_sfolder_objects
;
202 FOBJECTLIST
*imap_sfolder_objects_tail
;
204 folderlist_style_t folderlist_style
;
206 unsigned long status_messages
;
207 unsigned long status_recent
;
208 unsigned long status_unseen
;
209 unsigned long status_uidnext
;
210 unsigned long status_uidvalidity
;
211 #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
215 /* php_stream for php_mail_gets() */
216 php_stream
*gets_stream
;
217 ZEND_END_MODULE_GLOBALS(imap
)
220 # define IMAPG(v) TSRMG(imap_globals_id, zend_imap_globals *, v)
222 # define IMAPG(v) (imap_globals.v)
227 #define imap_module_ptr NULL
231 #define phpext_imap_ptr imap_module_ptr
233 #endif /* PHP_IMAP_H */