1 /* Copyright (c) MediaArea.net SARL. All Rights Reserved. 2 * 3 * Use of this source code is governed by a BSD-style license that can 4 * be found in the License.html file in the root of the source tree. 5 */ 6 7 //--------------------------------------------------------------------------- 8 #ifndef MediaInfo_Reader_libcurl_IncludeH 9 #define MediaInfo_Reader_libcurl_IncludeH 10 //--------------------------------------------------------------------------- 11 12 //*************************************************************************** 13 // Copy of curl include files - Easy interface 14 //*************************************************************************** 15 16 typedef void CURL; 17 18 typedef enum { 19 CURLE_OK = 0, 20 CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ 21 CURLE_FAILED_INIT, /* 2 */ 22 CURLE_URL_MALFORMAT, /* 3 */ 23 CURLE_OBSOLETE4, /* 4 - NOT USED */ 24 CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ 25 CURLE_COULDNT_RESOLVE_HOST, /* 6 */ 26 CURLE_COULDNT_CONNECT, /* 7 */ 27 CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ 28 CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server 29 due to lack of access - when login fails 30 this is not returned. */ 31 CURLE_OBSOLETE10, /* 10 - NOT USED */ 32 CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ 33 CURLE_OBSOLETE12, /* 12 - NOT USED */ 34 CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ 35 CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ 36 CURLE_FTP_CANT_GET_HOST, /* 15 */ 37 CURLE_OBSOLETE16, /* 16 - NOT USED */ 38 CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ 39 CURLE_PARTIAL_FILE, /* 18 */ 40 CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ 41 CURLE_OBSOLETE20, /* 20 - NOT USED */ 42 CURLE_QUOTE_ERROR, /* 21 - quote command failure */ 43 CURLE_HTTP_RETURNED_ERROR, /* 22 */ 44 CURLE_WRITE_ERROR, /* 23 */ 45 CURLE_OBSOLETE24, /* 24 - NOT USED */ 46 CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ 47 CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ 48 CURLE_OUT_OF_MEMORY, /* 27 */ 49 /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error 50 instead of a memory allocation error if CURL_DOES_CONVERSIONS 51 is defined 52 */ 53 CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ 54 CURLE_OBSOLETE29, /* 29 - NOT USED */ 55 CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ 56 CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ 57 CURLE_OBSOLETE32, /* 32 - NOT USED */ 58 CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ 59 CURLE_HTTP_POST_ERROR, /* 34 */ 60 CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ 61 CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ 62 CURLE_FILE_COULDNT_READ_FILE, /* 37 */ 63 CURLE_LDAP_CANNOT_BIND, /* 38 */ 64 CURLE_LDAP_SEARCH_FAILED, /* 39 */ 65 CURLE_OBSOLETE40, /* 40 - NOT USED */ 66 CURLE_FUNCTION_NOT_FOUND, /* 41 */ 67 CURLE_ABORTED_BY_CALLBACK, /* 42 */ 68 CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ 69 CURLE_OBSOLETE44, /* 44 - NOT USED */ 70 CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ 71 CURLE_OBSOLETE46, /* 46 - NOT USED */ 72 CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ 73 CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ 74 CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ 75 CURLE_OBSOLETE50, /* 50 - NOT USED */ 76 CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint 77 wasn't verified fine */ 78 CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ 79 CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ 80 CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as 81 default */ 82 CURLE_SEND_ERROR, /* 55 - failed sending network data */ 83 CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ 84 CURLE_OBSOLETE57, /* 57 - NOT IN USE */ 85 CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ 86 CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ 87 CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ 88 CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ 89 CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ 90 CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ 91 CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ 92 CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind 93 that failed */ 94 CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ 95 CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not 96 accepted and we failed to login */ 97 CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ 98 CURLE_TFTP_PERM, /* 69 - permission problem on server */ 99 CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ 100 CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ 101 CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ 102 CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ 103 CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ 104 CURLE_CONV_FAILED, /* 75 - conversion failed */ 105 CURLE_CONV_REQD, /* 76 - caller must register conversion 106 callbacks using curl_easy_setopt options 107 CURLOPT_CONV_FROM_NETWORK_FUNCTION, 108 CURLOPT_CONV_TO_NETWORK_FUNCTION, and 109 CURLOPT_CONV_FROM_UTF8_FUNCTION */ 110 CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing 111 or wrong format */ 112 CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ 113 CURLE_SSH, /* 79 - error from the SSH layer, somewhat 114 generic so the error message will be of 115 interest when this has happened */ 116 117 CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL 118 connection */ 119 CURLE_AGAIN, /* 81 - socket is not ready for send/recv, 120 wait till it's ready and try again (Added 121 in 7.18.2) */ 122 CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or 123 wrong format (Added in 7.19.0) */ 124 CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in 125 7.19.0) */ 126 CURL_LAST /* never use! */ 127 } CURLcode; 128 129 #define CURLINFO_STRING 0x100000 130 #define CURLINFO_LONG 0x200000 131 #define CURLINFO_DOUBLE 0x300000 132 #define CURLINFO_SLIST 0x400000 133 #define CURLINFO_MASK 0x0fffff 134 #define CURLINFO_TYPEMASK 0xf00000 135 136 typedef enum { 137 CURLINFO_NONE, /* first, never use this */ 138 CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, 139 CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, 140 CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, 141 CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, 142 CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, 143 CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, 144 CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, 145 CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, 146 CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, 147 CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, 148 CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, 149 CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, 150 CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, 151 CURLINFO_FILETIME = CURLINFO_LONG + 14, 152 CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, 153 CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, 154 CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, 155 CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, 156 CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, 157 CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, 158 CURLINFO_PRIVATE = CURLINFO_STRING + 21, 159 CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, 160 CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, 161 CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, 162 CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, 163 CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, 164 CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, 165 CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, 166 CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, 167 CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, 168 CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, 169 CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, 170 CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, 171 CURLINFO_CERTINFO = CURLINFO_SLIST + 34, 172 CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, 173 /* Fill in new entries below here! */ 174 175 CURLINFO_LASTONE = 35 176 } CURLINFO; 177 178 /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ 179 #define CURLPROTO_HTTP (1<<0) 180 #define CURLPROTO_HTTPS (1<<1) 181 #define CURLPROTO_FTP (1<<2) 182 #define CURLPROTO_FTPS (1<<3) 183 #define CURLPROTO_SCP (1<<4) 184 #define CURLPROTO_SFTP (1<<5) 185 #define CURLPROTO_TELNET (1<<6) 186 #define CURLPROTO_LDAP (1<<7) 187 #define CURLPROTO_LDAPS (1<<8) 188 #define CURLPROTO_DICT (1<<9) 189 #define CURLPROTO_FILE (1<<10) 190 #define CURLPROTO_TFTP (1<<11) 191 #define CURLPROTO_ALL (~0) /* enable everything */ 192 193 /* long may be 32 or 64 bits, but we should never depend on anything else 194 but 32 */ 195 #define CURLOPTTYPE_LONG 0 196 #define CURLOPTTYPE_OBJECTPOINT 10000 197 #define CURLOPTTYPE_FUNCTIONPOINT 20000 198 #define CURLOPTTYPE_OFF_T 30000 199 200 #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number 201 202 /* 203 * This macro-mania below setups the CURLOPT_[what] enum, to be used with 204 * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] 205 * word. 206 */ 207 208 typedef enum { 209 /* This is the FILE * or void * the regular output should be written to. */ 210 CINIT(FILE, OBJECTPOINT, 1), 211 212 /* The full URL to get/put */ 213 CINIT(URL, OBJECTPOINT, 2), 214 215 /* Port number to connect to, if other than default. */ 216 CINIT(PORT, LONG, 3), 217 218 /* Name of proxy to use. */ 219 CINIT(PROXY, OBJECTPOINT, 4), 220 221 /* "name:password" to use when fetching. */ 222 CINIT(USERPWD, OBJECTPOINT, 5), 223 224 /* "name:password" to use with proxy. */ 225 CINIT(PROXYUSERPWD, OBJECTPOINT, 6), 226 227 /* Range to get, specified as an ASCII string. */ 228 CINIT(RANGE, OBJECTPOINT, 7), 229 230 /* not used */ 231 232 /* Specified file stream to upload from (use as input): */ 233 CINIT(INFILE, OBJECTPOINT, 9), 234 235 /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE 236 * bytes big. If this is not used, error messages go to stderr instead: */ 237 CINIT(ERRORBUFFER, OBJECTPOINT, 10), 238 239 /* Function that will be called to store the output (instead of fwrite). The 240 * parameters will use fwrite() syntax, make sure to follow them. */ 241 CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), 242 243 /* Function that will be called to read the input (instead of fread). The 244 * parameters will use fread() syntax, make sure to follow them. */ 245 CINIT(READFUNCTION, FUNCTIONPOINT, 12), 246 247 /* Time-out the read operation after this amount of seconds */ 248 CINIT(TIMEOUT, LONG, 13), 249 250 /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about 251 * how large the file being sent really is. That allows better error 252 * checking and better verifies that the upload was successful. -1 means 253 * unknown size. 254 * 255 * For large file support, there is also a _LARGE version of the key 256 * which takes an off_t type, allowing platforms with larger off_t 257 * sizes to handle larger files. See below for INFILESIZE_LARGE. 258 */ 259 CINIT(INFILESIZE, LONG, 14), 260 261 /* POST static input fields. */ 262 CINIT(POSTFIELDS, OBJECTPOINT, 15), 263 264 /* Set the referrer page (needed by some CGIs) */ 265 CINIT(REFERER, OBJECTPOINT, 16), 266 267 /* Set the FTP PORT string (interface name, named or numerical IP address) 268 Use i.e '-' to use default address. */ 269 CINIT(FTPPORT, OBJECTPOINT, 17), 270 271 /* Set the User-Agent string (examined by some CGIs) */ 272 CINIT(USERAGENT, OBJECTPOINT, 18), 273 274 /* If the download receives less than "low speed limit" bytes/second 275 * during "low speed time" seconds, the operations is aborted. 276 * You could i.e if you have a pretty high speed connection, abort if 277 * it is less than 2000 bytes/sec during 20 seconds. 278 */ 279 280 /* Set the "low speed limit" */ 281 CINIT(LOW_SPEED_LIMIT, LONG, 19), 282 283 /* Set the "low speed time" */ 284 CINIT(LOW_SPEED_TIME, LONG, 20), 285 286 /* Set the continuation offset. 287 * 288 * Note there is also a _LARGE version of this key which uses 289 * off_t types, allowing for large file offsets on platforms which 290 * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. 291 */ 292 CINIT(RESUME_FROM, LONG, 21), 293 294 /* Set cookie in request: */ 295 CINIT(COOKIE, OBJECTPOINT, 22), 296 297 /* This points to a linked list of headers, struct curl_slist kind */ 298 CINIT(HTTPHEADER, OBJECTPOINT, 23), 299 300 /* This points to a linked list of post entries, struct curl_httppost */ 301 CINIT(HTTPPOST, OBJECTPOINT, 24), 302 303 /* name of the file keeping your private SSL-certificate */ 304 CINIT(SSLCERT, OBJECTPOINT, 25), 305 306 /* password for the SSL or SSH private key */ 307 CINIT(KEYPASSWD, OBJECTPOINT, 26), 308 309 /* send TYPE parameter? */ 310 CINIT(CRLF, LONG, 27), 311 312 /* send linked-list of QUOTE commands */ 313 CINIT(QUOTE, OBJECTPOINT, 28), 314 315 /* send FILE * or void * to store headers to, if you use a callback it 316 is simply passed to the callback unmodified */ 317 CINIT(WRITEHEADER, OBJECTPOINT, 29), 318 319 /* point to a file to read the initial cookies from, also enables 320 "cookie awareness" */ 321 CINIT(COOKIEFILE, OBJECTPOINT, 31), 322 323 /* What version to specifically try to use. 324 See CURL_SSLVERSION defines below. */ 325 CINIT(SSLVERSION, LONG, 32), 326 327 /* What kind of HTTP time condition to use, see defines */ 328 CINIT(TIMECONDITION, LONG, 33), 329 330 /* Time to use with the above condition. Specified in number of seconds 331 since 1 Jan 1970 */ 332 CINIT(TIMEVALUE, LONG, 34), 333 334 /* 35 = OBSOLETE */ 335 336 /* Custom request, for customizing the get command like 337 HTTP: DELETE, TRACE and others 338 FTP: to use a different list command 339 */ 340 CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), 341 342 /* HTTP request, for odd commands like DELETE, TRACE and others */ 343 CINIT(STDERR, OBJECTPOINT, 37), 344 345 /* 38 is not used */ 346 347 /* send linked-list of post-transfer QUOTE commands */ 348 CINIT(POSTQUOTE, OBJECTPOINT, 39), 349 350 /* Pass a pointer to string of the output using full variable-replacement 351 as described elsewhere. */ 352 CINIT(WRITEINFO, OBJECTPOINT, 40), 353 354 CINIT(VERBOSE, LONG, 41), /* talk a lot */ 355 CINIT(HEADER, LONG, 42), /* throw the header out too */ 356 CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ 357 CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ 358 CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ 359 CINIT(UPLOAD, LONG, 46), /* this is an upload */ 360 CINIT(POST, LONG, 47), /* HTTP POST method */ 361 CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ 362 363 CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ 364 365 /* Specify whether to read the user+password from the .netrc or the URL. 366 * This must be one of the CURL_NETRC_* enums below. */ 367 CINIT(NETRC, LONG, 51), 368 369 CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ 370 371 CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ 372 CINIT(PUT, LONG, 54), /* HTTP PUT */ 373 374 /* 55 = OBSOLETE */ 375 376 /* Function that will be called instead of the internal progress display 377 * function. This function should be defined as the curl_progress_callback 378 * prototype defines. */ 379 CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), 380 381 /* Data passed to the progress callback */ 382 CINIT(PROGRESSDATA, OBJECTPOINT, 57), 383 384 /* We want the referrer field set automatically when following locations */ 385 CINIT(AUTOREFERER, LONG, 58), 386 387 /* Port of the proxy, can be set in the proxy string as well with: 388 "[host]:[port]" */ 389 CINIT(PROXYPORT, LONG, 59), 390 391 /* size of the POST input data, if strlen() is not good to use */ 392 CINIT(POSTFIELDSIZE, LONG, 60), 393 394 /* tunnel non-http operations through a HTTP proxy */ 395 CINIT(HTTPPROXYTUNNEL, LONG, 61), 396 397 /* Set the interface string to use as outgoing network interface */ 398 CINIT(INTERFACE, OBJECTPOINT, 62), 399 400 /* Set the krb4/5 security level, this also enables krb4/5 awareness. This 401 * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string 402 * is set but doesn't match one of these, 'private' will be used. */ 403 CINIT(KRBLEVEL, OBJECTPOINT, 63), 404 405 /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ 406 CINIT(SSL_VERIFYPEER, LONG, 64), 407 408 /* The CApath or CAfile used to validate the peer certificate 409 this option is used only if SSL_VERIFYPEER is true */ 410 CINIT(CAINFO, OBJECTPOINT, 65), 411 412 /* 66 = OBSOLETE */ 413 /* 67 = OBSOLETE */ 414 415 /* Maximum number of http redirects to follow */ 416 CINIT(MAXREDIRS, LONG, 68), 417 418 /* Pass a long set to 1 to get the date of the requested document (if 419 possible)! Pass a zero to shut it off. */ 420 CINIT(FILETIME, LONG, 69), 421 422 /* This points to a linked list of telnet options */ 423 CINIT(TELNETOPTIONS, OBJECTPOINT, 70), 424 425 /* Max amount of cached alive connections */ 426 CINIT(MAXCONNECTS, LONG, 71), 427 428 /* What policy to use when closing connections when the cache is filled 429 up */ 430 CINIT(CLOSEPOLICY, LONG, 72), 431 432 /* 73 = OBSOLETE */ 433 434 /* Set to explicitly use a new connection for the upcoming transfer. 435 Do not use this unless you're absolutely sure of this, as it makes the 436 operation slower and is less friendly for the network. */ 437 CINIT(FRESH_CONNECT, LONG, 74), 438 439 /* Set to explicitly forbid the upcoming transfer's connection to be re-used 440 when done. Do not use this unless you're absolutely sure of this, as it 441 makes the operation slower and is less friendly for the network. */ 442 CINIT(FORBID_REUSE, LONG, 75), 443 444 /* Set to a file name that contains random data for libcurl to use to 445 seed the random engine when doing SSL connects. */ 446 CINIT(RANDOM_FILE, OBJECTPOINT, 76), 447 448 /* Set to the Entropy Gathering Daemon socket pathname */ 449 CINIT(EGDSOCKET, OBJECTPOINT, 77), 450 451 /* Time-out connect operations after this amount of seconds, if connects 452 are OK within this time, then fine... This only aborts the connect 453 phase. [Only works on unix-style/SIGALRM operating systems] */ 454 CINIT(CONNECTTIMEOUT, LONG, 78), 455 456 /* Function that will be called to store headers (instead of fwrite). The 457 * parameters will use fwrite() syntax, make sure to follow them. */ 458 CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), 459 460 /* Set this to force the HTTP request to get back to GET. Only really usable 461 if POST, PUT or a custom request have been used first. 462 */ 463 CINIT(HTTPGET, LONG, 80), 464 465 /* Set if we should verify the Common name from the peer certificate in ssl 466 * handshake, set 1 to check existence, 2 to ensure that it matches the 467 * provided hostname. */ 468 CINIT(SSL_VERIFYHOST, LONG, 81), 469 470 /* Specify which file name to write all known cookies in after completed 471 operation. Set file name to "-" (dash) to make it go to stdout. */ 472 CINIT(COOKIEJAR, OBJECTPOINT, 82), 473 474 /* Specify which SSL ciphers to use */ 475 CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), 476 477 /* Specify which HTTP version to use! This must be set to one of the 478 CURL_HTTP_VERSION* enums set below. */ 479 CINIT(HTTP_VERSION, LONG, 84), 480 481 /* Specifically switch on or off the FTP engine's use of the EPSV command. By 482 default, that one will always be attempted before the more traditional 483 PASV command. */ 484 CINIT(FTP_USE_EPSV, LONG, 85), 485 486 /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ 487 CINIT(SSLCERTTYPE, OBJECTPOINT, 86), 488 489 /* name of the file keeping your private SSL-key */ 490 CINIT(SSLKEY, OBJECTPOINT, 87), 491 492 /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ 493 CINIT(SSLKEYTYPE, OBJECTPOINT, 88), 494 495 /* crypto engine for the SSL-sub system */ 496 CINIT(SSLENGINE, OBJECTPOINT, 89), 497 498 /* set the crypto engine for the SSL-sub system as default 499 the param has no meaning... 500 */ 501 CINIT(SSLENGINE_DEFAULT, LONG, 90), 502 503 /* Non-zero value means to use the global dns cache */ 504 CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ 505 506 /* DNS cache timeout */ 507 CINIT(DNS_CACHE_TIMEOUT, LONG, 92), 508 509 /* send linked-list of pre-transfer QUOTE commands */ 510 CINIT(PREQUOTE, OBJECTPOINT, 93), 511 512 /* set the debug function */ 513 CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), 514 515 /* set the data for the debug function */ 516 CINIT(DEBUGDATA, OBJECTPOINT, 95), 517 518 /* mark this as start of a cookie session */ 519 CINIT(COOKIESESSION, LONG, 96), 520 521 /* The CApath directory used to validate the peer certificate 522 this option is used only if SSL_VERIFYPEER is true */ 523 CINIT(CAPATH, OBJECTPOINT, 97), 524 525 /* Instruct libcurl to use a smaller receive buffer */ 526 CINIT(BUFFERSIZE, LONG, 98), 527 528 /* Instruct libcurl to not use any signal/alarm handlers, even when using 529 timeouts. This option is useful for multi-threaded applications. 530 See libcurl-the-guide for more background information. */ 531 CINIT(NOSIGNAL, LONG, 99), 532 533 /* Provide a CURLShare for mutexing non-ts data */ 534 CINIT(SHARE, OBJECTPOINT, 100), 535 536 /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), 537 CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ 538 CINIT(PROXYTYPE, LONG, 101), 539 540 /* Set the Accept-Encoding string. Use this to tell a server you would like 541 the response to be compressed. */ 542 CINIT(ENCODING, OBJECTPOINT, 102), 543 544 /* Set pointer to private data */ 545 CINIT(PRIVATE, OBJECTPOINT, 103), 546 547 /* Set aliases for HTTP 200 in the HTTP Response header */ 548 CINIT(HTTP200ALIASES, OBJECTPOINT, 104), 549 550 /* Continue to send authentication (user+password) when following locations, 551 even when hostname changed. This can potentially send off the name 552 and password to whatever host the server decides. */ 553 CINIT(UNRESTRICTED_AUTH, LONG, 105), 554 555 /* Specifically switch on or off the FTP engine's use of the EPRT command ( it 556 also disables the LPRT attempt). By default, those ones will always be 557 attempted before the good old traditional PORT command. */ 558 CINIT(FTP_USE_EPRT, LONG, 106), 559 560 /* Set this to a bitmask value to enable the particular authentications 561 methods you like. Use this in combination with CURLOPT_USERPWD. 562 Note that setting multiple bits may cause extra network round-trips. */ 563 CINIT(HTTPAUTH, LONG, 107), 564 565 /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx 566 in second argument. The function must be matching the 567 curl_ssl_ctx_callback proto. */ 568 CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), 569 570 /* Set the userdata for the ssl context callback function's third 571 argument */ 572 CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), 573 574 /* FTP Option that causes missing dirs to be created on the remote server. 575 In 7.19.4 we introduced the convenience enums for this option using the 576 CURLFTP_CREATE_DIR prefix. 577 */ 578 CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), 579 580 /* Set this to a bitmask value to enable the particular authentications 581 methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. 582 Note that setting multiple bits may cause extra network round-trips. */ 583 CINIT(PROXYAUTH, LONG, 111), 584 585 /* FTP option that changes the timeout, in seconds, associated with 586 getting a response. This is different from transfer timeout time and 587 essentially places a demand on the FTP server to acknowledge commands 588 in a timely manner. */ 589 CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), 590 591 /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to 592 tell libcurl to resolve names to those IP versions only. This only has 593 affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ 594 CINIT(IPRESOLVE, LONG, 113), 595 596 /* Set this option to limit the size of a file that will be downloaded from 597 an HTTP or FTP server. 598 599 Note there is also _LARGE version which adds large file support for 600 platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ 601 CINIT(MAXFILESIZE, LONG, 114), 602 603 /* See the comment for INFILESIZE above, but in short, specifies 604 * the size of the file being uploaded. -1 means unknown. 605 */ 606 CINIT(INFILESIZE_LARGE, OFF_T, 115), 607 608 /* Sets the continuation offset. There is also a LONG version of this; 609 * look above for RESUME_FROM. 610 */ 611 CINIT(RESUME_FROM_LARGE, OFF_T, 116), 612 613 /* Sets the maximum size of data that will be downloaded from 614 * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. 615 */ 616 CINIT(MAXFILESIZE_LARGE, OFF_T, 117), 617 618 /* Set this option to the file name of your .netrc file you want libcurl 619 to parse (using the CURLOPT_NETRC option). If not set, libcurl will do 620 a poor attempt to find the user's home directory and check for a .netrc 621 file in there. */ 622 CINIT(NETRC_FILE, OBJECTPOINT, 118), 623 624 /* Enable SSL/TLS for FTP, pick one of: 625 CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise 626 CURLFTPSSL_CONTROL - SSL for the control connection or fail 627 CURLFTPSSL_ALL - SSL for all communication or fail 628 */ 629 CINIT(USE_SSL, LONG, 119), 630 631 /* The _LARGE version of the standard POSTFIELDSIZE option */ 632 CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), 633 634 /* Enable/disable the TCP Nagle algorithm */ 635 CINIT(TCP_NODELAY, LONG, 121), 636 637 /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ 638 /* 123 OBSOLETE. Gone in 7.16.0 */ 639 /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ 640 /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ 641 /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ 642 /* 127 OBSOLETE. Gone in 7.16.0 */ 643 /* 128 OBSOLETE. Gone in 7.16.0 */ 644 645 /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option 646 can be used to change libcurl's default action which is to first try 647 "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK 648 response has been received. 649 650 Available parameters are: 651 CURLFTPAUTH_DEFAULT - let libcurl decide 652 CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS 653 CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL 654 */ 655 CINIT(FTPSSLAUTH, LONG, 129), 656 657 CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), 658 CINIT(IOCTLDATA, OBJECTPOINT, 131), 659 660 /* 132 OBSOLETE. Gone in 7.16.0 */ 661 /* 133 OBSOLETE. Gone in 7.16.0 */ 662 663 /* zero terminated string for pass on to the FTP server when asked for 664 "account" info */ 665 CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), 666 667 /* feed cookies into cookie engine */ 668 CINIT(COOKIELIST, OBJECTPOINT, 135), 669 670 /* ignore Content-Length */ 671 CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), 672 673 /* Set to non-zero to skip the IP address received in a 227 PASV FTP server 674 response. Typically used for FTP-SSL purposes but is not restricted to 675 that. libcurl will then instead use the same IP address it used for the 676 control connection. */ 677 CINIT(FTP_SKIP_PASV_IP, LONG, 137), 678 679 /* Select "file method" to use when doing FTP, see the curl_ftpmethod 680 above. */ 681 CINIT(FTP_FILEMETHOD, LONG, 138), 682 683 /* Local port number to bind the socket to */ 684 CINIT(LOCALPORT, LONG, 139), 685 686 /* Number of ports to try, including the first one set with LOCALPORT. 687 Thus, setting it to 1 will make no additional attempts but the first. 688 */ 689 CINIT(LOCALPORTRANGE, LONG, 140), 690 691 /* no transfer, set up connection and let application use the socket by 692 extracting it with CURLINFO_LASTSOCKET */ 693 CINIT(CONNECT_ONLY, LONG, 141), 694 695 /* Function that will be called to convert from the 696 network encoding (instead of using the iconv calls in libcurl) */ 697 CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), 698 699 /* Function that will be called to convert to the 700 network encoding (instead of using the iconv calls in libcurl) */ 701 CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), 702 703 /* Function that will be called to convert from UTF8 704 (instead of using the iconv calls in libcurl) 705 Note that this is used only for SSL certificate processing */ 706 CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), 707 708 /* if the connection proceeds too quickly then need to slow it down */ 709 /* limit-rate: maximum number of bytes per second to send or receive */ 710 CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), 711 CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), 712 713 /* Pointer to command string to send if USER/PASS fails. */ 714 CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), 715 716 /* callback function for setting socket options */ 717 CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), 718 CINIT(SOCKOPTDATA, OBJECTPOINT, 149), 719 720 /* set to 0 to disable session ID re-use for this transfer, default is 721 enabled (== 1) */ 722 CINIT(SSL_SESSIONID_CACHE, LONG, 150), 723 724 /* allowed SSH authentication methods */ 725 CINIT(SSH_AUTH_TYPES, LONG, 151), 726 727 /* Used by scp/sftp to do public/private key authentication */ 728 CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), 729 CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), 730 731 /* Send CCC (Clear Command Channel) after authentication */ 732 CINIT(FTP_SSL_CCC, LONG, 154), 733 734 /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ 735 CINIT(TIMEOUT_MS, LONG, 155), 736 CINIT(CONNECTTIMEOUT_MS, LONG, 156), 737 738 /* set to zero to disable the libcurl's decoding and thus pass the raw body 739 data to the application even when it is encoded/compressed */ 740 CINIT(HTTP_TRANSFER_DECODING, LONG, 157), 741 CINIT(HTTP_CONTENT_DECODING, LONG, 158), 742 743 /* Permission used when creating new files and directories on the remote 744 server for protocols that support it, SFTP/SCP/FILE */ 745 CINIT(NEW_FILE_PERMS, LONG, 159), 746 CINIT(NEW_DIRECTORY_PERMS, LONG, 160), 747 748 /* Set the behaviour of POST when redirecting. Values must be set to one 749 of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ 750 CINIT(POSTREDIR, LONG, 161), 751 752 /* used by scp/sftp to verify the host's public key */ 753 CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), 754 755 /* Callback function for opening socket (instead of socket(2)). Optionally, 756 callback is able change the address or refuse to connect returning 757 CURL_SOCKET_BAD. The callback should have type 758 curl_opensocket_callback */ 759 CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), 760 CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), 761 762 /* POST volatile input fields. */ 763 CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), 764 765 /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */ 766 CINIT(PROXY_TRANSFER_MODE, LONG, 166), 767 768 /* Callback function for seeking in the input stream */ 769 CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), 770 CINIT(SEEKDATA, OBJECTPOINT, 168), 771 772 /* CRL file */ 773 CINIT(CRLFILE, OBJECTPOINT, 169), 774 775 /* Issuer certificate */ 776 CINIT(ISSUERCERT, OBJECTPOINT, 170), 777 778 /* (IPv6) Address scope */ 779 CINIT(ADDRESS_SCOPE, LONG, 171), 780 781 /* Collect certificate chain info and allow it to get retrievable with 782 CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only 783 working with OpenSSL-powered builds. */ 784 CINIT(CERTINFO, LONG, 172), 785 786 /* "name" and "pwd" to use when fetching. */ 787 CINIT(USERNAME, OBJECTPOINT, 173), 788 CINIT(PASSWORD, OBJECTPOINT, 174), 789 790 /* "name" and "pwd" to use with Proxy when fetching. */ 791 CINIT(PROXYUSERNAME, OBJECTPOINT, 175), 792 CINIT(PROXYPASSWORD, OBJECTPOINT, 176), 793 794 /* Comma separated list of hostnames defining no-proxy zones. These should 795 match both hostnames directly, and hostnames within a domain. For 796 example, local.com will match local.com and www.local.com, but NOT 797 notlocal.com or www.notlocal.com. For compatibility with other 798 implementations of this, .local.com will be considered to be the same as 799 local.com. A single * is the only valid wildcard, and effectively 800 disables the use of proxy. */ 801 CINIT(NOPROXY, OBJECTPOINT, 177), 802 803 /* block size for TFTP transfers */ 804 CINIT(TFTP_BLKSIZE, LONG, 178), 805 806 /* Socks Service */ 807 CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), 808 809 /* Socks Service */ 810 CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), 811 812 /* set the bitmask for the protocols that are allowed to be used for the 813 transfer, which thus helps the app which takes URLs from users or other 814 external inputs and want to restrict what protocol(s) to deal 815 with. Defaults to CURLPROTO_ALL. */ 816 CINIT(PROTOCOLS, LONG, 181), 817 818 /* set the bitmask for the protocols that libcurl is allowed to follow to, 819 as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs 820 to be set in both bitmasks to be allowed to get redirected to. Defaults 821 to all protocols except FILE and SCP. */ 822 CINIT(REDIR_PROTOCOLS, LONG, 182), 823 824 /* set the SSH knownhost file name to use */ 825 CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), 826 827 /* set the SSH host key callback, must point to a curl_sshkeycallback 828 function */ 829 CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), 830 831 /* set the SSH host key callback custom pointer */ 832 CINIT(SSH_KEYDATA, OBJECTPOINT, 185), 833 834 CURLOPT_LASTENTRY /* the last unused */ 835 } CURLoption; 836 837 /* three convenient "aliases" that follow the name scheme better */ 838 #define CURLOPT_WRITEDATA CURLOPT_FILE 839 #define CURLOPT_READDATA CURLOPT_INFILE 840 #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER 841 842 typedef int64u curl_off_t; 843 844 //*************************************************************************** 845 // Copy of curl include files - Multi interface 846 //*************************************************************************** 847 848 typedef void CURLM; 849 850 typedef enum { 851 CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or 852 curl_multi_socket*() soon */ 853 CURLM_OK, 854 CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ 855 CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ 856 CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ 857 CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ 858 CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ 859 CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ 860 CURLM_LAST 861 } CURLMcode; 862 863 typedef enum { 864 CURLVERSION_FIRST, 865 CURLVERSION_SECOND, 866 CURLVERSION_THIRD, 867 CURLVERSION_FOURTH, 868 CURLVERSION_LAST /* never actually use this */ 869 } CURLversion; 870 871 #define CURLVERSION_NOW CURLVERSION_FOURTH 872 873 typedef struct { 874 CURLversion age; /* age of the returned struct */ 875 const char *version; /* LIBCURL_VERSION */ 876 unsigned int version_num; /* LIBCURL_VERSION_NUM */ 877 const char *host; /* OS/host/cpu/machine when configured */ 878 int features; /* bitmask, see defines below */ 879 const char *ssl_version; /* human readable string */ 880 long ssl_version_num; /* not used anymore, always 0 */ 881 const char *libz_version; /* human readable string */ 882 /* protocols is terminated by an entry with a NULL protoname */ 883 const char * const *protocols; 884 885 /* The fields below this were added in CURLVERSION_SECOND */ 886 const char *ares; 887 int ares_num; 888 889 /* This field was added in CURLVERSION_THIRD */ 890 const char *libidn; 891 892 /* These field were added in CURLVERSION_FOURTH */ 893 894 /* Same as '_libiconv_version' if built with HAVE_ICONV */ 895 int iconv_ver_num; 896 897 const char *libssh_version; /* human readable string */ 898 899 } curl_version_info_data; 900 901 #define CURL_ERROR_SIZE 256 902 903 //*************************************************************************** 904 // Dynamic load stuff 905 //*************************************************************************** 906 907 extern "C" 908 { 909 910 #if defined (_WIN32) || defined (WIN32) 911 #ifdef _UNICODE 912 #define MEDIAINFODLL_NAME L"libcurl.dll" 913 #else //_UNICODE 914 #define MEDIAINFODLL_NAME "libcurl.dll" 915 #endif //_UNICODE 916 #elif defined(__APPLE__) && defined(__MACH__) 917 #define MEDIAINFODLL_NAME "libcurl.4.dylib" 918 #define __stdcall 919 #else 920 #define MEDIAINFODLL_NAME "libcurl.so.4" 921 #define __stdcall 922 #endif //!defined(_WIN32) || defined (WIN32) 923 924 #ifdef MEDIAINFO_GLIBC 925 #include <gmodule.h> 926 static GModule* libcurl_Module=NULL; 927 #elif defined (_WIN32) || defined (WIN32) 928 #undef __TEXT 929 #if __cplusplus >= 201703L || _MSVC_LANG >= 201703L 930 namespace WindowsNamespace 931 { 932 #endif 933 #include "windows.h" 934 #if __cplusplus >= 201703L || _MSVC_LANG >= 201703L 935 } 936 using namespace WindowsNamespace; 937 #endif 938 static HMODULE libcurl_Module=NULL; 939 #else 940 #include <dlfcn.h> 941 static void* libcurl_Module=NULL; 942 #endif 943 944 size_t libcurl_Module_Count=0; 945 946 #ifdef MEDIAINFO_GLIBC 947 #define MEDIAINFO_ASSIGN(_Name,_Name2) \ 948 if (!g_module_symbol (libcurl_Module, _Name2, (gpointer*)&_Name)) \ 949 Errors++; 950 #elif defined (_WIN32) || defined (WIN32) 951 #define MEDIAINFO_ASSIGN(_Name,_Name2) \ 952 _Name=(LIBCURL_##_Name)GetProcAddress(libcurl_Module, _Name2); \ 953 if (_Name==NULL) Errors++; 954 #else 955 #define MEDIAINFO_ASSIGN(_Name,_Name2) \ 956 _Name=(LIBCURL_##_Name)dlsym(libcurl_Module, _Name2); \ 957 if (_Name==NULL) Errors++; 958 #endif 959 960 //--------------------------------------------------------------------------- 961 // Easy interface 962 typedef CURL* (*LIBCURL_curl_easy_init) (); static LIBCURL_curl_easy_init curl_easy_init; 963 typedef CURLcode (*LIBCURL_curl_easy_setopt) (CURL *curl, CURLoption option, ...); static LIBCURL_curl_easy_setopt curl_easy_setopt; 964 typedef CURLcode (*LIBCURL_curl_easy_perform)(CURL *curl); static LIBCURL_curl_easy_perform curl_easy_perform; 965 typedef void (*LIBCURL_curl_easy_cleanup)(CURL *curl); static LIBCURL_curl_easy_cleanup curl_easy_cleanup; 966 typedef CURLcode (*LIBCURL_curl_easy_getinfo)(CURL *curl, CURLINFO info, ...); static LIBCURL_curl_easy_getinfo curl_easy_getinfo; 967 typedef struct curl_slist* (*LIBCURL_curl_slist_append) (struct curl_slist *, const char *); static LIBCURL_curl_slist_append curl_slist_append; 968 typedef void (*LIBCURL_curl_slist_free_all) (struct curl_slist *); static LIBCURL_curl_slist_free_all curl_slist_free_all; 969 typedef CURL* (*LIBCURL_curl_easy_duphandle)(CURL *curl); static LIBCURL_curl_easy_duphandle curl_easy_duphandle; 970 typedef const char* (*LIBCURL_curl_easy_strerror)(CURLcode curlcode); static LIBCURL_curl_easy_strerror curl_easy_strerror; 971 typedef curl_version_info_data* (*LIBCURL_curl_version_info)(CURLversion version); static LIBCURL_curl_version_info curl_version_info; 972 973 //--------------------------------------------------------------------------- 974 // Multi interface 975 typedef CURLM* (*LIBCURL_curl_multi_init) (); static LIBCURL_curl_multi_init curl_multi_init; 976 typedef CURLMcode (*LIBCURL_curl_multi_add_handle) (CURLM *multi_handle, CURL *curl_handle); static LIBCURL_curl_multi_add_handle curl_multi_add_handle; 977 typedef CURLMcode (*LIBCURL_curl_multi_remove_handle) (CURLM *multi_handle, CURL *curl_handle); static LIBCURL_curl_multi_remove_handle curl_multi_remove_handle; 978 typedef CURLMcode (*LIBCURL_curl_multi_perform)(CURLM *curl, int *running_handles); static LIBCURL_curl_multi_perform curl_multi_perform; 979 typedef void (*LIBCURL_curl_multi_cleanup)(CURLM *curl); static LIBCURL_curl_multi_cleanup curl_multi_cleanup; 980 981 } 982 983 #endif 984