php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #43948
Patch imap_annotation.patch revision 2010-07-30 11:51 UTC by mkoppanen@php.net
revision 2010-07-29 08:48 UTC by mkoppanen@php.net
Patch imap_myrights.patch revision 2010-07-29 08:48 UTC by mkoppanen@php.net

Patch imap_annotation.patch for IMAP related Bug #43948

Patch version 2010-07-29 08:48 UTC

Return to Bug #43948 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2010-07-30 11:51 UTC | 2010-07-29 08:48 UTC

Developer: mkoppanen@php.net



   PHP_FUNCTION(imap_setacl);
   PHP_FUNCTION(imap_getacl);
  +PHP_FUNCTION(imap_myrights);
   #endif
 +#if defined(HAVE_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  +PHP_FUNCTION(imap_setannotation);
  +PHP_FUNCTION(imap_getannotation);
  +#endif
   


  @@ -211,6 +216,9 @@
   	zval **quota_return;
   	zval *imap_acl_list;
   #endif
 +#if defined(HAVE_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  +	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 annotation support
 +    dnl Check for c-client version 2005
  +    AC_EGREP_HEADER(imap_getannotation, $IMAP_INC_DIR/mail.h, [
 +      AC_DEFINE(HAVE_IMAP_ANNOTATIONS,1,[ ])
 +      AC_DEFINE(HAVE_IMAP2005,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_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  +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_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  + 	PHP_FE(imap_setannotation,						arginfo_imap_setannotation)
  + 	PHP_FE(imap_getannotation,						arginfo_imap_getannotation)
  +#endif
   


  @@ -798,6 +824,28 @@
   /* }}} */
   #endif
   
 +#if defined(HAVE_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  +/* {{{ 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_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
  +	imap_globals->imap_annotation_list = NIL;
  +#endif
   	imap_globals->gets_stream = NIL;
   }


   }
   /* }}} */
   #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */
  + 
 +#if defined(HAVE_IMAP_ANNOTATIONS)
 +#if defined(HAVE_IMAP2005)
   
  +/* {{{ 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_IMAP_ANNOTATIONS */
 +#endif /* HAVE_IMAP2005 */
  + 
   /* {{{ proto bool imap_expunge(resource stream_id)
      Permanently delete all messages marked for deletion */
   PHP_FUNCTION(imap_expunge)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 20 00:03:34 2022 UTC