@@ -396,6 +396,13 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0)
396
396
ZEND_ARG_INFO (0 , option )
397
397
ZEND_ARG_INFO (0 , value )
398
398
ZEND_END_ARG_INFO ()
399
+
400
+ #if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */
401
+ ZEND_BEGIN_ARG_INFO (arginfo_curl_pause , 0 )
402
+ ZEND_ARG_INFO (0 , ch )
403
+ ZEND_ARG_INFO (0 , bitmask )
404
+ ZEND_END_ARG_INFO ()
405
+ #endif
399
406
/* }}} */
400
407
401
408
/* {{{ curl_functions[]
@@ -421,6 +428,9 @@ const zend_function_entry curl_functions[] = {
421
428
#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */
422
429
PHP_FE (curl_escape , arginfo_curl_escape )
423
430
PHP_FE (curl_unescape , arginfo_curl_unescape )
431
+ #endif
432
+ #if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */
433
+ PHP_FE (curl_pause , arginfo_curl_pause )
424
434
#endif
425
435
PHP_FE (curl_multi_init , arginfo_curl_multi_init )
426
436
PHP_FE (curl_multi_add_handle , arginfo_curl_multi_add_handle )
@@ -999,6 +1009,14 @@ PHP_MINIT_FUNCTION(curl)
999
1009
1000
1010
#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */
1001
1011
REGISTER_CURL_CONSTANT (CURLOPT_PROXY_TRANSFER_MODE );
1012
+ REGISTER_CURL_CONSTANT (CURLPAUSE_ALL );
1013
+ REGISTER_CURL_CONSTANT (CURLPAUSE_CONT );
1014
+ REGISTER_CURL_CONSTANT (CURLPAUSE_RECV );
1015
+ REGISTER_CURL_CONSTANT (CURLPAUSE_RECV_CONT );
1016
+ REGISTER_CURL_CONSTANT (CURLPAUSE_SEND );
1017
+ REGISTER_CURL_CONSTANT (CURLPAUSE_SEND_CONT );
1018
+ REGISTER_CURL_CONSTANT (CURL_READFUNC_PAUSE );
1019
+ REGISTER_CURL_CONSTANT (CURL_WRITEFUNC_PAUSE );
1002
1020
#endif
1003
1021
1004
1022
#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */
@@ -3417,8 +3435,29 @@ PHP_FUNCTION(curl_unescape)
3417
3435
RETURN_FALSE ;
3418
3436
}
3419
3437
}
3438
+ /* }}} */
3420
3439
#endif
3440
+
3441
+ #if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */
3442
+ /* {{{ proto void curl_pause(resource ch, int bitmask)
3443
+ pause and unpause a connection */
3444
+ PHP_FUNCTION (curl_pause )
3445
+ {
3446
+ long bitmask ;
3447
+ zval * zid ;
3448
+ php_curl * ch ;
3449
+
3450
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rl" , & zid , & bitmask ) == FAILURE ) {
3451
+ return ;
3452
+ }
3453
+
3454
+ ZEND_FETCH_RESOURCE (ch , php_curl * , & zid , -1 , le_curl_name , le_curl );
3455
+
3456
+ RETURN_LONG (curl_easy_pause (ch -> cp , bitmask ));
3457
+ }
3421
3458
/* }}} */
3459
+ #endif
3460
+
3422
3461
#endif /* HAVE_CURL */
3423
3462
3424
3463
/*
0 commit comments