20
20
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
* KIND, either express or implied.
23
* $Id: curl.h,v 1.383 2009-04-28 11:19:10 bagder Exp $
23
* $Id: curl.h,v 1.396 2009-10-16 13:30:31 yangtse Exp $
24
24
***************************************************************************/
31
31
* http://cool.haxx.se/mailman/listinfo/curl-library/
35
* Leading 'curl' path on the 'curlbuild.h' include statement is
36
* required to properly allow building outside of the source tree,
37
* due to the fact that in this case 'curlbuild.h' is generated in
38
* a subdirectory of the build tree while 'curl.h actually remains
39
* in a subdirectory of the source tree.
34
42
#include "curlver.h" /* libcurl version defines */
35
43
#include "curl/curlbuild.h" /* libcurl build definitions */
36
44
#include "curlrules.h" /* libcurl rules enforcement */
70
73
libc5-based Linux systems. Only include it on system that are known to
72
75
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
73
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
76
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
74
78
#include <sys/select.h>
78
82
#include <sys/socket.h>
80
#if !defined(WIN32) && !defined(__WATCOMC__)
84
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
81
85
#include <sys/time.h>
83
87
#include <sys/types.h>
178
182
time for those who feel adventurous. */
179
183
#define CURL_MAX_WRITE_SIZE 16384
186
#ifndef CURL_MAX_HTTP_HEADER
187
/* The only reason to have a max limit for this is to avoid the risk of a bad
188
server feeding libcurl with a never-ending header that will cause reallocs
190
#define CURL_MAX_HTTP_HEADER (100*1024)
181
194
/* This is a magic return code for the write callback that, when returned,
182
195
will signal libcurl to pause receiving on the current transfer. */
183
196
#define CURL_WRITEFUNC_PAUSE 0x10000001
187
200
void *outstream);
189
/* this is the return codes for the seek callbacks */
202
/* These are the return codes for the seek callbacks */
190
203
#define CURL_SEEKFUNC_OK 0
191
204
#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
192
205
#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
498
511
#define CURL_ERROR_SIZE 256
514
const char *key; /* points to a zero-terminated string encoded with base64
515
if len is zero, otherwise to the "raw" data */
525
/* this is the set of return values expected from the curl_sshkeycallback
528
CURLKHSTAT_FINE_ADD_TO_FILE,
530
CURLKHSTAT_REJECT, /* reject the connection, return an error */
531
CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so
532
this causes a CURLE_DEFER error but otherwise the
533
connection will be left intact etc */
534
CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
537
/* this is the set of status codes pass in to the callback */
539
CURLKHMATCH_OK, /* match */
540
CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
541
CURLKHMATCH_MISSING, /* no matching host/key found */
542
CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */
546
(*curl_sshkeycallback) (CURL *easy, /* easy handle */
547
const struct curl_khkey *knownkey, /* known */
548
const struct curl_khkey *foundkey, /* found */
549
enum curl_khmatch, /* libcurl's view on the keys */
550
void *clientp); /* custom pointer passed from app */
500
552
/* parameter for the CURLOPT_USE_SSL option */
502
554
CURLUSESSL_NONE, /* do not attempt to use SSL */
1201
1253
CINIT(TFTP_BLKSIZE, LONG, 178),
1203
1255
/* Socks Service */
1204
CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179),
1256
CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
1206
1258
/* Socks Service */
1207
1259
CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
1218
1270
to all protocols except FILE and SCP. */
1219
1271
CINIT(REDIR_PROTOCOLS, LONG, 182),
1273
/* set the SSH knownhost file name to use */
1274
CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
1276
/* set the SSH host key callback, must point to a curl_sshkeycallback
1278
CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
1280
/* set the SSH host key callback custom pointer */
1281
CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
1221
1283
CURLOPT_LASTENTRY /* the last unused */
1518
1580
* curl_global_init() should be invoked exactly once for each application that
1519
* uses libcurl and before any call of other libcurl function.
1581
* uses libcurl and before any call of other libcurl functions.
1521
1583
* This function is not thread-safe!
1790
1852
#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */
1791
1853
#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */
1792
1854
#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */
1793
#define CURL_VERSION_CONV (1<<12) /* character conversions are
1855
#define CURL_VERSION_CONV (1<<12) /* character conversions supported */
1856
#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */
1797
1859
* NAME curl_version_info()