summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mcve/mcve.c90
-rw-r--r--ext/mcve/php_mcve.h6
2 files changed, 95 insertions, 1 deletions
diff --git a/ext/mcve/mcve.c b/ext/mcve/mcve.c
index 0c243a48a0..f586490baa 100644
--- a/ext/mcve/mcve.c
+++ b/ext/mcve/mcve.c
@@ -48,6 +48,7 @@ function_entry php_mcve_functions[] = {
PHP_FE(mcve_setip, NULL)
PHP_FE(mcve_setssl, NULL)
PHP_FE(mcve_settimeout, NULL)
+ PHP_FE(mcve_setblocking, NULL)
PHP_FE(mcve_verifyconnection, NULL)
PHP_FE(mcve_verifysslcert, NULL)
PHP_FE(mcve_maxconntimeout, NULL)
@@ -97,6 +98,10 @@ function_entry php_mcve_functions[] = {
PHP_FE(mcve_ub, NULL)
PHP_FE(mcve_chkpwd, NULL)
PHP_FE(mcve_bt, NULL)
+ PHP_FE(mcve_uwait, NULL)
+ PHP_FE(mcve_text_code, NULL)
+ PHP_FE(mcve_text_avs, NULL)
+ PHP_FE(mcve_text_cv, NULL)
/* Administrator Functions */
PHP_FE(mcve_chngpwd, NULL)
PHP_FE(mcve_listusers, NULL)
@@ -2077,6 +2082,91 @@ PHP_FUNCTION(mcve_edituser)
}
/* }}} */
+
+/* {{{ proto int mcve_uwait(long microsecs)
+ Wait x microsecs */
+PHP_FUNCTION(mcve_uwait)
+{
+ long retval;
+ zval **arg;
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(arg);
+
+ retval = MCVE_uwait(Z_LVAL_PP(arg));
+
+ RETURN_LONG(retval);
+}
+/* }}} */
+
+/* {{{ proto string mcve_text_code(string code)
+ Get a textual representation of the return_code */
+PHP_FUNCTION(mcve_text_code)
+{
+ char *retval;
+ zval **arg;
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(arg);
+
+ retval = MCVE_TEXT_AVS(Z_LVAL_PP(arg));
+
+ if (retval == NULL) {
+ RETVAL_STRING("",1);
+ } else {
+ RETVAL_STRING(retval, 1);
+ }
+}
+/* }}} */
+
+/* {{{ proto string mcve_text_avs(string code)
+ Get a textual representation of the return_avs */
+PHP_FUNCTION(mcve_text_avs)
+{
+ char *retval;
+ zval **arg;
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(arg);
+
+ retval = MCVE_TEXT_AVS(Z_LVAL_PP(arg));
+
+ if (retval == NULL) {
+ RETVAL_STRING("",1);
+ } else {
+ RETVAL_STRING(retval, 1);
+ }
+}
+/* }}} */
+
+/* {{{ proto string mcve_text_cv(int code)
+ Get a textual representation of the return_cv */
+PHP_FUNCTION(mcve_text_cv)
+{
+ char *retval;
+ zval **arg;
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(arg);
+
+ retval = MCVE_TEXT_CV(Z_LVAL_PP(arg));
+
+ if (retval == NULL) {
+ RETVAL_STRING("",1);
+ } else {
+ RETVAL_STRING(retval, 1);
+ }
+}
+/* }}} */
+
/* END OF MCVE PHP EXTENSION */
/*
diff --git a/ext/mcve/php_mcve.h b/ext/mcve/php_mcve.h
index 6847538c36..59bff8ef3b 100644
--- a/ext/mcve/php_mcve.h
+++ b/ext/mcve/php_mcve.h
@@ -31,6 +31,7 @@ PHP_FUNCTION(mcve_destroyconn);
PHP_FUNCTION(mcve_setdropfile);
PHP_FUNCTION(mcve_setip);
PHP_FUNCTION(mcve_setssl);
+PHP_FUNCTION(mcve_setblocking);
PHP_FUNCTION(mcve_settimeout);
PHP_FUNCTION(mcve_verifyconnection);
PHP_FUNCTION(mcve_verifysslcert);
@@ -81,7 +82,10 @@ PHP_FUNCTION(mcve_ub);
PHP_FUNCTION(mcve_gl);
PHP_FUNCTION(mcve_chkpwd);
PHP_FUNCTION(mcve_bt);
-
+PHP_FUNCTION(mcve_uwait);
+PHP_FUNCTION(mcve_text_code);
+PHP_FUNCTION(mcve_text_avs);
+PHP_FUNCTION(mcve_text_cv);
PHP_FUNCTION(mcve_chngpwd);
PHP_FUNCTION(mcve_listusers);
PHP_FUNCTION(mcve_adduser);