1
0
Fork 0
mirror of https://codeberg.org/demostf/plugin.git synced 2026-06-04 00:54:08 +02:00

update curl includes

This commit is contained in:
Robin Appelman 2023-07-09 18:31:16 +02:00
commit b974dc2a0d
2 changed files with 41 additions and 41 deletions

View file

@ -9,7 +9,7 @@
/* /*
======================================== ========================================
The Following CURLOPT_* NOT support: The Following CURLOPT_* NOT support
ERRORBUFFER // use curl_get_error_buffer ERRORBUFFER // use curl_get_error_buffer
WRITEINFO // ??? WRITEINFO // ???
PROGRESSFUNCTION // unused PROGRESSFUNCTION // unused
@ -52,7 +52,7 @@ CLOSESOCKETDATA // unsupport
/* /*
======================================== ========================================
The Following CURLOPT_* supports the "file://" notation. The Following CURLOPT_* supports the "file //" notation.
COOKIEFILE COOKIEFILE
COOKIEJAR COOKIEJAR
RANDOM_FILE RANDOM_FILE
@ -70,14 +70,14 @@ SSH_KNOWNHOSTS
/* /*
======================================== ========================================
The Following CURLINFO_* NOT support: The Following CURLINFO_* NOT support
CURLINFO_SLIST CURLINFO_SLIST
========================================*/ ========================================*/
/* /*
======================================== ========================================
The Following CURLFORM_* NOT support: The Following CURLFORM_* NOT support
CURLFORM_PTRNAME CURLFORM_PTRNAME
CURLFORM_PTRCONTENTS CURLFORM_PTRCONTENTS
CURLFORM_ARRAY CURLFORM_ARRAY
@ -126,6 +126,7 @@ enum SendRecv_Act {
enum Openssl_Hash { enum Openssl_Hash {
Openssl_Hash_MD5 = 0, Openssl_Hash_MD5 = 0,
Openssl_Hash_MD4, Openssl_Hash_MD4,
Openssl_Hash_MD2,
Openssl_Hash_SHA, Openssl_Hash_SHA,
Openssl_Hash_SHA1, Openssl_Hash_SHA1,
Openssl_Hash_SHA224, Openssl_Hash_SHA224,
@ -178,8 +179,8 @@ typeset CURL_OnSend
*/ */
typeset CURL_OnReceive typeset CURL_OnReceive
{ {
function SendRecv_Act(Handle hndl, CURLcode code, const char[] receiveData, int dataSize); function SendRecv_Act (Handle hndl, CURLcode code, const char[] receiveData, const int dataSize);
function SendRecv_Act(Handle hndl, CURLcode code, const char[] receiveData, int dataSize, any data); function SendRecv_Act (Handle hndl, CURLcode code, const char[] receiveData, const int dataSize, any data);
} }
/** /**
@ -199,12 +200,12 @@ typeset Openssl_Hash_Complete
typeset CURL_Function_CB typeset CURL_Function_CB
{ {
// CURLOPT_WRITEFUNCTION // CURLOPT_WRITEFUNCTION
function void(Handle hndl, const char[] buffer, int bytes, int nmemb); function void (Handle hndl, const char[] buffer, const int bytes, const int nmemb);
function void(Handle hndl, const char[] buffer, int bytes, int nmemb, any data); function void (Handle hndl, const char[] buffer, const int bytes, const int nmemb, any data);
// CURLOPT_READFUNCTION // CURLOPT_READFUNCTION
function void(Handle hndl, int bytes, int nmemb); function void (Handle hndl, const int bytes, const int nmemb);
function void(Handle hndl, int bytes, int nmemb, any data); function void (Handle hndl, const int bytes, const int nmemb, any data);
} }
/*************************************************************************************************/ /*************************************************************************************************/
@ -226,7 +227,7 @@ native Handle curl_easy_init();
* @ param String buffer The value to set the option to. * @ param String buffer The value to set the option to.
* @ return bool 1 on success. 0 = The option not accept string or unsupport. * @ return bool 1 on success. 0 = The option not accept string or unsupport.
*/ */
native bool curl_easy_setopt_string(Handle hndl, CURLoption opt, char []buffer); native bool curl_easy_setopt_string(Handle hndl, CURLoption opt, const char[] buffer);
/** /**
* Set a curl option for CURLOPTTYPE_LONG type * Set a curl option for CURLOPTTYPE_LONG type
@ -242,8 +243,8 @@ native bool curl_easy_setopt_int(Handle hndl, CURLoption opt, int value);
* Set a curl option for CURLOPTTYPE_LONG type * Set a curl option for CURLOPTTYPE_LONG type
* @ example" * @ example"
new opt[][2] = { new opt[][2] = {
{_:CURLOPT_NOPROGRESS,1}, {_ CURLOPT_NOPROGRESS,1},
{_:CURLOPT_VERBOSE,0} {_ CURLOPT_VERBOSE,0}
}; };
* *
* @ param Handle hndl The handle of the curl to be used. May be INVALID_HANDLE if not essential. * @ param Handle hndl The handle of the curl to be used. May be INVALID_HANDLE if not essential.
@ -251,7 +252,7 @@ native bool curl_easy_setopt_int(Handle hndl, CURLoption opt, int value);
* @ param cell_t array_size The array size. * @ param cell_t array_size The array size.
* @ return bool 1 on success. 0 = The option not accept integer or unsupport. * @ return bool 1 on success. 0 = The option not accept integer or unsupport.
*/ */
native bool curl_easy_setopt_int_array(Handle hndl, int [][]array, int array_size); native bool curl_easy_setopt_int_array(Handle hndl, int[][] array, int array_size); // int array[][2]
/** /**
* Set a curl option for CURLOPTTYPE_OFF_T type * Set a curl option for CURLOPTTYPE_OFF_T type
@ -261,7 +262,7 @@ native bool curl_easy_setopt_int_array(Handle hndl, int [][]array, int array_siz
* @ param String buffer The value to set the option to. * @ param String buffer The value to set the option to.
* @ return bool 1 on success. 0 = The option not accept string or unsupport. * @ return bool 1 on success. 0 = The option not accept string or unsupport.
*/ */
native bool curl_easy_setopt_int64(Handle hndl, CURLoption opt, const char []buffer); native bool curl_easy_setopt_int64(Handle hndl, CURLoption opt, const char buffer);
/** /**
* Set a curl option for CURLOPTTYPE_OBJECTPOINT type * Set a curl option for CURLOPTTYPE_OBJECTPOINT type
@ -525,13 +526,13 @@ native void curl_slist_append(Handle hndl, const char []buffer);
/** /**
* Hash a file * Hash a file
* @ parma String file The file path. supports the "file://" notation. * @ parma String file The file path. supports the "file //" notation.
* @ param Openssl_Hash algorithm Hash Algorithm. * @ param Openssl_Hash algorithm Hash Algorithm.
* @ param Openssl_Hash_Complete complete_callback The complete callback. * @ param Openssl_Hash_Complete complete_callback The complete callback.
* @ param cell_t value Value to set. * @ param cell_t value Value to set.
* @ noreturn * @ noreturn
*/ */
native curl_hash_file(const char []file, Openssl_Hash algorithm, Openssl_Hash_Complete complete_callback, any value=0); native void curl_hash_file(const char[] file, Openssl_Hash algorithm, Openssl_Hash_Complete complete_callback, any value=0);
/** /**
* Hash a string * Hash a string
@ -548,8 +549,7 @@ native bool curl_hash_string(const char []input, int dataSize, Openssl_Hash algo
/** /**
* Do not edit below this line! * Do not edit below this line!
*/ */
public Extension __ext_curl = public Extension __ext_curl = {
{
name = "curl", name = "curl",
file = "curl.ext", file = "curl.ext",
#if defined AUTOLOAD_EXTENSIONS #if defined AUTOLOAD_EXTENSIONS