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