1 /* 2 +----------------------------------------------------------------------+ 3 | Copyright (c) The PHP Group | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available at through the world-wide-web at | 8 | http://www.php.net/license/3_01.txt. | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Author: Wez Furlong <wez@thebrainroom.com> | 14 | Credit also given to Double Precision Inc. who wrote the code that | 15 | the support routines for this extension were based upon. | 16 +----------------------------------------------------------------------+ 17 */ 18 19 #ifndef PHP_MAILPARSE_H 20 #define PHP_MAILPARSE_H 21 22 extern zend_module_entry mailparse_module_entry; 23 #define phpext_mailparse_ptr &mailparse_module_entry 24 25 #define PHP_MAILPARSE_VERSION "3.1.2" 26 27 #ifdef PHP_WIN32 28 #define PHP_MAILPARSE_API __declspec(dllexport) 29 #else 30 #define PHP_MAILPARSE_API 31 #endif 32 33 PHP_MINIT_FUNCTION(mailparse); 34 PHP_MSHUTDOWN_FUNCTION(mailparse); 35 PHP_RINIT_FUNCTION(mailparse); 36 PHP_RSHUTDOWN_FUNCTION(mailparse); 37 PHP_MINFO_FUNCTION(mailparse); 38 39 PHP_FUNCTION(mailparse_msg_parse_file); 40 PHP_FUNCTION(mailparse_msg_get_part); 41 PHP_FUNCTION(mailparse_msg_get_structure); 42 PHP_FUNCTION(mailparse_msg_get_part_data); 43 PHP_FUNCTION(mailparse_msg_extract_part); 44 PHP_FUNCTION(mailparse_msg_extract_part_file); 45 PHP_FUNCTION(mailparse_msg_extract_whole_part_file); 46 47 PHP_FUNCTION(mailparse_msg_create); 48 PHP_FUNCTION(mailparse_msg_free); 49 PHP_FUNCTION(mailparse_msg_parse); 50 PHP_FUNCTION(mailparse_msg_parse_file); 51 52 PHP_FUNCTION(mailparse_msg_find); 53 PHP_FUNCTION(mailparse_msg_getstructure); 54 PHP_FUNCTION(mailparse_msg_getinfo); 55 PHP_FUNCTION(mailparse_msg_extract); 56 PHP_FUNCTION(mailparse_msg_extract_file); 57 PHP_FUNCTION(mailparse_rfc822_parse_addresses); 58 PHP_FUNCTION(mailparse_determine_best_xfer_encoding); 59 PHP_FUNCTION(mailparse_stream_encode); 60 PHP_FUNCTION(mailparse_uudecode_all); 61 62 PHP_FUNCTION(mailparse_test); 63 64 PHP_MAILPARSE_API int php_mailparse_le_mime_part(void); 65 PHP_MAILPARSE_API char* php_mailparse_msg_name(void); 66 67 /* mimemessage object */ 68 PHP_METHOD(mimemessage, __construct); 69 PHP_METHOD(mimemessage, get_child); 70 PHP_METHOD(mimemessage, get_child_count); 71 PHP_METHOD(mimemessage, get_parent); 72 PHP_METHOD(mimemessage, extract_headers); 73 PHP_METHOD(mimemessage, extract_body); 74 PHP_METHOD(mimemessage, enum_uue); 75 PHP_METHOD(mimemessage, extract_uue); 76 PHP_METHOD(mimemessage, remove); 77 PHP_METHOD(mimemessage, add_child); 78 79 # include "ext/mbstring/libmbfl/mbfl/mbfilter.h" 80 81 #include "php_mailparse_rfc822.h" 82 #include "php_mailparse_mime.h" 83 84 #define MAILPARSE_BUFSIZ 4096 85 ZEND_BEGIN_MODULE_GLOBALS(mailparse) 86 char * def_charset; /* default charset for use in (re)writing mail */ 87 ZEND_END_MODULE_GLOBALS(mailparse); 88 89 extern ZEND_DECLARE_MODULE_GLOBALS(mailparse); 90 91 92 #ifdef ZTS 93 #define MAILPARSEG(v) TSRMG(mailparse_globals_id, zend_mailparse_globals *, v) 94 #else 95 #define MAILPARSEG(v) (mailparse_globals.v) 96 #endif 97 98 #endif 99 100 101 /* 102 * Local variables: 103 * tab-width: 4 104 * c-basic-offset: 4 105 * End: 106 * vim: sw=4 ts=4 107 */ 108