php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch imap_annotation.patch for IMAP related Bug #43948Patch version 2010-07-30 11:51 UTC Return to Bug #43948 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions: 2010-07-30 11:51 UTC | 2010-07-29 08:48 UTCDeveloper: mkoppanen@php.netPHP_FUNCTION(imap_setacl); PHP_FUNCTION(imap_getacl); +PHP_FUNCTION(imap_myrights); #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) +PHP_FUNCTION(imap_setannotation); +PHP_FUNCTION(imap_getannotation); +#endif @@ -211,6 +216,9 @@ zval **quota_return; zval *imap_acl_list; #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) + zval *imap_annotation_list; +#endif /* php_stream for php_mail_gets() */ php_stream *gets_stream; @@ -124,6 +124,11 @@ AC_DEFINE(HAVE_IMAP2004,1,[ ]) ]) + dnl Check for c-client version 2005 + dnl Check for annotation support + AC_EGREP_HEADER(imap_getannotation, $IMAP_INC_DIR/mail.h, [ + AC_DEFINE(HAVE_IMAP2005,1,[ ]) + AC_DEFINE(HAVE_IMAP_ANNOTATIONS,1,[ ]) + ]) + dnl Check for new version of the utf8_mime2text() function old_CFLAGS=$CFLAGS @@ -164,7 +164,23 @@ ZEND_ARG_INFO(0, mailbox) ZEND_END_ARG_INFO() #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) +ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setannotation, 0, 0, 5) + ZEND_ARG_INFO(0, stream_id) + ZEND_ARG_INFO(0, mailbox) + ZEND_ARG_INFO(0, entry) @@ -537,6 +559,10 @@ PHP_FE(imap_setacl, arginfo_imap_setacl) PHP_FE(imap_getacl, arginfo_imap_getacl) #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) + PHP_FE(imap_setannotation, arginfo_imap_setannotation) + PHP_FE(imap_getannotation, arginfo_imap_getannotation) +#endif @@ -798,6 +824,28 @@ /* }}} */ #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) +/* {{{ mail_getannotation + * + * Mail GET_ANNOTATION callback + * Called via the mail_parameter function in c-client:src/c-client/mail.c @@ -824,6 +872,9 @@ imap_globals->quota_return = NIL; imap_globals->imap_acl_list = NIL; #endif +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) + imap_globals->imap_annotation_list = NIL; +#endif imap_globals->gets_stream = NIL; } } /* }}} */ #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */ + +#if defined(HAVE_IMAP2005) +#if defined(HAVE_IMAP_ANNOTATIONS) +/* {{{ proto bool imap_setannotation(resource stream_id, string mailbox, string entry, string attr, string value) + Sets an annotation for a given mailbox */ +PHP_FUNCTION(imap_setannotation) + IMAPG(imap_annotation_list) = NIL; +} +/* }}} */ + +#endif /* HAVE_IMAP2005 */ +#endif /* HAVE_IMAP_ANNOTATIONS */ + /* {{{ proto bool imap_expunge(resource stream_id) Permanently delete all messages marked for deletion */ PHP_FUNCTION(imap_expunge) |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Fri Mar 29 02:01:30 2024 UTC |