michael@0: #ifndef __CURL_CURL_H michael@0: #define __CURL_CURL_H michael@0: /*************************************************************************** michael@0: * _ _ ____ _ michael@0: * Project ___| | | | _ \| | michael@0: * / __| | | | |_) | | michael@0: * | (__| |_| | _ <| |___ michael@0: * \___|\___/|_| \_\_____| michael@0: * michael@0: * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. michael@0: * michael@0: * This software is licensed as described in the file COPYING, which michael@0: * you should have received as part of this distribution. The terms michael@0: * are also available at http://curl.haxx.se/docs/copyright.html. michael@0: * michael@0: * You may opt to use, copy, modify, merge, publish, distribute and/or sell michael@0: * copies of the Software, and permit persons to whom the Software is michael@0: * furnished to do so, under the terms of the COPYING file. michael@0: * michael@0: * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY michael@0: * KIND, either express or implied. michael@0: * michael@0: * $Id: curl.h,v 1.396 2009-10-16 13:30:31 yangtse Exp $ michael@0: ***************************************************************************/ michael@0: michael@0: /* michael@0: * If you have libcurl problems, all docs and details are found here: michael@0: * http://curl.haxx.se/libcurl/ michael@0: * michael@0: * curl-library mailing list subscription and unsubscription web interface: michael@0: * http://cool.haxx.se/mailman/listinfo/curl-library/ michael@0: */ michael@0: michael@0: /* michael@0: * Leading 'curl' path on the 'curlbuild.h' include statement is michael@0: * required to properly allow building outside of the source tree, michael@0: * due to the fact that in this case 'curlbuild.h' is generated in michael@0: * a subdirectory of the build tree while 'curl.h actually remains michael@0: * in a subdirectory of the source tree. michael@0: */ michael@0: michael@0: #include "third_party/curl/curlver.h" /* libcurl version defines */ michael@0: #include "third_party/curl/curlbuild.h" /* libcurl build definitions */ michael@0: #include "third_party/curl/curlrules.h" /* libcurl rules enforcement */ michael@0: michael@0: /* michael@0: * Define WIN32 when build target is Win32 API michael@0: */ michael@0: michael@0: #if (defined(_WIN32) || defined(__WIN32__)) && \ michael@0: !defined(WIN32) && !defined(__SYMBIAN32__) michael@0: #define WIN32 michael@0: #endif michael@0: michael@0: #include michael@0: #include michael@0: michael@0: /* The include stuff here below is mainly for time_t! */ michael@0: #include michael@0: #include michael@0: michael@0: #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ michael@0: !defined(__CYGWIN__) || defined(__MINGW32__) michael@0: #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) michael@0: /* The check above prevents the winsock2 inclusion if winsock.h already was michael@0: included, since they can't co-exist without problems */ michael@0: #include michael@0: #include michael@0: #endif michael@0: #else michael@0: michael@0: /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish michael@0: libc5-based Linux systems. Only include it on system that are known to michael@0: require it! */ michael@0: #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ michael@0: defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ michael@0: defined(ANDROID) michael@0: #include michael@0: #endif michael@0: michael@0: #ifndef _WIN32_WCE michael@0: #include michael@0: #endif michael@0: #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) michael@0: #include michael@0: #endif michael@0: #include michael@0: #endif michael@0: michael@0: #ifdef __BEOS__ michael@0: #include michael@0: #endif michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: typedef void CURL; michael@0: michael@0: /* michael@0: * Decorate exportable functions for Win32 and Symbian OS DLL linking. michael@0: * This avoids using a .def file for building libcurl.dll. michael@0: */ michael@0: #if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ michael@0: !defined(CURL_STATICLIB) michael@0: #if defined(BUILDING_LIBCURL) michael@0: #define CURL_EXTERN __declspec(dllexport) michael@0: #else michael@0: #define CURL_EXTERN __declspec(dllimport) michael@0: #endif michael@0: #else michael@0: michael@0: #ifdef CURL_HIDDEN_SYMBOLS michael@0: /* michael@0: * This definition is used to make external definitions visible in the michael@0: * shared library when symbols are hidden by default. It makes no michael@0: * difference when compiling applications whether this is set or not, michael@0: * only when compiling the library. michael@0: */ michael@0: #define CURL_EXTERN CURL_EXTERN_SYMBOL michael@0: #else michael@0: #define CURL_EXTERN michael@0: #endif michael@0: #endif michael@0: michael@0: #ifndef curl_socket_typedef michael@0: /* socket typedef */ michael@0: #ifdef WIN32 michael@0: typedef SOCKET curl_socket_t; michael@0: #define CURL_SOCKET_BAD INVALID_SOCKET michael@0: #else michael@0: typedef int curl_socket_t; michael@0: #define CURL_SOCKET_BAD -1 michael@0: #endif michael@0: #define curl_socket_typedef michael@0: #endif /* curl_socket_typedef */ michael@0: michael@0: struct curl_httppost { michael@0: struct curl_httppost *next; /* next entry in the list */ michael@0: char *name; /* pointer to allocated name */ michael@0: long namelength; /* length of name length */ michael@0: char *contents; /* pointer to allocated data contents */ michael@0: long contentslength; /* length of contents field */ michael@0: char *buffer; /* pointer to allocated buffer contents */ michael@0: long bufferlength; /* length of buffer field */ michael@0: char *contenttype; /* Content-Type */ michael@0: struct curl_slist* contentheader; /* list of extra headers for this form */ michael@0: struct curl_httppost *more; /* if one field name has more than one michael@0: file, this link should link to following michael@0: files */ michael@0: long flags; /* as defined below */ michael@0: #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ michael@0: #define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ michael@0: #define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer michael@0: do not free in formfree */ michael@0: #define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer michael@0: do not free in formfree */ michael@0: #define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ michael@0: #define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ michael@0: #define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the michael@0: regular read callback to get the data michael@0: and pass the given pointer as custom michael@0: pointer */ michael@0: michael@0: char *showfilename; /* The file name to show. If not set, the michael@0: actual file name will be used (if this michael@0: is a file part) */ michael@0: void *userp; /* custom pointer used for michael@0: HTTPPOST_CALLBACK posts */ michael@0: }; michael@0: michael@0: typedef int (*curl_progress_callback)(void *clientp, michael@0: double dltotal, michael@0: double dlnow, michael@0: double ultotal, michael@0: double ulnow); michael@0: michael@0: #ifndef CURL_MAX_WRITE_SIZE michael@0: /* Tests have proven that 20K is a very bad buffer size for uploads on michael@0: Windows, while 16K for some odd reason performed a lot better. michael@0: We do the ifndef check to allow this value to easier be changed at build michael@0: time for those who feel adventurous. */ michael@0: #define CURL_MAX_WRITE_SIZE 16384 michael@0: #endif michael@0: michael@0: #ifndef CURL_MAX_HTTP_HEADER michael@0: /* The only reason to have a max limit for this is to avoid the risk of a bad michael@0: server feeding libcurl with a never-ending header that will cause reallocs michael@0: infinitely */ michael@0: #define CURL_MAX_HTTP_HEADER (100*1024) michael@0: #endif michael@0: michael@0: michael@0: /* This is a magic return code for the write callback that, when returned, michael@0: will signal libcurl to pause receiving on the current transfer. */ michael@0: #define CURL_WRITEFUNC_PAUSE 0x10000001 michael@0: typedef size_t (*curl_write_callback)(char *buffer, michael@0: size_t size, michael@0: size_t nitems, michael@0: void *outstream); michael@0: michael@0: /* These are the return codes for the seek callbacks */ michael@0: #define CURL_SEEKFUNC_OK 0 michael@0: #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ michael@0: #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so michael@0: libcurl might try other means instead */ michael@0: typedef int (*curl_seek_callback)(void *instream, michael@0: curl_off_t offset, michael@0: int origin); /* 'whence' */ michael@0: michael@0: /* This is a return code for the read callback that, when returned, will michael@0: signal libcurl to immediately abort the current transfer. */ michael@0: #define CURL_READFUNC_ABORT 0x10000000 michael@0: /* This is a return code for the read callback that, when returned, will michael@0: signal libcurl to pause sending data on the current transfer. */ michael@0: #define CURL_READFUNC_PAUSE 0x10000001 michael@0: michael@0: typedef size_t (*curl_read_callback)(char *buffer, michael@0: size_t size, michael@0: size_t nitems, michael@0: void *instream); michael@0: michael@0: typedef enum { michael@0: CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ michael@0: CURLSOCKTYPE_LAST /* never use */ michael@0: } curlsocktype; michael@0: michael@0: typedef int (*curl_sockopt_callback)(void *clientp, michael@0: curl_socket_t curlfd, michael@0: curlsocktype purpose); michael@0: michael@0: struct curl_sockaddr { michael@0: int family; michael@0: int socktype; michael@0: int protocol; michael@0: unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it michael@0: turned really ugly and painful on the systems that michael@0: lack this type */ michael@0: struct sockaddr addr; michael@0: }; michael@0: michael@0: typedef curl_socket_t michael@0: (*curl_opensocket_callback)(void *clientp, michael@0: curlsocktype purpose, michael@0: struct curl_sockaddr *address); michael@0: michael@0: #ifndef CURL_NO_OLDIES michael@0: /* not used since 7.10.8, will be removed in a future release */ michael@0: typedef int (*curl_passwd_callback)(void *clientp, michael@0: const char *prompt, michael@0: char *buffer, michael@0: int buflen); michael@0: #endif michael@0: michael@0: typedef enum { michael@0: CURLIOE_OK, /* I/O operation successful */ michael@0: CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ michael@0: CURLIOE_FAILRESTART, /* failed to restart the read */ michael@0: CURLIOE_LAST /* never use */ michael@0: } curlioerr; michael@0: michael@0: typedef enum { michael@0: CURLIOCMD_NOP, /* no operation */ michael@0: CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ michael@0: CURLIOCMD_LAST /* never use */ michael@0: } curliocmd; michael@0: michael@0: typedef curlioerr (*curl_ioctl_callback)(CURL *handle, michael@0: int cmd, michael@0: void *clientp); michael@0: michael@0: /* michael@0: * The following typedef's are signatures of malloc, free, realloc, strdup and michael@0: * calloc respectively. Function pointers of these types can be passed to the michael@0: * curl_global_init_mem() function to set user defined memory management michael@0: * callback routines. michael@0: */ michael@0: typedef void *(*curl_malloc_callback)(size_t size); michael@0: typedef void (*curl_free_callback)(void *ptr); michael@0: typedef void *(*curl_realloc_callback)(void *ptr, size_t size); michael@0: typedef char *(*curl_strdup_callback)(const char *str); michael@0: typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); michael@0: michael@0: /* the kind of data that is passed to information_callback*/ michael@0: typedef enum { michael@0: CURLINFO_TEXT = 0, michael@0: CURLINFO_HEADER_IN, /* 1 */ michael@0: CURLINFO_HEADER_OUT, /* 2 */ michael@0: CURLINFO_DATA_IN, /* 3 */ michael@0: CURLINFO_DATA_OUT, /* 4 */ michael@0: CURLINFO_SSL_DATA_IN, /* 5 */ michael@0: CURLINFO_SSL_DATA_OUT, /* 6 */ michael@0: CURLINFO_END michael@0: } curl_infotype; michael@0: michael@0: typedef int (*curl_debug_callback) michael@0: (CURL *handle, /* the handle/transfer this concerns */ michael@0: curl_infotype type, /* what kind of data */ michael@0: char *data, /* points to the data */ michael@0: size_t size, /* size of the data pointed to */ michael@0: void *userptr); /* whatever the user please */ michael@0: michael@0: /* All possible error codes from all sorts of curl functions. Future versions michael@0: may return other values, stay prepared. michael@0: michael@0: Always add new return codes last. Never *EVER* remove any. The return michael@0: codes must remain the same! michael@0: */ michael@0: michael@0: typedef enum { michael@0: CURLE_OK = 0, michael@0: CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ michael@0: CURLE_FAILED_INIT, /* 2 */ michael@0: CURLE_URL_MALFORMAT, /* 3 */ michael@0: CURLE_OBSOLETE4, /* 4 - NOT USED */ michael@0: CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ michael@0: CURLE_COULDNT_RESOLVE_HOST, /* 6 */ michael@0: CURLE_COULDNT_CONNECT, /* 7 */ michael@0: CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ michael@0: CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server michael@0: due to lack of access - when login fails michael@0: this is not returned. */ michael@0: CURLE_OBSOLETE10, /* 10 - NOT USED */ michael@0: CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ michael@0: CURLE_OBSOLETE12, /* 12 - NOT USED */ michael@0: CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ michael@0: CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ michael@0: CURLE_FTP_CANT_GET_HOST, /* 15 */ michael@0: CURLE_OBSOLETE16, /* 16 - NOT USED */ michael@0: CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ michael@0: CURLE_PARTIAL_FILE, /* 18 */ michael@0: CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ michael@0: CURLE_OBSOLETE20, /* 20 - NOT USED */ michael@0: CURLE_QUOTE_ERROR, /* 21 - quote command failure */ michael@0: CURLE_HTTP_RETURNED_ERROR, /* 22 */ michael@0: CURLE_WRITE_ERROR, /* 23 */ michael@0: CURLE_OBSOLETE24, /* 24 - NOT USED */ michael@0: CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ michael@0: CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ michael@0: CURLE_OUT_OF_MEMORY, /* 27 */ michael@0: /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error michael@0: instead of a memory allocation error if CURL_DOES_CONVERSIONS michael@0: is defined michael@0: */ michael@0: CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ michael@0: CURLE_OBSOLETE29, /* 29 - NOT USED */ michael@0: CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ michael@0: CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ michael@0: CURLE_OBSOLETE32, /* 32 - NOT USED */ michael@0: CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ michael@0: CURLE_HTTP_POST_ERROR, /* 34 */ michael@0: CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ michael@0: CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ michael@0: CURLE_FILE_COULDNT_READ_FILE, /* 37 */ michael@0: CURLE_LDAP_CANNOT_BIND, /* 38 */ michael@0: CURLE_LDAP_SEARCH_FAILED, /* 39 */ michael@0: CURLE_OBSOLETE40, /* 40 - NOT USED */ michael@0: CURLE_FUNCTION_NOT_FOUND, /* 41 */ michael@0: CURLE_ABORTED_BY_CALLBACK, /* 42 */ michael@0: CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ michael@0: CURLE_OBSOLETE44, /* 44 - NOT USED */ michael@0: CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ michael@0: CURLE_OBSOLETE46, /* 46 - NOT USED */ michael@0: CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ michael@0: CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ michael@0: CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ michael@0: CURLE_OBSOLETE50, /* 50 - NOT USED */ michael@0: CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint michael@0: wasn't verified fine */ michael@0: CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ michael@0: CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ michael@0: CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as michael@0: default */ michael@0: CURLE_SEND_ERROR, /* 55 - failed sending network data */ michael@0: CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ michael@0: CURLE_OBSOLETE57, /* 57 - NOT IN USE */ michael@0: CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ michael@0: CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ michael@0: CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ michael@0: CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ michael@0: CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ michael@0: CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ michael@0: CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ michael@0: CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind michael@0: that failed */ michael@0: CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ michael@0: CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not michael@0: accepted and we failed to login */ michael@0: CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ michael@0: CURLE_TFTP_PERM, /* 69 - permission problem on server */ michael@0: CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ michael@0: CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ michael@0: CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ michael@0: CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ michael@0: CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ michael@0: CURLE_CONV_FAILED, /* 75 - conversion failed */ michael@0: CURLE_CONV_REQD, /* 76 - caller must register conversion michael@0: callbacks using curl_easy_setopt options michael@0: CURLOPT_CONV_FROM_NETWORK_FUNCTION, michael@0: CURLOPT_CONV_TO_NETWORK_FUNCTION, and michael@0: CURLOPT_CONV_FROM_UTF8_FUNCTION */ michael@0: CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing michael@0: or wrong format */ michael@0: CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ michael@0: CURLE_SSH, /* 79 - error from the SSH layer, somewhat michael@0: generic so the error message will be of michael@0: interest when this has happened */ michael@0: michael@0: CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL michael@0: connection */ michael@0: CURLE_AGAIN, /* 81 - socket is not ready for send/recv, michael@0: wait till it's ready and try again (Added michael@0: in 7.18.2) */ michael@0: CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or michael@0: wrong format (Added in 7.19.0) */ michael@0: CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in michael@0: 7.19.0) */ michael@0: CURL_LAST /* never use! */ michael@0: } CURLcode; michael@0: michael@0: #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all michael@0: the obsolete stuff removed! */ michael@0: michael@0: /* Backwards compatibility with older names */ michael@0: michael@0: /* The following were added in 7.17.1 */ michael@0: /* These are scheduled to disappear by 2009 */ michael@0: #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION michael@0: michael@0: /* The following were added in 7.17.0 */ michael@0: /* These are scheduled to disappear by 2009 */ michael@0: #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ michael@0: #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 michael@0: #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 michael@0: #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 michael@0: #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 michael@0: #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 michael@0: #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 michael@0: #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 michael@0: #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 michael@0: #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 michael@0: #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 michael@0: #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 michael@0: #define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 michael@0: michael@0: #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED michael@0: #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE michael@0: #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR michael@0: #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL michael@0: #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS michael@0: #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR michael@0: #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED michael@0: michael@0: /* The following were added earlier */ michael@0: michael@0: #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT michael@0: michael@0: #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR michael@0: #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED michael@0: #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED michael@0: michael@0: #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE michael@0: #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME michael@0: michael@0: /* This was the error code 50 in 7.7.3 and a few earlier versions, this michael@0: is no longer used by libcurl but is instead #defined here only to not michael@0: make programs break */ michael@0: #define CURLE_ALREADY_COMPLETE 99999 michael@0: michael@0: #endif /*!CURL_NO_OLDIES*/ michael@0: michael@0: /* This prototype applies to all conversion callbacks */ michael@0: typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); michael@0: michael@0: typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ michael@0: void *ssl_ctx, /* actually an michael@0: OpenSSL SSL_CTX */ michael@0: void *userptr); michael@0: michael@0: typedef enum { michael@0: CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use michael@0: CONNECT HTTP/1.1 */ michael@0: CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT michael@0: HTTP/1.0 */ michael@0: CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already michael@0: in 7.10 */ michael@0: CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ michael@0: CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ michael@0: CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the michael@0: host name rather than the IP address. added michael@0: in 7.18.0 */ michael@0: } curl_proxytype; /* this enum was added in 7.10 */ michael@0: michael@0: #define CURLAUTH_NONE 0 /* nothing */ michael@0: #define CURLAUTH_BASIC (1<<0) /* Basic (default) */ michael@0: #define CURLAUTH_DIGEST (1<<1) /* Digest */ michael@0: #define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ michael@0: #define CURLAUTH_NTLM (1<<3) /* NTLM */ michael@0: #define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ michael@0: #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ michael@0: #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) michael@0: michael@0: #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ michael@0: #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ michael@0: #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ michael@0: #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ michael@0: #define CURLSSH_AUTH_HOST (1<<2) /* host key files */ michael@0: #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ michael@0: #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY michael@0: michael@0: #define CURL_ERROR_SIZE 256 michael@0: michael@0: struct curl_khkey { michael@0: const char *key; /* points to a zero-terminated string encoded with base64 michael@0: if len is zero, otherwise to the "raw" data */ michael@0: size_t len; michael@0: enum type { michael@0: CURLKHTYPE_UNKNOWN, michael@0: CURLKHTYPE_RSA1, michael@0: CURLKHTYPE_RSA, michael@0: CURLKHTYPE_DSS michael@0: } keytype; michael@0: }; michael@0: michael@0: /* this is the set of return values expected from the curl_sshkeycallback michael@0: callback */ michael@0: enum curl_khstat { michael@0: CURLKHSTAT_FINE_ADD_TO_FILE, michael@0: CURLKHSTAT_FINE, michael@0: CURLKHSTAT_REJECT, /* reject the connection, return an error */ michael@0: CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so michael@0: this causes a CURLE_DEFER error but otherwise the michael@0: connection will be left intact etc */ michael@0: CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ michael@0: }; michael@0: michael@0: /* this is the set of status codes pass in to the callback */ michael@0: enum curl_khmatch { michael@0: CURLKHMATCH_OK, /* match */ michael@0: CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ michael@0: CURLKHMATCH_MISSING, /* no matching host/key found */ michael@0: CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ michael@0: }; michael@0: michael@0: typedef int michael@0: (*curl_sshkeycallback) (CURL *easy, /* easy handle */ michael@0: const struct curl_khkey *knownkey, /* known */ michael@0: const struct curl_khkey *foundkey, /* found */ michael@0: enum curl_khmatch, /* libcurl's view on the keys */ michael@0: void *clientp); /* custom pointer passed from app */ michael@0: michael@0: /* parameter for the CURLOPT_USE_SSL option */ michael@0: typedef enum { michael@0: CURLUSESSL_NONE, /* do not attempt to use SSL */ michael@0: CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ michael@0: CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ michael@0: CURLUSESSL_ALL, /* SSL for all communication or fail */ michael@0: CURLUSESSL_LAST /* not an option, never use */ michael@0: } curl_usessl; michael@0: michael@0: #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all michael@0: the obsolete stuff removed! */ michael@0: michael@0: /* Backwards compatibility with older names */ michael@0: /* These are scheduled to disappear by 2009 */ michael@0: michael@0: #define CURLFTPSSL_NONE CURLUSESSL_NONE michael@0: #define CURLFTPSSL_TRY CURLUSESSL_TRY michael@0: #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL michael@0: #define CURLFTPSSL_ALL CURLUSESSL_ALL michael@0: #define CURLFTPSSL_LAST CURLUSESSL_LAST michael@0: #define curl_ftpssl curl_usessl michael@0: #endif /*!CURL_NO_OLDIES*/ michael@0: michael@0: /* parameter for the CURLOPT_FTP_SSL_CCC option */ michael@0: typedef enum { michael@0: CURLFTPSSL_CCC_NONE, /* do not send CCC */ michael@0: CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ michael@0: CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ michael@0: CURLFTPSSL_CCC_LAST /* not an option, never use */ michael@0: } curl_ftpccc; michael@0: michael@0: /* parameter for the CURLOPT_FTPSSLAUTH option */ michael@0: typedef enum { michael@0: CURLFTPAUTH_DEFAULT, /* let libcurl decide */ michael@0: CURLFTPAUTH_SSL, /* use "AUTH SSL" */ michael@0: CURLFTPAUTH_TLS, /* use "AUTH TLS" */ michael@0: CURLFTPAUTH_LAST /* not an option, never use */ michael@0: } curl_ftpauth; michael@0: michael@0: /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ michael@0: typedef enum { michael@0: CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ michael@0: CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD michael@0: again if MKD succeeded, for SFTP this does michael@0: similar magic */ michael@0: CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD michael@0: again even if MKD failed! */ michael@0: CURLFTP_CREATE_DIR_LAST /* not an option, never use */ michael@0: } curl_ftpcreatedir; michael@0: michael@0: /* parameter for the CURLOPT_FTP_FILEMETHOD option */ michael@0: typedef enum { michael@0: CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ michael@0: CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ michael@0: CURLFTPMETHOD_NOCWD, /* no CWD at all */ michael@0: CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ michael@0: CURLFTPMETHOD_LAST /* not an option, never use */ michael@0: } curl_ftpmethod; michael@0: michael@0: /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ michael@0: #define CURLPROTO_HTTP (1<<0) michael@0: #define CURLPROTO_HTTPS (1<<1) michael@0: #define CURLPROTO_FTP (1<<2) michael@0: #define CURLPROTO_FTPS (1<<3) michael@0: #define CURLPROTO_SCP (1<<4) michael@0: #define CURLPROTO_SFTP (1<<5) michael@0: #define CURLPROTO_TELNET (1<<6) michael@0: #define CURLPROTO_LDAP (1<<7) michael@0: #define CURLPROTO_LDAPS (1<<8) michael@0: #define CURLPROTO_DICT (1<<9) michael@0: #define CURLPROTO_FILE (1<<10) michael@0: #define CURLPROTO_TFTP (1<<11) michael@0: #define CURLPROTO_ALL (~0) /* enable everything */ michael@0: michael@0: /* long may be 32 or 64 bits, but we should never depend on anything else michael@0: but 32 */ michael@0: #define CURLOPTTYPE_LONG 0 michael@0: #define CURLOPTTYPE_OBJECTPOINT 10000 michael@0: #define CURLOPTTYPE_FUNCTIONPOINT 20000 michael@0: #define CURLOPTTYPE_OFF_T 30000 michael@0: michael@0: /* name is uppercase CURLOPT_, michael@0: type is one of the defined CURLOPTTYPE_ michael@0: number is unique identifier */ michael@0: #ifdef CINIT michael@0: #undef CINIT michael@0: #endif michael@0: michael@0: #ifdef CURL_ISOCPP michael@0: #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number michael@0: #else michael@0: /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ michael@0: #define LONG CURLOPTTYPE_LONG michael@0: #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT michael@0: #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT michael@0: #define OFF_T CURLOPTTYPE_OFF_T michael@0: #define CINIT(name,type,number) CURLOPT_/**/name = type + number michael@0: #endif michael@0: michael@0: /* michael@0: * This macro-mania below setups the CURLOPT_[what] enum, to be used with michael@0: * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] michael@0: * word. michael@0: */ michael@0: michael@0: typedef enum { michael@0: /* This is the FILE * or void * the regular output should be written to. */ michael@0: CINIT(FILE, OBJECTPOINT, 1), michael@0: michael@0: /* The full URL to get/put */ michael@0: CINIT(URL, OBJECTPOINT, 2), michael@0: michael@0: /* Port number to connect to, if other than default. */ michael@0: CINIT(PORT, LONG, 3), michael@0: michael@0: /* Name of proxy to use. */ michael@0: CINIT(PROXY, OBJECTPOINT, 4), michael@0: michael@0: /* "name:password" to use when fetching. */ michael@0: CINIT(USERPWD, OBJECTPOINT, 5), michael@0: michael@0: /* "name:password" to use with proxy. */ michael@0: CINIT(PROXYUSERPWD, OBJECTPOINT, 6), michael@0: michael@0: /* Range to get, specified as an ASCII string. */ michael@0: CINIT(RANGE, OBJECTPOINT, 7), michael@0: michael@0: /* not used */ michael@0: michael@0: /* Specified file stream to upload from (use as input): */ michael@0: CINIT(INFILE, OBJECTPOINT, 9), michael@0: michael@0: /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE michael@0: * bytes big. If this is not used, error messages go to stderr instead: */ michael@0: CINIT(ERRORBUFFER, OBJECTPOINT, 10), michael@0: michael@0: /* Function that will be called to store the output (instead of fwrite). The michael@0: * parameters will use fwrite() syntax, make sure to follow them. */ michael@0: CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), michael@0: michael@0: /* Function that will be called to read the input (instead of fread). The michael@0: * parameters will use fread() syntax, make sure to follow them. */ michael@0: CINIT(READFUNCTION, FUNCTIONPOINT, 12), michael@0: michael@0: /* Time-out the read operation after this amount of seconds */ michael@0: CINIT(TIMEOUT, LONG, 13), michael@0: michael@0: /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about michael@0: * how large the file being sent really is. That allows better error michael@0: * checking and better verifies that the upload was successful. -1 means michael@0: * unknown size. michael@0: * michael@0: * For large file support, there is also a _LARGE version of the key michael@0: * which takes an off_t type, allowing platforms with larger off_t michael@0: * sizes to handle larger files. See below for INFILESIZE_LARGE. michael@0: */ michael@0: CINIT(INFILESIZE, LONG, 14), michael@0: michael@0: /* POST static input fields. */ michael@0: CINIT(POSTFIELDS, OBJECTPOINT, 15), michael@0: michael@0: /* Set the referrer page (needed by some CGIs) */ michael@0: CINIT(REFERER, OBJECTPOINT, 16), michael@0: michael@0: /* Set the FTP PORT string (interface name, named or numerical IP address) michael@0: Use i.e '-' to use default address. */ michael@0: CINIT(FTPPORT, OBJECTPOINT, 17), michael@0: michael@0: /* Set the User-Agent string (examined by some CGIs) */ michael@0: CINIT(USERAGENT, OBJECTPOINT, 18), michael@0: michael@0: /* If the download receives less than "low speed limit" bytes/second michael@0: * during "low speed time" seconds, the operations is aborted. michael@0: * You could i.e if you have a pretty high speed connection, abort if michael@0: * it is less than 2000 bytes/sec during 20 seconds. michael@0: */ michael@0: michael@0: /* Set the "low speed limit" */ michael@0: CINIT(LOW_SPEED_LIMIT, LONG, 19), michael@0: michael@0: /* Set the "low speed time" */ michael@0: CINIT(LOW_SPEED_TIME, LONG, 20), michael@0: michael@0: /* Set the continuation offset. michael@0: * michael@0: * Note there is also a _LARGE version of this key which uses michael@0: * off_t types, allowing for large file offsets on platforms which michael@0: * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. michael@0: */ michael@0: CINIT(RESUME_FROM, LONG, 21), michael@0: michael@0: /* Set cookie in request: */ michael@0: CINIT(COOKIE, OBJECTPOINT, 22), michael@0: michael@0: /* This points to a linked list of headers, struct curl_slist kind */ michael@0: CINIT(HTTPHEADER, OBJECTPOINT, 23), michael@0: michael@0: /* This points to a linked list of post entries, struct curl_httppost */ michael@0: CINIT(HTTPPOST, OBJECTPOINT, 24), michael@0: michael@0: /* name of the file keeping your private SSL-certificate */ michael@0: CINIT(SSLCERT, OBJECTPOINT, 25), michael@0: michael@0: /* password for the SSL or SSH private key */ michael@0: CINIT(KEYPASSWD, OBJECTPOINT, 26), michael@0: michael@0: /* send TYPE parameter? */ michael@0: CINIT(CRLF, LONG, 27), michael@0: michael@0: /* send linked-list of QUOTE commands */ michael@0: CINIT(QUOTE, OBJECTPOINT, 28), michael@0: michael@0: /* send FILE * or void * to store headers to, if you use a callback it michael@0: is simply passed to the callback unmodified */ michael@0: CINIT(WRITEHEADER, OBJECTPOINT, 29), michael@0: michael@0: /* point to a file to read the initial cookies from, also enables michael@0: "cookie awareness" */ michael@0: CINIT(COOKIEFILE, OBJECTPOINT, 31), michael@0: michael@0: /* What version to specifically try to use. michael@0: See CURL_SSLVERSION defines below. */ michael@0: CINIT(SSLVERSION, LONG, 32), michael@0: michael@0: /* What kind of HTTP time condition to use, see defines */ michael@0: CINIT(TIMECONDITION, LONG, 33), michael@0: michael@0: /* Time to use with the above condition. Specified in number of seconds michael@0: since 1 Jan 1970 */ michael@0: CINIT(TIMEVALUE, LONG, 34), michael@0: michael@0: /* 35 = OBSOLETE */ michael@0: michael@0: /* Custom request, for customizing the get command like michael@0: HTTP: DELETE, TRACE and others michael@0: FTP: to use a different list command michael@0: */ michael@0: CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), michael@0: michael@0: /* HTTP request, for odd commands like DELETE, TRACE and others */ michael@0: CINIT(STDERR, OBJECTPOINT, 37), michael@0: michael@0: /* 38 is not used */ michael@0: michael@0: /* send linked-list of post-transfer QUOTE commands */ michael@0: CINIT(POSTQUOTE, OBJECTPOINT, 39), michael@0: michael@0: /* Pass a pointer to string of the output using full variable-replacement michael@0: as described elsewhere. */ michael@0: CINIT(WRITEINFO, OBJECTPOINT, 40), michael@0: michael@0: CINIT(VERBOSE, LONG, 41), /* talk a lot */ michael@0: CINIT(HEADER, LONG, 42), /* throw the header out too */ michael@0: CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ michael@0: CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ michael@0: CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ michael@0: CINIT(UPLOAD, LONG, 46), /* this is an upload */ michael@0: CINIT(POST, LONG, 47), /* HTTP POST method */ michael@0: CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ michael@0: michael@0: CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ michael@0: michael@0: /* Specify whether to read the user+password from the .netrc or the URL. michael@0: * This must be one of the CURL_NETRC_* enums below. */ michael@0: CINIT(NETRC, LONG, 51), michael@0: michael@0: CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ michael@0: michael@0: CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ michael@0: CINIT(PUT, LONG, 54), /* HTTP PUT */ michael@0: michael@0: /* 55 = OBSOLETE */ michael@0: michael@0: /* Function that will be called instead of the internal progress display michael@0: * function. This function should be defined as the curl_progress_callback michael@0: * prototype defines. */ michael@0: CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), michael@0: michael@0: /* Data passed to the progress callback */ michael@0: CINIT(PROGRESSDATA, OBJECTPOINT, 57), michael@0: michael@0: /* We want the referrer field set automatically when following locations */ michael@0: CINIT(AUTOREFERER, LONG, 58), michael@0: michael@0: /* Port of the proxy, can be set in the proxy string as well with: michael@0: "[host]:[port]" */ michael@0: CINIT(PROXYPORT, LONG, 59), michael@0: michael@0: /* size of the POST input data, if strlen() is not good to use */ michael@0: CINIT(POSTFIELDSIZE, LONG, 60), michael@0: michael@0: /* tunnel non-http operations through a HTTP proxy */ michael@0: CINIT(HTTPPROXYTUNNEL, LONG, 61), michael@0: michael@0: /* Set the interface string to use as outgoing network interface */ michael@0: CINIT(INTERFACE, OBJECTPOINT, 62), michael@0: michael@0: /* Set the krb4/5 security level, this also enables krb4/5 awareness. This michael@0: * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string michael@0: * is set but doesn't match one of these, 'private' will be used. */ michael@0: CINIT(KRBLEVEL, OBJECTPOINT, 63), michael@0: michael@0: /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ michael@0: CINIT(SSL_VERIFYPEER, LONG, 64), michael@0: michael@0: /* The CApath or CAfile used to validate the peer certificate michael@0: this option is used only if SSL_VERIFYPEER is true */ michael@0: CINIT(CAINFO, OBJECTPOINT, 65), michael@0: michael@0: /* 66 = OBSOLETE */ michael@0: /* 67 = OBSOLETE */ michael@0: michael@0: /* Maximum number of http redirects to follow */ michael@0: CINIT(MAXREDIRS, LONG, 68), michael@0: michael@0: /* Pass a long set to 1 to get the date of the requested document (if michael@0: possible)! Pass a zero to shut it off. */ michael@0: CINIT(FILETIME, LONG, 69), michael@0: michael@0: /* This points to a linked list of telnet options */ michael@0: CINIT(TELNETOPTIONS, OBJECTPOINT, 70), michael@0: michael@0: /* Max amount of cached alive connections */ michael@0: CINIT(MAXCONNECTS, LONG, 71), michael@0: michael@0: /* What policy to use when closing connections when the cache is filled michael@0: up */ michael@0: CINIT(CLOSEPOLICY, LONG, 72), michael@0: michael@0: /* 73 = OBSOLETE */ michael@0: michael@0: /* Set to explicitly use a new connection for the upcoming transfer. michael@0: Do not use this unless you're absolutely sure of this, as it makes the michael@0: operation slower and is less friendly for the network. */ michael@0: CINIT(FRESH_CONNECT, LONG, 74), michael@0: michael@0: /* Set to explicitly forbid the upcoming transfer's connection to be re-used michael@0: when done. Do not use this unless you're absolutely sure of this, as it michael@0: makes the operation slower and is less friendly for the network. */ michael@0: CINIT(FORBID_REUSE, LONG, 75), michael@0: michael@0: /* Set to a file name that contains random data for libcurl to use to michael@0: seed the random engine when doing SSL connects. */ michael@0: CINIT(RANDOM_FILE, OBJECTPOINT, 76), michael@0: michael@0: /* Set to the Entropy Gathering Daemon socket pathname */ michael@0: CINIT(EGDSOCKET, OBJECTPOINT, 77), michael@0: michael@0: /* Time-out connect operations after this amount of seconds, if connects michael@0: are OK within this time, then fine... This only aborts the connect michael@0: phase. [Only works on unix-style/SIGALRM operating systems] */ michael@0: CINIT(CONNECTTIMEOUT, LONG, 78), michael@0: michael@0: /* Function that will be called to store headers (instead of fwrite). The michael@0: * parameters will use fwrite() syntax, make sure to follow them. */ michael@0: CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), michael@0: michael@0: /* Set this to force the HTTP request to get back to GET. Only really usable michael@0: if POST, PUT or a custom request have been used first. michael@0: */ michael@0: CINIT(HTTPGET, LONG, 80), michael@0: michael@0: /* Set if we should verify the Common name from the peer certificate in ssl michael@0: * handshake, set 1 to check existence, 2 to ensure that it matches the michael@0: * provided hostname. */ michael@0: CINIT(SSL_VERIFYHOST, LONG, 81), michael@0: michael@0: /* Specify which file name to write all known cookies in after completed michael@0: operation. Set file name to "-" (dash) to make it go to stdout. */ michael@0: CINIT(COOKIEJAR, OBJECTPOINT, 82), michael@0: michael@0: /* Specify which SSL ciphers to use */ michael@0: CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), michael@0: michael@0: /* Specify which HTTP version to use! This must be set to one of the michael@0: CURL_HTTP_VERSION* enums set below. */ michael@0: CINIT(HTTP_VERSION, LONG, 84), michael@0: michael@0: /* Specifically switch on or off the FTP engine's use of the EPSV command. By michael@0: default, that one will always be attempted before the more traditional michael@0: PASV command. */ michael@0: CINIT(FTP_USE_EPSV, LONG, 85), michael@0: michael@0: /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ michael@0: CINIT(SSLCERTTYPE, OBJECTPOINT, 86), michael@0: michael@0: /* name of the file keeping your private SSL-key */ michael@0: CINIT(SSLKEY, OBJECTPOINT, 87), michael@0: michael@0: /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ michael@0: CINIT(SSLKEYTYPE, OBJECTPOINT, 88), michael@0: michael@0: /* crypto engine for the SSL-sub system */ michael@0: CINIT(SSLENGINE, OBJECTPOINT, 89), michael@0: michael@0: /* set the crypto engine for the SSL-sub system as default michael@0: the param has no meaning... michael@0: */ michael@0: CINIT(SSLENGINE_DEFAULT, LONG, 90), michael@0: michael@0: /* Non-zero value means to use the global dns cache */ michael@0: CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ michael@0: michael@0: /* DNS cache timeout */ michael@0: CINIT(DNS_CACHE_TIMEOUT, LONG, 92), michael@0: michael@0: /* send linked-list of pre-transfer QUOTE commands */ michael@0: CINIT(PREQUOTE, OBJECTPOINT, 93), michael@0: michael@0: /* set the debug function */ michael@0: CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), michael@0: michael@0: /* set the data for the debug function */ michael@0: CINIT(DEBUGDATA, OBJECTPOINT, 95), michael@0: michael@0: /* mark this as start of a cookie session */ michael@0: CINIT(COOKIESESSION, LONG, 96), michael@0: michael@0: /* The CApath directory used to validate the peer certificate michael@0: this option is used only if SSL_VERIFYPEER is true */ michael@0: CINIT(CAPATH, OBJECTPOINT, 97), michael@0: michael@0: /* Instruct libcurl to use a smaller receive buffer */ michael@0: CINIT(BUFFERSIZE, LONG, 98), michael@0: michael@0: /* Instruct libcurl to not use any signal/alarm handlers, even when using michael@0: timeouts. This option is useful for multi-threaded applications. michael@0: See libcurl-the-guide for more background information. */ michael@0: CINIT(NOSIGNAL, LONG, 99), michael@0: michael@0: /* Provide a CURLShare for mutexing non-ts data */ michael@0: CINIT(SHARE, OBJECTPOINT, 100), michael@0: michael@0: /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), michael@0: CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ michael@0: CINIT(PROXYTYPE, LONG, 101), michael@0: michael@0: /* Set the Accept-Encoding string. Use this to tell a server you would like michael@0: the response to be compressed. */ michael@0: CINIT(ENCODING, OBJECTPOINT, 102), michael@0: michael@0: /* Set pointer to private data */ michael@0: CINIT(PRIVATE, OBJECTPOINT, 103), michael@0: michael@0: /* Set aliases for HTTP 200 in the HTTP Response header */ michael@0: CINIT(HTTP200ALIASES, OBJECTPOINT, 104), michael@0: michael@0: /* Continue to send authentication (user+password) when following locations, michael@0: even when hostname changed. This can potentially send off the name michael@0: and password to whatever host the server decides. */ michael@0: CINIT(UNRESTRICTED_AUTH, LONG, 105), michael@0: michael@0: /* Specifically switch on or off the FTP engine's use of the EPRT command ( it michael@0: also disables the LPRT attempt). By default, those ones will always be michael@0: attempted before the good old traditional PORT command. */ michael@0: CINIT(FTP_USE_EPRT, LONG, 106), michael@0: michael@0: /* Set this to a bitmask value to enable the particular authentications michael@0: methods you like. Use this in combination with CURLOPT_USERPWD. michael@0: Note that setting multiple bits may cause extra network round-trips. */ michael@0: CINIT(HTTPAUTH, LONG, 107), michael@0: michael@0: /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx michael@0: in second argument. The function must be matching the michael@0: curl_ssl_ctx_callback proto. */ michael@0: CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), michael@0: michael@0: /* Set the userdata for the ssl context callback function's third michael@0: argument */ michael@0: CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), michael@0: michael@0: /* FTP Option that causes missing dirs to be created on the remote server. michael@0: In 7.19.4 we introduced the convenience enums for this option using the michael@0: CURLFTP_CREATE_DIR prefix. michael@0: */ michael@0: CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), michael@0: michael@0: /* Set this to a bitmask value to enable the particular authentications michael@0: methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. michael@0: Note that setting multiple bits may cause extra network round-trips. */ michael@0: CINIT(PROXYAUTH, LONG, 111), michael@0: michael@0: /* FTP option that changes the timeout, in seconds, associated with michael@0: getting a response. This is different from transfer timeout time and michael@0: essentially places a demand on the FTP server to acknowledge commands michael@0: in a timely manner. */ michael@0: CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), michael@0: michael@0: /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to michael@0: tell libcurl to resolve names to those IP versions only. This only has michael@0: affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ michael@0: CINIT(IPRESOLVE, LONG, 113), michael@0: michael@0: /* Set this option to limit the size of a file that will be downloaded from michael@0: an HTTP or FTP server. michael@0: michael@0: Note there is also _LARGE version which adds large file support for michael@0: platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ michael@0: CINIT(MAXFILESIZE, LONG, 114), michael@0: michael@0: /* See the comment for INFILESIZE above, but in short, specifies michael@0: * the size of the file being uploaded. -1 means unknown. michael@0: */ michael@0: CINIT(INFILESIZE_LARGE, OFF_T, 115), michael@0: michael@0: /* Sets the continuation offset. There is also a LONG version of this; michael@0: * look above for RESUME_FROM. michael@0: */ michael@0: CINIT(RESUME_FROM_LARGE, OFF_T, 116), michael@0: michael@0: /* Sets the maximum size of data that will be downloaded from michael@0: * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. michael@0: */ michael@0: CINIT(MAXFILESIZE_LARGE, OFF_T, 117), michael@0: michael@0: /* Set this option to the file name of your .netrc file you want libcurl michael@0: to parse (using the CURLOPT_NETRC option). If not set, libcurl will do michael@0: a poor attempt to find the user's home directory and check for a .netrc michael@0: file in there. */ michael@0: CINIT(NETRC_FILE, OBJECTPOINT, 118), michael@0: michael@0: /* Enable SSL/TLS for FTP, pick one of: michael@0: CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise michael@0: CURLFTPSSL_CONTROL - SSL for the control connection or fail michael@0: CURLFTPSSL_ALL - SSL for all communication or fail michael@0: */ michael@0: CINIT(USE_SSL, LONG, 119), michael@0: michael@0: /* The _LARGE version of the standard POSTFIELDSIZE option */ michael@0: CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), michael@0: michael@0: /* Enable/disable the TCP Nagle algorithm */ michael@0: CINIT(TCP_NODELAY, LONG, 121), michael@0: michael@0: /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ michael@0: /* 123 OBSOLETE. Gone in 7.16.0 */ michael@0: /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ michael@0: /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ michael@0: /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ michael@0: /* 127 OBSOLETE. Gone in 7.16.0 */ michael@0: /* 128 OBSOLETE. Gone in 7.16.0 */ michael@0: michael@0: /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option michael@0: can be used to change libcurl's default action which is to first try michael@0: "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK michael@0: response has been received. michael@0: michael@0: Available parameters are: michael@0: CURLFTPAUTH_DEFAULT - let libcurl decide michael@0: CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS michael@0: CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL michael@0: */ michael@0: CINIT(FTPSSLAUTH, LONG, 129), michael@0: michael@0: CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), michael@0: CINIT(IOCTLDATA, OBJECTPOINT, 131), michael@0: michael@0: /* 132 OBSOLETE. Gone in 7.16.0 */ michael@0: /* 133 OBSOLETE. Gone in 7.16.0 */ michael@0: michael@0: /* zero terminated string for pass on to the FTP server when asked for michael@0: "account" info */ michael@0: CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), michael@0: michael@0: /* feed cookies into cookie engine */ michael@0: CINIT(COOKIELIST, OBJECTPOINT, 135), michael@0: michael@0: /* ignore Content-Length */ michael@0: CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), michael@0: michael@0: /* Set to non-zero to skip the IP address received in a 227 PASV FTP server michael@0: response. Typically used for FTP-SSL purposes but is not restricted to michael@0: that. libcurl will then instead use the same IP address it used for the michael@0: control connection. */ michael@0: CINIT(FTP_SKIP_PASV_IP, LONG, 137), michael@0: michael@0: /* Select "file method" to use when doing FTP, see the curl_ftpmethod michael@0: above. */ michael@0: CINIT(FTP_FILEMETHOD, LONG, 138), michael@0: michael@0: /* Local port number to bind the socket to */ michael@0: CINIT(LOCALPORT, LONG, 139), michael@0: michael@0: /* Number of ports to try, including the first one set with LOCALPORT. michael@0: Thus, setting it to 1 will make no additional attempts but the first. michael@0: */ michael@0: CINIT(LOCALPORTRANGE, LONG, 140), michael@0: michael@0: /* no transfer, set up connection and let application use the socket by michael@0: extracting it with CURLINFO_LASTSOCKET */ michael@0: CINIT(CONNECT_ONLY, LONG, 141), michael@0: michael@0: /* Function that will be called to convert from the michael@0: network encoding (instead of using the iconv calls in libcurl) */ michael@0: CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), michael@0: michael@0: /* Function that will be called to convert to the michael@0: network encoding (instead of using the iconv calls in libcurl) */ michael@0: CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), michael@0: michael@0: /* Function that will be called to convert from UTF8 michael@0: (instead of using the iconv calls in libcurl) michael@0: Note that this is used only for SSL certificate processing */ michael@0: CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), michael@0: michael@0: /* if the connection proceeds too quickly then need to slow it down */ michael@0: /* limit-rate: maximum number of bytes per second to send or receive */ michael@0: CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), michael@0: CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), michael@0: michael@0: /* Pointer to command string to send if USER/PASS fails. */ michael@0: CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), michael@0: michael@0: /* callback function for setting socket options */ michael@0: CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), michael@0: CINIT(SOCKOPTDATA, OBJECTPOINT, 149), michael@0: michael@0: /* set to 0 to disable session ID re-use for this transfer, default is michael@0: enabled (== 1) */ michael@0: CINIT(SSL_SESSIONID_CACHE, LONG, 150), michael@0: michael@0: /* allowed SSH authentication methods */ michael@0: CINIT(SSH_AUTH_TYPES, LONG, 151), michael@0: michael@0: /* Used by scp/sftp to do public/private key authentication */ michael@0: CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), michael@0: CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), michael@0: michael@0: /* Send CCC (Clear Command Channel) after authentication */ michael@0: CINIT(FTP_SSL_CCC, LONG, 154), michael@0: michael@0: /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ michael@0: CINIT(TIMEOUT_MS, LONG, 155), michael@0: CINIT(CONNECTTIMEOUT_MS, LONG, 156), michael@0: michael@0: /* set to zero to disable the libcurl's decoding and thus pass the raw body michael@0: data to the application even when it is encoded/compressed */ michael@0: CINIT(HTTP_TRANSFER_DECODING, LONG, 157), michael@0: CINIT(HTTP_CONTENT_DECODING, LONG, 158), michael@0: michael@0: /* Permission used when creating new files and directories on the remote michael@0: server for protocols that support it, SFTP/SCP/FILE */ michael@0: CINIT(NEW_FILE_PERMS, LONG, 159), michael@0: CINIT(NEW_DIRECTORY_PERMS, LONG, 160), michael@0: michael@0: /* Set the behaviour of POST when redirecting. Values must be set to one michael@0: of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ michael@0: CINIT(POSTREDIR, LONG, 161), michael@0: michael@0: /* used by scp/sftp to verify the host's public key */ michael@0: CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), michael@0: michael@0: /* Callback function for opening socket (instead of socket(2)). Optionally, michael@0: callback is able change the address or refuse to connect returning michael@0: CURL_SOCKET_BAD. The callback should have type michael@0: curl_opensocket_callback */ michael@0: CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), michael@0: CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), michael@0: michael@0: /* POST volatile input fields. */ michael@0: CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), michael@0: michael@0: /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ michael@0: CINIT(PROXY_TRANSFER_MODE, LONG, 166), michael@0: michael@0: /* Callback function for seeking in the input stream */ michael@0: CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), michael@0: CINIT(SEEKDATA, OBJECTPOINT, 168), michael@0: michael@0: /* CRL file */ michael@0: CINIT(CRLFILE, OBJECTPOINT, 169), michael@0: michael@0: /* Issuer certificate */ michael@0: CINIT(ISSUERCERT, OBJECTPOINT, 170), michael@0: michael@0: /* (IPv6) Address scope */ michael@0: CINIT(ADDRESS_SCOPE, LONG, 171), michael@0: michael@0: /* Collect certificate chain info and allow it to get retrievable with michael@0: CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only michael@0: working with OpenSSL-powered builds. */ michael@0: CINIT(CERTINFO, LONG, 172), michael@0: michael@0: /* "name" and "pwd" to use when fetching. */ michael@0: CINIT(USERNAME, OBJECTPOINT, 173), michael@0: CINIT(PASSWORD, OBJECTPOINT, 174), michael@0: michael@0: /* "name" and "pwd" to use with Proxy when fetching. */ michael@0: CINIT(PROXYUSERNAME, OBJECTPOINT, 175), michael@0: CINIT(PROXYPASSWORD, OBJECTPOINT, 176), michael@0: michael@0: /* Comma separated list of hostnames defining no-proxy zones. These should michael@0: match both hostnames directly, and hostnames within a domain. For michael@0: example, local.com will match local.com and www.local.com, but NOT michael@0: notlocal.com or www.notlocal.com. For compatibility with other michael@0: implementations of this, .local.com will be considered to be the same as michael@0: local.com. A single * is the only valid wildcard, and effectively michael@0: disables the use of proxy. */ michael@0: CINIT(NOPROXY, OBJECTPOINT, 177), michael@0: michael@0: /* block size for TFTP transfers */ michael@0: CINIT(TFTP_BLKSIZE, LONG, 178), michael@0: michael@0: /* Socks Service */ michael@0: CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), michael@0: michael@0: /* Socks Service */ michael@0: CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), michael@0: michael@0: /* set the bitmask for the protocols that are allowed to be used for the michael@0: transfer, which thus helps the app which takes URLs from users or other michael@0: external inputs and want to restrict what protocol(s) to deal michael@0: with. Defaults to CURLPROTO_ALL. */ michael@0: CINIT(PROTOCOLS, LONG, 181), michael@0: michael@0: /* set the bitmask for the protocols that libcurl is allowed to follow to, michael@0: as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs michael@0: to be set in both bitmasks to be allowed to get redirected to. Defaults michael@0: to all protocols except FILE and SCP. */ michael@0: CINIT(REDIR_PROTOCOLS, LONG, 182), michael@0: michael@0: /* set the SSH knownhost file name to use */ michael@0: CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), michael@0: michael@0: /* set the SSH host key callback, must point to a curl_sshkeycallback michael@0: function */ michael@0: CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), michael@0: michael@0: /* set the SSH host key callback custom pointer */ michael@0: CINIT(SSH_KEYDATA, OBJECTPOINT, 185), michael@0: michael@0: CURLOPT_LASTENTRY /* the last unused */ michael@0: } CURLoption; michael@0: michael@0: #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all michael@0: the obsolete stuff removed! */ michael@0: michael@0: /* Backwards compatibility with older names */ michael@0: /* These are scheduled to disappear by 2011 */ michael@0: michael@0: /* This was added in version 7.19.1 */ michael@0: #define CURLOPT_POST301 CURLOPT_POSTREDIR michael@0: michael@0: /* These are scheduled to disappear by 2009 */ michael@0: michael@0: /* The following were added in 7.17.0 */ michael@0: #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD michael@0: #define CURLOPT_FTPAPPEND CURLOPT_APPEND michael@0: #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY michael@0: #define CURLOPT_FTP_SSL CURLOPT_USE_SSL michael@0: michael@0: /* The following were added earlier */ michael@0: michael@0: #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD michael@0: #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL michael@0: michael@0: #else michael@0: /* This is set if CURL_NO_OLDIES is defined at compile-time */ michael@0: #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ michael@0: #endif michael@0: michael@0: michael@0: /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host michael@0: name resolves addresses using more than one IP protocol version, this michael@0: option might be handy to force libcurl to use a specific IP version. */ michael@0: #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP michael@0: versions that your system allows */ michael@0: #define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ michael@0: #define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ michael@0: michael@0: /* three convenient "aliases" that follow the name scheme better */ michael@0: #define CURLOPT_WRITEDATA CURLOPT_FILE michael@0: #define CURLOPT_READDATA CURLOPT_INFILE michael@0: #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER michael@0: michael@0: /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ michael@0: enum { michael@0: CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd michael@0: like the library to choose the best possible michael@0: for us! */ michael@0: CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ michael@0: CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ michael@0: michael@0: CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ michael@0: }; michael@0: michael@0: /* These enums are for use with the CURLOPT_NETRC option. */ michael@0: enum CURL_NETRC_OPTION { michael@0: CURL_NETRC_IGNORED, /* The .netrc will never be read. michael@0: * This is the default. */ michael@0: CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred michael@0: * to one in the .netrc. */ michael@0: CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. michael@0: * Unless one is set programmatically, the .netrc michael@0: * will be queried. */ michael@0: CURL_NETRC_LAST michael@0: }; michael@0: michael@0: enum { michael@0: CURL_SSLVERSION_DEFAULT, michael@0: CURL_SSLVERSION_TLSv1, michael@0: CURL_SSLVERSION_SSLv2, michael@0: CURL_SSLVERSION_SSLv3, michael@0: michael@0: CURL_SSLVERSION_LAST /* never use, keep last */ michael@0: }; michael@0: michael@0: /* symbols to use with CURLOPT_POSTREDIR. michael@0: CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that michael@0: CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ michael@0: michael@0: #define CURL_REDIR_GET_ALL 0 michael@0: #define CURL_REDIR_POST_301 1 michael@0: #define CURL_REDIR_POST_302 2 michael@0: #define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) michael@0: michael@0: typedef enum { michael@0: CURL_TIMECOND_NONE, michael@0: michael@0: CURL_TIMECOND_IFMODSINCE, michael@0: CURL_TIMECOND_IFUNMODSINCE, michael@0: CURL_TIMECOND_LASTMOD, michael@0: michael@0: CURL_TIMECOND_LAST michael@0: } curl_TimeCond; michael@0: michael@0: michael@0: /* curl_strequal() and curl_strnequal() are subject for removal in a future michael@0: libcurl, see lib/README.curlx for details */ michael@0: CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); michael@0: CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); michael@0: michael@0: /* name is uppercase CURLFORM_ */ michael@0: #ifdef CFINIT michael@0: #undef CFINIT michael@0: #endif michael@0: michael@0: #ifdef CURL_ISOCPP michael@0: #define CFINIT(name) CURLFORM_ ## name michael@0: #else michael@0: /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ michael@0: #define CFINIT(name) CURLFORM_/**/name michael@0: #endif michael@0: michael@0: typedef enum { michael@0: CFINIT(NOTHING), /********* the first one is unused ************/ michael@0: michael@0: /* */ michael@0: CFINIT(COPYNAME), michael@0: CFINIT(PTRNAME), michael@0: CFINIT(NAMELENGTH), michael@0: CFINIT(COPYCONTENTS), michael@0: CFINIT(PTRCONTENTS), michael@0: CFINIT(CONTENTSLENGTH), michael@0: CFINIT(FILECONTENT), michael@0: CFINIT(ARRAY), michael@0: CFINIT(OBSOLETE), michael@0: CFINIT(FILE), michael@0: michael@0: CFINIT(BUFFER), michael@0: CFINIT(BUFFERPTR), michael@0: CFINIT(BUFFERLENGTH), michael@0: michael@0: CFINIT(CONTENTTYPE), michael@0: CFINIT(CONTENTHEADER), michael@0: CFINIT(FILENAME), michael@0: CFINIT(END), michael@0: CFINIT(OBSOLETE2), michael@0: michael@0: CFINIT(STREAM), michael@0: michael@0: CURLFORM_LASTENTRY /* the last unused */ michael@0: } CURLformoption; michael@0: michael@0: #undef CFINIT /* done */ michael@0: michael@0: /* structure to be used as parameter for CURLFORM_ARRAY */ michael@0: struct curl_forms { michael@0: CURLformoption option; michael@0: const char *value; michael@0: }; michael@0: michael@0: /* use this for multipart formpost building */ michael@0: /* Returns code for curl_formadd() michael@0: * michael@0: * Returns: michael@0: * CURL_FORMADD_OK on success michael@0: * CURL_FORMADD_MEMORY if the FormInfo allocation fails michael@0: * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form michael@0: * CURL_FORMADD_NULL if a null pointer was given for a char michael@0: * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed michael@0: * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used michael@0: * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) michael@0: * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated michael@0: * CURL_FORMADD_MEMORY if some allocation for string copying failed. michael@0: * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array michael@0: * michael@0: ***************************************************************************/ michael@0: typedef enum { michael@0: CURL_FORMADD_OK, /* first, no error */ michael@0: michael@0: CURL_FORMADD_MEMORY, michael@0: CURL_FORMADD_OPTION_TWICE, michael@0: CURL_FORMADD_NULL, michael@0: CURL_FORMADD_UNKNOWN_OPTION, michael@0: CURL_FORMADD_INCOMPLETE, michael@0: CURL_FORMADD_ILLEGAL_ARRAY, michael@0: CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ michael@0: michael@0: CURL_FORMADD_LAST /* last */ michael@0: } CURLFORMcode; michael@0: michael@0: /* michael@0: * NAME curl_formadd() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Pretty advanced function for building multi-part formposts. Each invoke michael@0: * adds one part that together construct a full post. Then use michael@0: * CURLOPT_HTTPPOST to send it off to libcurl. michael@0: */ michael@0: CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, michael@0: struct curl_httppost **last_post, michael@0: ...); michael@0: michael@0: /* michael@0: * callback function for curl_formget() michael@0: * The void *arg pointer will be the one passed as second argument to michael@0: * curl_formget(). michael@0: * The character buffer passed to it must not be freed. michael@0: * Should return the buffer length passed to it as the argument "len" on michael@0: * success. michael@0: */ michael@0: typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); michael@0: michael@0: /* michael@0: * NAME curl_formget() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Serialize a curl_httppost struct built with curl_formadd(). michael@0: * Accepts a void pointer as second argument which will be passed to michael@0: * the curl_formget_callback function. michael@0: * Returns 0 on success. michael@0: */ michael@0: CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, michael@0: curl_formget_callback append); michael@0: /* michael@0: * NAME curl_formfree() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Free a multipart formpost previously built with curl_formadd(). michael@0: */ michael@0: CURL_EXTERN void curl_formfree(struct curl_httppost *form); michael@0: michael@0: /* michael@0: * NAME curl_getenv() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Returns a malloc()'ed string that MUST be curl_free()ed after usage is michael@0: * complete. DEPRECATED - see lib/README.curlx michael@0: */ michael@0: CURL_EXTERN char *curl_getenv(const char *variable); michael@0: michael@0: /* michael@0: * NAME curl_version() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Returns a static ascii string of the libcurl version. michael@0: */ michael@0: CURL_EXTERN char *curl_version(void); michael@0: michael@0: /* michael@0: * NAME curl_easy_escape() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Escapes URL strings (converts all letters consider illegal in URLs to their michael@0: * %XX versions). This function returns a new allocated string or NULL if an michael@0: * error occurred. michael@0: */ michael@0: CURL_EXTERN char *curl_easy_escape(CURL *handle, michael@0: const char *string, michael@0: int length); michael@0: michael@0: /* the previous version: */ michael@0: CURL_EXTERN char *curl_escape(const char *string, michael@0: int length); michael@0: michael@0: michael@0: /* michael@0: * NAME curl_easy_unescape() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Unescapes URL encoding in strings (converts all %XX codes to their 8bit michael@0: * versions). This function returns a new allocated string or NULL if an error michael@0: * occurred. michael@0: * Conversion Note: On non-ASCII platforms the ASCII %XX codes are michael@0: * converted into the host encoding. michael@0: */ michael@0: CURL_EXTERN char *curl_easy_unescape(CURL *handle, michael@0: const char *string, michael@0: int length, michael@0: int *outlength); michael@0: michael@0: /* the previous version */ michael@0: CURL_EXTERN char *curl_unescape(const char *string, michael@0: int length); michael@0: michael@0: /* michael@0: * NAME curl_free() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Provided for de-allocation in the same translation unit that did the michael@0: * allocation. Added in libcurl 7.10 michael@0: */ michael@0: CURL_EXTERN void curl_free(void *p); michael@0: michael@0: /* michael@0: * NAME curl_global_init() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * curl_global_init() should be invoked exactly once for each application that michael@0: * uses libcurl and before any call of other libcurl functions. michael@0: * michael@0: * This function is not thread-safe! michael@0: */ michael@0: CURL_EXTERN CURLcode curl_global_init(long flags); michael@0: michael@0: /* michael@0: * NAME curl_global_init_mem() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * curl_global_init() or curl_global_init_mem() should be invoked exactly once michael@0: * for each application that uses libcurl. This function can be used to michael@0: * initialize libcurl and set user defined memory management callback michael@0: * functions. Users can implement memory management routines to check for michael@0: * memory leaks, check for mis-use of the curl library etc. User registered michael@0: * callback routines with be invoked by this library instead of the system michael@0: * memory management routines like malloc, free etc. michael@0: */ michael@0: CURL_EXTERN CURLcode curl_global_init_mem(long flags, michael@0: curl_malloc_callback m, michael@0: curl_free_callback f, michael@0: curl_realloc_callback r, michael@0: curl_strdup_callback s, michael@0: curl_calloc_callback c); michael@0: michael@0: /* michael@0: * NAME curl_global_cleanup() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * curl_global_cleanup() should be invoked exactly once for each application michael@0: * that uses libcurl michael@0: */ michael@0: CURL_EXTERN void curl_global_cleanup(void); michael@0: michael@0: /* linked-list structure for the CURLOPT_QUOTE option (and other) */ michael@0: struct curl_slist { michael@0: char *data; michael@0: struct curl_slist *next; michael@0: }; michael@0: michael@0: /* michael@0: * NAME curl_slist_append() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Appends a string to a linked list. If no list exists, it will be created michael@0: * first. Returns the new list, after appending. michael@0: */ michael@0: CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, michael@0: const char *); michael@0: michael@0: /* michael@0: * NAME curl_slist_free_all() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * free a previously built curl_slist. michael@0: */ michael@0: CURL_EXTERN void curl_slist_free_all(struct curl_slist *); michael@0: michael@0: /* michael@0: * NAME curl_getdate() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * Returns the time, in seconds since 1 Jan 1970 of the time string given in michael@0: * the first argument. The time argument in the second parameter is unused michael@0: * and should be set to NULL. michael@0: */ michael@0: CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); michael@0: michael@0: /* info about the certificate chain, only for OpenSSL builds. Asked michael@0: for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ michael@0: struct curl_certinfo { michael@0: int num_of_certs; /* number of certificates with information */ michael@0: struct curl_slist **certinfo; /* for each index in this array, there's a michael@0: linked list with textual information in the michael@0: format "name: value" */ michael@0: }; michael@0: michael@0: #define CURLINFO_STRING 0x100000 michael@0: #define CURLINFO_LONG 0x200000 michael@0: #define CURLINFO_DOUBLE 0x300000 michael@0: #define CURLINFO_SLIST 0x400000 michael@0: #define CURLINFO_MASK 0x0fffff michael@0: #define CURLINFO_TYPEMASK 0xf00000 michael@0: michael@0: typedef enum { michael@0: CURLINFO_NONE, /* first, never use this */ michael@0: CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, michael@0: CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, michael@0: CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, michael@0: CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, michael@0: CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, michael@0: CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, michael@0: CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, michael@0: CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, michael@0: CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, michael@0: CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, michael@0: CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, michael@0: CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, michael@0: CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, michael@0: CURLINFO_FILETIME = CURLINFO_LONG + 14, michael@0: CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, michael@0: CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, michael@0: CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, michael@0: CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, michael@0: CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, michael@0: CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, michael@0: CURLINFO_PRIVATE = CURLINFO_STRING + 21, michael@0: CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, michael@0: CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, michael@0: CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, michael@0: CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, michael@0: CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, michael@0: CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, michael@0: CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, michael@0: CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, michael@0: CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, michael@0: CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, michael@0: CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, michael@0: CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, michael@0: CURLINFO_CERTINFO = CURLINFO_SLIST + 34, michael@0: CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, michael@0: /* Fill in new entries below here! */ michael@0: michael@0: CURLINFO_LASTONE = 35 michael@0: } CURLINFO; michael@0: michael@0: /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as michael@0: CURLINFO_HTTP_CODE */ michael@0: #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE michael@0: michael@0: typedef enum { michael@0: CURLCLOSEPOLICY_NONE, /* first, never use this */ michael@0: michael@0: CURLCLOSEPOLICY_OLDEST, michael@0: CURLCLOSEPOLICY_LEAST_RECENTLY_USED, michael@0: CURLCLOSEPOLICY_LEAST_TRAFFIC, michael@0: CURLCLOSEPOLICY_SLOWEST, michael@0: CURLCLOSEPOLICY_CALLBACK, michael@0: michael@0: CURLCLOSEPOLICY_LAST /* last, never use this */ michael@0: } curl_closepolicy; michael@0: michael@0: #define CURL_GLOBAL_SSL (1<<0) michael@0: #define CURL_GLOBAL_WIN32 (1<<1) michael@0: #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) michael@0: #define CURL_GLOBAL_NOTHING 0 michael@0: #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL michael@0: michael@0: michael@0: /***************************************************************************** michael@0: * Setup defines, protos etc for the sharing stuff. michael@0: */ michael@0: michael@0: /* Different data locks for a single share */ michael@0: typedef enum { michael@0: CURL_LOCK_DATA_NONE = 0, michael@0: /* CURL_LOCK_DATA_SHARE is used internally to say that michael@0: * the locking is just made to change the internal state of the share michael@0: * itself. michael@0: */ michael@0: CURL_LOCK_DATA_SHARE, michael@0: CURL_LOCK_DATA_COOKIE, michael@0: CURL_LOCK_DATA_DNS, michael@0: CURL_LOCK_DATA_SSL_SESSION, michael@0: CURL_LOCK_DATA_CONNECT, michael@0: CURL_LOCK_DATA_LAST michael@0: } curl_lock_data; michael@0: michael@0: /* Different lock access types */ michael@0: typedef enum { michael@0: CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ michael@0: CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ michael@0: CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ michael@0: CURL_LOCK_ACCESS_LAST /* never use */ michael@0: } curl_lock_access; michael@0: michael@0: typedef void (*curl_lock_function)(CURL *handle, michael@0: curl_lock_data data, michael@0: curl_lock_access locktype, michael@0: void *userptr); michael@0: typedef void (*curl_unlock_function)(CURL *handle, michael@0: curl_lock_data data, michael@0: void *userptr); michael@0: michael@0: typedef void CURLSH; michael@0: michael@0: typedef enum { michael@0: CURLSHE_OK, /* all is fine */ michael@0: CURLSHE_BAD_OPTION, /* 1 */ michael@0: CURLSHE_IN_USE, /* 2 */ michael@0: CURLSHE_INVALID, /* 3 */ michael@0: CURLSHE_NOMEM, /* out of memory */ michael@0: CURLSHE_LAST /* never use */ michael@0: } CURLSHcode; michael@0: michael@0: typedef enum { michael@0: CURLSHOPT_NONE, /* don't use */ michael@0: CURLSHOPT_SHARE, /* specify a data type to share */ michael@0: CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ michael@0: CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ michael@0: CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ michael@0: CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock michael@0: callback functions */ michael@0: CURLSHOPT_LAST /* never use */ michael@0: } CURLSHoption; michael@0: michael@0: CURL_EXTERN CURLSH *curl_share_init(void); michael@0: CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); michael@0: CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); michael@0: michael@0: /**************************************************************************** michael@0: * Structures for querying information about the curl library at runtime. michael@0: */ michael@0: michael@0: typedef enum { michael@0: CURLVERSION_FIRST, michael@0: CURLVERSION_SECOND, michael@0: CURLVERSION_THIRD, michael@0: CURLVERSION_FOURTH, michael@0: CURLVERSION_LAST /* never actually use this */ michael@0: } CURLversion; michael@0: michael@0: /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by michael@0: basically all programs ever that want to get version information. It is michael@0: meant to be a built-in version number for what kind of struct the caller michael@0: expects. If the struct ever changes, we redefine the NOW to another enum michael@0: from above. */ michael@0: #define CURLVERSION_NOW CURLVERSION_FOURTH michael@0: michael@0: typedef struct { michael@0: CURLversion age; /* age of the returned struct */ michael@0: const char *version; /* LIBCURL_VERSION */ michael@0: unsigned int version_num; /* LIBCURL_VERSION_NUM */ michael@0: const char *host; /* OS/host/cpu/machine when configured */ michael@0: int features; /* bitmask, see defines below */ michael@0: const char *ssl_version; /* human readable string */ michael@0: long ssl_version_num; /* not used anymore, always 0 */ michael@0: const char *libz_version; /* human readable string */ michael@0: /* protocols is terminated by an entry with a NULL protoname */ michael@0: const char * const *protocols; michael@0: michael@0: /* The fields below this were added in CURLVERSION_SECOND */ michael@0: const char *ares; michael@0: int ares_num; michael@0: michael@0: /* This field was added in CURLVERSION_THIRD */ michael@0: const char *libidn; michael@0: michael@0: /* These field were added in CURLVERSION_FOURTH */ michael@0: michael@0: /* Same as '_libiconv_version' if built with HAVE_ICONV */ michael@0: int iconv_ver_num; michael@0: michael@0: const char *libssh_version; /* human readable string */ michael@0: michael@0: } curl_version_info_data; michael@0: michael@0: #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ michael@0: #define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ michael@0: #define CURL_VERSION_SSL (1<<2) /* SSL options are present */ michael@0: #define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ michael@0: #define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ michael@0: #define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ michael@0: #define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ michael@0: #define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ michael@0: #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ michael@0: #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ michael@0: #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ michael@0: #define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ michael@0: #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ michael@0: #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ michael@0: michael@0: /* michael@0: * NAME curl_version_info() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * This function returns a pointer to a static copy of the version info michael@0: * struct. See above. michael@0: */ michael@0: CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); michael@0: michael@0: /* michael@0: * NAME curl_easy_strerror() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * The curl_easy_strerror function may be used to turn a CURLcode value michael@0: * into the equivalent human readable error string. This is useful michael@0: * for printing meaningful error messages. michael@0: */ michael@0: CURL_EXTERN const char *curl_easy_strerror(CURLcode); michael@0: michael@0: /* michael@0: * NAME curl_share_strerror() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * The curl_share_strerror function may be used to turn a CURLSHcode value michael@0: * into the equivalent human readable error string. This is useful michael@0: * for printing meaningful error messages. michael@0: */ michael@0: CURL_EXTERN const char *curl_share_strerror(CURLSHcode); michael@0: michael@0: /* michael@0: * NAME curl_easy_pause() michael@0: * michael@0: * DESCRIPTION michael@0: * michael@0: * The curl_easy_pause function pauses or unpauses transfers. Select the new michael@0: * state by setting the bitmask, use the convenience defines below. michael@0: * michael@0: */ michael@0: CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); michael@0: michael@0: #define CURLPAUSE_RECV (1<<0) michael@0: #define CURLPAUSE_RECV_CONT (0) michael@0: michael@0: #define CURLPAUSE_SEND (1<<2) michael@0: #define CURLPAUSE_SEND_CONT (0) michael@0: michael@0: #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) michael@0: #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif michael@0: michael@0: /* unfortunately, the easy.h and multi.h include files need options and info michael@0: stuff before they can be included! */ michael@0: #include "easy.h" /* nothing in curl is fun without the easy stuff */ michael@0: #include "multi.h" michael@0: michael@0: /* the typechecker doesn't work in C++ (yet) */ michael@0: #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ michael@0: ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ michael@0: !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) michael@0: #include "typecheck-gcc.h" michael@0: #else michael@0: #if defined(__STDC__) && (__STDC__ >= 1) michael@0: /* This preprocessor magic that replaces a call with the exact same call is michael@0: only done to make sure application authors pass exactly three arguments michael@0: to these functions. */ michael@0: #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) michael@0: #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) michael@0: #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) michael@0: #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) michael@0: #endif /* __STDC__ >= 1 */ michael@0: #endif /* gcc >= 4.3 && !__cplusplus */ michael@0: michael@0: #endif /* __CURL_CURL_H */