diff --git a/gnupg.c b/gnupg.c index a1bd26e..69532a9 100644 --- a/gnupg.c +++ b/gnupg.c @@ -252,7 +252,7 @@ ZEND_END_ARG_INFO() /* {{{ methodlist gnupg */ phpc_function_entry gnupg_methods[] = { PHP_FALIAS(keyinfo, gnupg_keyinfo, arginfo_gnupg_pattern_method) - PHP_FALIAS(verify, gnupg_verify, arginfo_gnupg_text_method) + PHP_FALIAS(verify, gnupg_verify, arginfo_gnupg_verify_method) PHP_FALIAS(geterror, gnupg_geterror, NULL) PHP_FALIAS(clearsignkeys, gnupg_clearsignkeys, NULL) PHP_FALIAS(clearencryptkeys, gnupg_clearencryptkeys, NULL) @@ -278,7 +278,70 @@ phpc_function_entry gnupg_methods[] = { }; /* }}} */ -/* {{{ arginfo gnupg_verify_method */ +/* {{{ arginfo for gnupg function with no parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_void_function, 0) + ZEND_ARG_INFO(0, res) +ZEND_END_ARG_INFO() +/* }}} */ + + +/* {{{ arginfo for gnupg function with armor parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_armor_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, armor) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with enctext parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_enctext_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, enctext) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with text parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_text_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, text) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with key parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_key_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, kye) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with key parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_keyid_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, kyeid) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with pattern parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_pattern_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, pattern) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with errmode parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_errmode_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, errnmode) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo for gnupg functions with signmode parameter */ +ZEND_BEGIN_ARG_INFO(arginfo_gnupg_signmode_function, 0) + ZEND_ARG_INFO(0, res) + ZEND_ARG_INFO(0, signmode) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ arginfo gnupg_verify_function */ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_verify_function, 0, 0, 3) ZEND_ARG_INFO(0, res) ZEND_ARG_INFO(0, text) @@ -287,7 +350,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_verify_function, 0, 0, 3) ZEND_END_ARG_INFO() /* }}} */ -/* {{{ arginfo gnupg_decryptverify_method */ +/* {{{ arginfo gnupg_decryptverify_function */ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_decryptverify_function, 0, 0, 3) ZEND_ARG_INFO(0, res) ZEND_ARG_INFO(0, enctext) @@ -297,31 +360,31 @@ ZEND_END_ARG_INFO() /* {{{ functionlist gnupg */ static zend_function_entry gnupg_functions[] = { - PHP_FE(gnupg_init, NULL) - PHP_FE(gnupg_keyinfo, NULL) - PHP_FE(gnupg_sign, NULL) + PHP_FE(gnupg_init, arginfo_gnupg_void_function) + PHP_FE(gnupg_keyinfo, arginfo_gnupg_pattern_function) + PHP_FE(gnupg_sign, arginfo_gnupg_text_function) PHP_FE(gnupg_verify, arginfo_gnupg_verify_function) - PHP_FE(gnupg_clearsignkeys, NULL) - PHP_FE(gnupg_clearencryptkeys, NULL) - PHP_FE(gnupg_cleardecryptkeys, NULL) - PHP_FE(gnupg_setarmor, NULL) - PHP_FE(gnupg_encrypt, NULL) - PHP_FE(gnupg_decrypt, NULL) - PHP_FE(gnupg_export, NULL) - PHP_FE(gnupg_import, NULL) - PHP_FE(gnupg_getprotocol, NULL) - PHP_FE(gnupg_setsignmode, NULL) - PHP_FE(gnupg_encryptsign, NULL) + PHP_FE(gnupg_clearsignkeys, arginfo_gnupg_void_function) + PHP_FE(gnupg_clearencryptkeys, arginfo_gnupg_void_function) + PHP_FE(gnupg_cleardecryptkeys, arginfo_gnupg_void_function) + PHP_FE(gnupg_setarmor, arginfo_gnupg_armor_function) + PHP_FE(gnupg_encrypt, arginfo_gnupg_text_function) + PHP_FE(gnupg_decrypt, arginfo_gnupg_enctext_function) + PHP_FE(gnupg_export, arginfo_gnupg_pattern_function) + PHP_FE(gnupg_import, arginfo_gnupg_key_function) + PHP_FE(gnupg_getprotocol, arginfo_gnupg_void_function) + PHP_FE(gnupg_setsignmode, arginfo_gnupg_signmode_function) + PHP_FE(gnupg_encryptsign, arginfo_gnupg_text_function) PHP_FE(gnupg_decryptverify, arginfo_gnupg_decryptverify_function) - PHP_FE(gnupg_geterror, NULL) - PHP_FE(gnupg_addsignkey, NULL) - PHP_FE(gnupg_addencryptkey, NULL) - PHP_FE(gnupg_adddecryptkey, NULL) - PHP_FE(gnupg_deletekey, NULL) - PHP_FE(gnupg_gettrustlist, NULL) - PHP_FE(gnupg_listsignatures, NULL) - PHP_FE(gnupg_seterrormode, NULL) - {NULL, NULL, NULL} + PHP_FE(gnupg_geterror, arginfo_gnupg_void_function) + PHP_FE(gnupg_addsignkey, arginfo_gnupg_key_function) + PHP_FE(gnupg_addencryptkey, arginfo_gnupg_key_function) + PHP_FE(gnupg_adddecryptkey, arginfo_gnupg_key_function) + PHP_FE(gnupg_deletekey, arginfo_gnupg_key_function) + PHP_FE(gnupg_gettrustlist, arginfo_gnupg_pattern_function) + PHP_FE(gnupg_listsignatures, arginfo_gnupg_keyid_function) + PHP_FE(gnupg_seterrormode, arginfo_gnupg_errmode_function) + PHPC_FE_END }; /* }}} */