Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/curl
File: curl.h
#ifndef __CURL_CURL_H
[0] Fix | Delete
#define __CURL_CURL_H
[1] Fix | Delete
/***************************************************************************
[2] Fix | Delete
* _ _ ____ _
[3] Fix | Delete
* Project ___| | | | _ \| |
[4] Fix | Delete
* / __| | | | |_) | |
[5] Fix | Delete
* | (__| |_| | _ <| |___
[6] Fix | Delete
* \___|\___/|_| \_\_____|
[7] Fix | Delete
*
[8] Fix | Delete
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
[9] Fix | Delete
*
[10] Fix | Delete
* This software is licensed as described in the file COPYING, which
[11] Fix | Delete
* you should have received as part of this distribution. The terms
[12] Fix | Delete
* are also available at https://curl.haxx.se/docs/copyright.html.
[13] Fix | Delete
*
[14] Fix | Delete
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
[15] Fix | Delete
* copies of the Software, and permit persons to whom the Software is
[16] Fix | Delete
* furnished to do so, under the terms of the COPYING file.
[17] Fix | Delete
*
[18] Fix | Delete
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
[19] Fix | Delete
* KIND, either express or implied.
[20] Fix | Delete
*
[21] Fix | Delete
***************************************************************************/
[22] Fix | Delete
[23] Fix | Delete
/*
[24] Fix | Delete
* If you have libcurl problems, all docs and details are found here:
[25] Fix | Delete
* https://curl.haxx.se/libcurl/
[26] Fix | Delete
*
[27] Fix | Delete
* curl-library mailing list subscription and unsubscription web interface:
[28] Fix | Delete
* https://cool.haxx.se/mailman/listinfo/curl-library/
[29] Fix | Delete
*/
[30] Fix | Delete
[31] Fix | Delete
#ifdef CURL_NO_OLDIES
[32] Fix | Delete
#define CURL_STRICTER
[33] Fix | Delete
#endif
[34] Fix | Delete
[35] Fix | Delete
#include "curlver.h" /* libcurl version defines */
[36] Fix | Delete
#include "system.h" /* determine things run-time */
[37] Fix | Delete
[38] Fix | Delete
/*
[39] Fix | Delete
* Define WIN32 when build target is Win32 API
[40] Fix | Delete
*/
[41] Fix | Delete
[42] Fix | Delete
#if (defined(_WIN32) || defined(__WIN32__)) && \
[43] Fix | Delete
!defined(WIN32) && !defined(__SYMBIAN32__)
[44] Fix | Delete
#define WIN32
[45] Fix | Delete
#endif
[46] Fix | Delete
[47] Fix | Delete
#include <stdio.h>
[48] Fix | Delete
#include <limits.h>
[49] Fix | Delete
[50] Fix | Delete
#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
[51] Fix | Delete
/* Needed for __FreeBSD_version symbol definition */
[52] Fix | Delete
#include <osreldate.h>
[53] Fix | Delete
#endif
[54] Fix | Delete
[55] Fix | Delete
/* The include stuff here below is mainly for time_t! */
[56] Fix | Delete
#include <sys/types.h>
[57] Fix | Delete
#include <time.h>
[58] Fix | Delete
[59] Fix | Delete
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
[60] Fix | Delete
#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
[61] Fix | Delete
defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
[62] Fix | Delete
/* The check above prevents the winsock2 inclusion if winsock.h already was
[63] Fix | Delete
included, since they can't co-exist without problems */
[64] Fix | Delete
#include <winsock2.h>
[65] Fix | Delete
#include <ws2tcpip.h>
[66] Fix | Delete
#endif
[67] Fix | Delete
#endif
[68] Fix | Delete
[69] Fix | Delete
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
[70] Fix | Delete
libc5-based Linux systems. Only include it on systems that are known to
[71] Fix | Delete
require it! */
[72] Fix | Delete
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
[73] Fix | Delete
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
[74] Fix | Delete
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
[75] Fix | Delete
defined(__CYGWIN__) || \
[76] Fix | Delete
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
[77] Fix | Delete
#include <sys/select.h>
[78] Fix | Delete
#endif
[79] Fix | Delete
[80] Fix | Delete
#if !defined(WIN32) && !defined(_WIN32_WCE)
[81] Fix | Delete
#include <sys/socket.h>
[82] Fix | Delete
#endif
[83] Fix | Delete
[84] Fix | Delete
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
[85] Fix | Delete
#include <sys/time.h>
[86] Fix | Delete
#endif
[87] Fix | Delete
[88] Fix | Delete
#ifdef __BEOS__
[89] Fix | Delete
#include <support/SupportDefs.h>
[90] Fix | Delete
#endif
[91] Fix | Delete
[92] Fix | Delete
#ifdef __cplusplus
[93] Fix | Delete
extern "C" {
[94] Fix | Delete
#endif
[95] Fix | Delete
[96] Fix | Delete
#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
[97] Fix | Delete
typedef struct Curl_easy CURL;
[98] Fix | Delete
typedef struct Curl_share CURLSH;
[99] Fix | Delete
#else
[100] Fix | Delete
typedef void CURL;
[101] Fix | Delete
typedef void CURLSH;
[102] Fix | Delete
#endif
[103] Fix | Delete
[104] Fix | Delete
/*
[105] Fix | Delete
* libcurl external API function linkage decorations.
[106] Fix | Delete
*/
[107] Fix | Delete
[108] Fix | Delete
#ifdef CURL_STATICLIB
[109] Fix | Delete
# define CURL_EXTERN
[110] Fix | Delete
#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
[111] Fix | Delete
# if defined(BUILDING_LIBCURL)
[112] Fix | Delete
# define CURL_EXTERN __declspec(dllexport)
[113] Fix | Delete
# else
[114] Fix | Delete
# define CURL_EXTERN __declspec(dllimport)
[115] Fix | Delete
# endif
[116] Fix | Delete
#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
[117] Fix | Delete
# define CURL_EXTERN CURL_EXTERN_SYMBOL
[118] Fix | Delete
#else
[119] Fix | Delete
# define CURL_EXTERN
[120] Fix | Delete
#endif
[121] Fix | Delete
[122] Fix | Delete
#ifndef curl_socket_typedef
[123] Fix | Delete
/* socket typedef */
[124] Fix | Delete
#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
[125] Fix | Delete
typedef SOCKET curl_socket_t;
[126] Fix | Delete
#define CURL_SOCKET_BAD INVALID_SOCKET
[127] Fix | Delete
#else
[128] Fix | Delete
typedef int curl_socket_t;
[129] Fix | Delete
#define CURL_SOCKET_BAD -1
[130] Fix | Delete
#endif
[131] Fix | Delete
#define curl_socket_typedef
[132] Fix | Delete
#endif /* curl_socket_typedef */
[133] Fix | Delete
[134] Fix | Delete
/* enum for the different supported SSL backends */
[135] Fix | Delete
typedef enum {
[136] Fix | Delete
CURLSSLBACKEND_NONE = 0,
[137] Fix | Delete
CURLSSLBACKEND_OPENSSL = 1,
[138] Fix | Delete
CURLSSLBACKEND_GNUTLS = 2,
[139] Fix | Delete
CURLSSLBACKEND_NSS = 3,
[140] Fix | Delete
CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
[141] Fix | Delete
CURLSSLBACKEND_GSKIT = 5,
[142] Fix | Delete
CURLSSLBACKEND_POLARSSL = 6,
[143] Fix | Delete
CURLSSLBACKEND_WOLFSSL = 7,
[144] Fix | Delete
CURLSSLBACKEND_SCHANNEL = 8,
[145] Fix | Delete
CURLSSLBACKEND_DARWINSSL = 9,
[146] Fix | Delete
CURLSSLBACKEND_AXTLS = 10,
[147] Fix | Delete
CURLSSLBACKEND_MBEDTLS = 11
[148] Fix | Delete
} curl_sslbackend;
[149] Fix | Delete
[150] Fix | Delete
/* aliases for library clones and renames */
[151] Fix | Delete
#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
[152] Fix | Delete
#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
[153] Fix | Delete
#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
[154] Fix | Delete
[155] Fix | Delete
struct curl_httppost {
[156] Fix | Delete
struct curl_httppost *next; /* next entry in the list */
[157] Fix | Delete
char *name; /* pointer to allocated name */
[158] Fix | Delete
long namelength; /* length of name length */
[159] Fix | Delete
char *contents; /* pointer to allocated data contents */
[160] Fix | Delete
long contentslength; /* length of contents field, see also
[161] Fix | Delete
CURL_HTTPPOST_LARGE */
[162] Fix | Delete
char *buffer; /* pointer to allocated buffer contents */
[163] Fix | Delete
long bufferlength; /* length of buffer field */
[164] Fix | Delete
char *contenttype; /* Content-Type */
[165] Fix | Delete
struct curl_slist *contentheader; /* list of extra headers for this form */
[166] Fix | Delete
struct curl_httppost *more; /* if one field name has more than one
[167] Fix | Delete
file, this link should link to following
[168] Fix | Delete
files */
[169] Fix | Delete
long flags; /* as defined below */
[170] Fix | Delete
[171] Fix | Delete
/* specified content is a file name */
[172] Fix | Delete
#define CURL_HTTPPOST_FILENAME (1<<0)
[173] Fix | Delete
/* specified content is a file name */
[174] Fix | Delete
#define CURL_HTTPPOST_READFILE (1<<1)
[175] Fix | Delete
/* name is only stored pointer do not free in formfree */
[176] Fix | Delete
#define CURL_HTTPPOST_PTRNAME (1<<2)
[177] Fix | Delete
/* contents is only stored pointer do not free in formfree */
[178] Fix | Delete
#define CURL_HTTPPOST_PTRCONTENTS (1<<3)
[179] Fix | Delete
/* upload file from buffer */
[180] Fix | Delete
#define CURL_HTTPPOST_BUFFER (1<<4)
[181] Fix | Delete
/* upload file from pointer contents */
[182] Fix | Delete
#define CURL_HTTPPOST_PTRBUFFER (1<<5)
[183] Fix | Delete
/* upload file contents by using the regular read callback to get the data and
[184] Fix | Delete
pass the given pointer as custom pointer */
[185] Fix | Delete
#define CURL_HTTPPOST_CALLBACK (1<<6)
[186] Fix | Delete
/* use size in 'contentlen', added in 7.46.0 */
[187] Fix | Delete
#define CURL_HTTPPOST_LARGE (1<<7)
[188] Fix | Delete
[189] Fix | Delete
char *showfilename; /* The file name to show. If not set, the
[190] Fix | Delete
actual file name will be used (if this
[191] Fix | Delete
is a file part) */
[192] Fix | Delete
void *userp; /* custom pointer used for
[193] Fix | Delete
HTTPPOST_CALLBACK posts */
[194] Fix | Delete
curl_off_t contentlen; /* alternative length of contents
[195] Fix | Delete
field. Used if CURL_HTTPPOST_LARGE is
[196] Fix | Delete
set. Added in 7.46.0 */
[197] Fix | Delete
};
[198] Fix | Delete
[199] Fix | Delete
/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
[200] Fix | Delete
deprecated but was the only choice up until 7.31.0 */
[201] Fix | Delete
typedef int (*curl_progress_callback)(void *clientp,
[202] Fix | Delete
double dltotal,
[203] Fix | Delete
double dlnow,
[204] Fix | Delete
double ultotal,
[205] Fix | Delete
double ulnow);
[206] Fix | Delete
[207] Fix | Delete
/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
[208] Fix | Delete
7.32.0, it avoids floating point and provides more detailed information. */
[209] Fix | Delete
typedef int (*curl_xferinfo_callback)(void *clientp,
[210] Fix | Delete
curl_off_t dltotal,
[211] Fix | Delete
curl_off_t dlnow,
[212] Fix | Delete
curl_off_t ultotal,
[213] Fix | Delete
curl_off_t ulnow);
[214] Fix | Delete
[215] Fix | Delete
#ifndef CURL_MAX_READ_SIZE
[216] Fix | Delete
/* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
[217] Fix | Delete
#define CURL_MAX_READ_SIZE 524288
[218] Fix | Delete
#endif
[219] Fix | Delete
[220] Fix | Delete
#ifndef CURL_MAX_WRITE_SIZE
[221] Fix | Delete
/* Tests have proven that 20K is a very bad buffer size for uploads on
[222] Fix | Delete
Windows, while 16K for some odd reason performed a lot better.
[223] Fix | Delete
We do the ifndef check to allow this value to easier be changed at build
[224] Fix | Delete
time for those who feel adventurous. The practical minimum is about
[225] Fix | Delete
400 bytes since libcurl uses a buffer of this size as a scratch area
[226] Fix | Delete
(unrelated to network send operations). */
[227] Fix | Delete
#define CURL_MAX_WRITE_SIZE 16384
[228] Fix | Delete
#endif
[229] Fix | Delete
[230] Fix | Delete
#ifndef CURL_MAX_HTTP_HEADER
[231] Fix | Delete
/* The only reason to have a max limit for this is to avoid the risk of a bad
[232] Fix | Delete
server feeding libcurl with a never-ending header that will cause reallocs
[233] Fix | Delete
infinitely */
[234] Fix | Delete
#define CURL_MAX_HTTP_HEADER (100*1024)
[235] Fix | Delete
#endif
[236] Fix | Delete
[237] Fix | Delete
/* This is a magic return code for the write callback that, when returned,
[238] Fix | Delete
will signal libcurl to pause receiving on the current transfer. */
[239] Fix | Delete
#define CURL_WRITEFUNC_PAUSE 0x10000001
[240] Fix | Delete
[241] Fix | Delete
typedef size_t (*curl_write_callback)(char *buffer,
[242] Fix | Delete
size_t size,
[243] Fix | Delete
size_t nitems,
[244] Fix | Delete
void *outstream);
[245] Fix | Delete
[246] Fix | Delete
/* This callback will be called when a new resolver request is made */
[247] Fix | Delete
typedef int (*curl_resolver_start_callback)(void *resolver_state,
[248] Fix | Delete
void *reserved, void *userdata);
[249] Fix | Delete
[250] Fix | Delete
/* enumeration of file types */
[251] Fix | Delete
typedef enum {
[252] Fix | Delete
CURLFILETYPE_FILE = 0,
[253] Fix | Delete
CURLFILETYPE_DIRECTORY,
[254] Fix | Delete
CURLFILETYPE_SYMLINK,
[255] Fix | Delete
CURLFILETYPE_DEVICE_BLOCK,
[256] Fix | Delete
CURLFILETYPE_DEVICE_CHAR,
[257] Fix | Delete
CURLFILETYPE_NAMEDPIPE,
[258] Fix | Delete
CURLFILETYPE_SOCKET,
[259] Fix | Delete
CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
[260] Fix | Delete
[261] Fix | Delete
CURLFILETYPE_UNKNOWN /* should never occur */
[262] Fix | Delete
} curlfiletype;
[263] Fix | Delete
[264] Fix | Delete
#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
[265] Fix | Delete
#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
[266] Fix | Delete
#define CURLFINFOFLAG_KNOWN_TIME (1<<2)
[267] Fix | Delete
#define CURLFINFOFLAG_KNOWN_PERM (1<<3)
[268] Fix | Delete
#define CURLFINFOFLAG_KNOWN_UID (1<<4)
[269] Fix | Delete
#define CURLFINFOFLAG_KNOWN_GID (1<<5)
[270] Fix | Delete
#define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
[271] Fix | Delete
#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
[272] Fix | Delete
[273] Fix | Delete
/* Content of this structure depends on information which is known and is
[274] Fix | Delete
achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man
[275] Fix | Delete
page for callbacks returning this structure -- some fields are mandatory,
[276] Fix | Delete
some others are optional. The FLAG field has special meaning. */
[277] Fix | Delete
struct curl_fileinfo {
[278] Fix | Delete
char *filename;
[279] Fix | Delete
curlfiletype filetype;
[280] Fix | Delete
time_t time;
[281] Fix | Delete
unsigned int perm;
[282] Fix | Delete
int uid;
[283] Fix | Delete
int gid;
[284] Fix | Delete
curl_off_t size;
[285] Fix | Delete
long int hardlinks;
[286] Fix | Delete
[287] Fix | Delete
struct {
[288] Fix | Delete
/* If some of these fields is not NULL, it is a pointer to b_data. */
[289] Fix | Delete
char *time;
[290] Fix | Delete
char *perm;
[291] Fix | Delete
char *user;
[292] Fix | Delete
char *group;
[293] Fix | Delete
char *target; /* pointer to the target filename of a symlink */
[294] Fix | Delete
} strings;
[295] Fix | Delete
[296] Fix | Delete
unsigned int flags;
[297] Fix | Delete
[298] Fix | Delete
/* used internally */
[299] Fix | Delete
char *b_data;
[300] Fix | Delete
size_t b_size;
[301] Fix | Delete
size_t b_used;
[302] Fix | Delete
};
[303] Fix | Delete
[304] Fix | Delete
/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
[305] Fix | Delete
#define CURL_CHUNK_BGN_FUNC_OK 0
[306] Fix | Delete
#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */
[307] Fix | Delete
#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */
[308] Fix | Delete
[309] Fix | Delete
/* if splitting of data transfer is enabled, this callback is called before
[310] Fix | Delete
download of an individual chunk started. Note that parameter "remains" works
[311] Fix | Delete
only for FTP wildcard downloading (for now), otherwise is not used */
[312] Fix | Delete
typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
[313] Fix | Delete
void *ptr,
[314] Fix | Delete
int remains);
[315] Fix | Delete
[316] Fix | Delete
/* return codes for CURLOPT_CHUNK_END_FUNCTION */
[317] Fix | Delete
#define CURL_CHUNK_END_FUNC_OK 0
[318] Fix | Delete
#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */
[319] Fix | Delete
[320] Fix | Delete
/* If splitting of data transfer is enabled this callback is called after
[321] Fix | Delete
download of an individual chunk finished.
[322] Fix | Delete
Note! After this callback was set then it have to be called FOR ALL chunks.
[323] Fix | Delete
Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
[324] Fix | Delete
This is the reason why we don't need "transfer_info" parameter in this
[325] Fix | Delete
callback and we are not interested in "remains" parameter too. */
[326] Fix | Delete
typedef long (*curl_chunk_end_callback)(void *ptr);
[327] Fix | Delete
[328] Fix | Delete
/* return codes for FNMATCHFUNCTION */
[329] Fix | Delete
#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */
[330] Fix | Delete
#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */
[331] Fix | Delete
#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */
[332] Fix | Delete
[333] Fix | Delete
/* callback type for wildcard downloading pattern matching. If the
[334] Fix | Delete
string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
[335] Fix | Delete
typedef int (*curl_fnmatch_callback)(void *ptr,
[336] Fix | Delete
const char *pattern,
[337] Fix | Delete
const char *string);
[338] Fix | Delete
[339] Fix | Delete
/* These are the return codes for the seek callbacks */
[340] Fix | Delete
#define CURL_SEEKFUNC_OK 0
[341] Fix | Delete
#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
[342] Fix | Delete
#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
[343] Fix | Delete
libcurl might try other means instead */
[344] Fix | Delete
typedef int (*curl_seek_callback)(void *instream,
[345] Fix | Delete
curl_off_t offset,
[346] Fix | Delete
int origin); /* 'whence' */
[347] Fix | Delete
[348] Fix | Delete
/* This is a return code for the read callback that, when returned, will
[349] Fix | Delete
signal libcurl to immediately abort the current transfer. */
[350] Fix | Delete
#define CURL_READFUNC_ABORT 0x10000000
[351] Fix | Delete
/* This is a return code for the read callback that, when returned, will
[352] Fix | Delete
signal libcurl to pause sending data on the current transfer. */
[353] Fix | Delete
#define CURL_READFUNC_PAUSE 0x10000001
[354] Fix | Delete
[355] Fix | Delete
typedef size_t (*curl_read_callback)(char *buffer,
[356] Fix | Delete
size_t size,
[357] Fix | Delete
size_t nitems,
[358] Fix | Delete
void *instream);
[359] Fix | Delete
[360] Fix | Delete
typedef enum {
[361] Fix | Delete
CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
[362] Fix | Delete
CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
[363] Fix | Delete
CURLSOCKTYPE_LAST /* never use */
[364] Fix | Delete
} curlsocktype;
[365] Fix | Delete
[366] Fix | Delete
/* The return code from the sockopt_callback can signal information back
[367] Fix | Delete
to libcurl: */
[368] Fix | Delete
#define CURL_SOCKOPT_OK 0
[369] Fix | Delete
#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
[370] Fix | Delete
CURLE_ABORTED_BY_CALLBACK */
[371] Fix | Delete
#define CURL_SOCKOPT_ALREADY_CONNECTED 2
[372] Fix | Delete
[373] Fix | Delete
typedef int (*curl_sockopt_callback)(void *clientp,
[374] Fix | Delete
curl_socket_t curlfd,
[375] Fix | Delete
curlsocktype purpose);
[376] Fix | Delete
[377] Fix | Delete
struct curl_sockaddr {
[378] Fix | Delete
int family;
[379] Fix | Delete
int socktype;
[380] Fix | Delete
int protocol;
[381] Fix | Delete
unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
[382] Fix | Delete
turned really ugly and painful on the systems that
[383] Fix | Delete
lack this type */
[384] Fix | Delete
struct sockaddr addr;
[385] Fix | Delete
};
[386] Fix | Delete
[387] Fix | Delete
typedef curl_socket_t
[388] Fix | Delete
(*curl_opensocket_callback)(void *clientp,
[389] Fix | Delete
curlsocktype purpose,
[390] Fix | Delete
struct curl_sockaddr *address);
[391] Fix | Delete
[392] Fix | Delete
typedef int
[393] Fix | Delete
(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
[394] Fix | Delete
[395] Fix | Delete
typedef enum {
[396] Fix | Delete
CURLIOE_OK, /* I/O operation successful */
[397] Fix | Delete
CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
[398] Fix | Delete
CURLIOE_FAILRESTART, /* failed to restart the read */
[399] Fix | Delete
CURLIOE_LAST /* never use */
[400] Fix | Delete
} curlioerr;
[401] Fix | Delete
[402] Fix | Delete
typedef enum {
[403] Fix | Delete
CURLIOCMD_NOP, /* no operation */
[404] Fix | Delete
CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
[405] Fix | Delete
CURLIOCMD_LAST /* never use */
[406] Fix | Delete
} curliocmd;
[407] Fix | Delete
[408] Fix | Delete
typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
[409] Fix | Delete
int cmd,
[410] Fix | Delete
void *clientp);
[411] Fix | Delete
[412] Fix | Delete
#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
[413] Fix | Delete
/*
[414] Fix | Delete
* The following typedef's are signatures of malloc, free, realloc, strdup and
[415] Fix | Delete
* calloc respectively. Function pointers of these types can be passed to the
[416] Fix | Delete
* curl_global_init_mem() function to set user defined memory management
[417] Fix | Delete
* callback routines.
[418] Fix | Delete
*/
[419] Fix | Delete
typedef void *(*curl_malloc_callback)(size_t size);
[420] Fix | Delete
typedef void (*curl_free_callback)(void *ptr);
[421] Fix | Delete
typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
[422] Fix | Delete
typedef char *(*curl_strdup_callback)(const char *str);
[423] Fix | Delete
typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
[424] Fix | Delete
[425] Fix | Delete
#define CURL_DID_MEMORY_FUNC_TYPEDEFS
[426] Fix | Delete
#endif
[427] Fix | Delete
[428] Fix | Delete
/* the kind of data that is passed to information_callback*/
[429] Fix | Delete
typedef enum {
[430] Fix | Delete
CURLINFO_TEXT = 0,
[431] Fix | Delete
CURLINFO_HEADER_IN, /* 1 */
[432] Fix | Delete
CURLINFO_HEADER_OUT, /* 2 */
[433] Fix | Delete
CURLINFO_DATA_IN, /* 3 */
[434] Fix | Delete
CURLINFO_DATA_OUT, /* 4 */
[435] Fix | Delete
CURLINFO_SSL_DATA_IN, /* 5 */
[436] Fix | Delete
CURLINFO_SSL_DATA_OUT, /* 6 */
[437] Fix | Delete
CURLINFO_END
[438] Fix | Delete
} curl_infotype;
[439] Fix | Delete
[440] Fix | Delete
typedef int (*curl_debug_callback)
[441] Fix | Delete
(CURL *handle, /* the handle/transfer this concerns */
[442] Fix | Delete
curl_infotype type, /* what kind of data */
[443] Fix | Delete
char *data, /* points to the data */
[444] Fix | Delete
size_t size, /* size of the data pointed to */
[445] Fix | Delete
void *userptr); /* whatever the user please */
[446] Fix | Delete
[447] Fix | Delete
/* All possible error codes from all sorts of curl functions. Future versions
[448] Fix | Delete
may return other values, stay prepared.
[449] Fix | Delete
[450] Fix | Delete
Always add new return codes last. Never *EVER* remove any. The return
[451] Fix | Delete
codes must remain the same!
[452] Fix | Delete
*/
[453] Fix | Delete
[454] Fix | Delete
typedef enum {
[455] Fix | Delete
CURLE_OK = 0,
[456] Fix | Delete
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
[457] Fix | Delete
CURLE_FAILED_INIT, /* 2 */
[458] Fix | Delete
CURLE_URL_MALFORMAT, /* 3 */
[459] Fix | Delete
CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
[460] Fix | Delete
7.17.0, reused in April 2011 for 7.21.5] */
[461] Fix | Delete
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
[462] Fix | Delete
CURLE_COULDNT_RESOLVE_HOST, /* 6 */
[463] Fix | Delete
CURLE_COULDNT_CONNECT, /* 7 */
[464] Fix | Delete
CURLE_WEIRD_SERVER_REPLY, /* 8 */
[465] Fix | Delete
CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
[466] Fix | Delete
due to lack of access - when login fails
[467] Fix | Delete
this is not returned. */
[468] Fix | Delete
CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
[469] Fix | Delete
7.15.4, reused in Dec 2011 for 7.24.0]*/
[470] Fix | Delete
CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
[471] Fix | Delete
CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
[472] Fix | Delete
[was obsoleted in August 2007 for 7.17.0,
[473] Fix | Delete
reused in Dec 2011 for 7.24.0]*/
[474] Fix | Delete
CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
[475] Fix | Delete
CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
[476] Fix | Delete
CURLE_FTP_CANT_GET_HOST, /* 15 */
[477] Fix | Delete
CURLE_HTTP2, /* 16 - A problem in the http2 framing layer.
[478] Fix | Delete
[was obsoleted in August 2007 for 7.17.0,
[479] Fix | Delete
reused in July 2014 for 7.38.0] */
[480] Fix | Delete
CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
[481] Fix | Delete
CURLE_PARTIAL_FILE, /* 18 */
[482] Fix | Delete
CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
[483] Fix | Delete
CURLE_OBSOLETE20, /* 20 - NOT USED */
[484] Fix | Delete
CURLE_QUOTE_ERROR, /* 21 - quote command failure */
[485] Fix | Delete
CURLE_HTTP_RETURNED_ERROR, /* 22 */
[486] Fix | Delete
CURLE_WRITE_ERROR, /* 23 */
[487] Fix | Delete
CURLE_OBSOLETE24, /* 24 - NOT USED */
[488] Fix | Delete
CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
[489] Fix | Delete
CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
[490] Fix | Delete
CURLE_OUT_OF_MEMORY, /* 27 */
[491] Fix | Delete
/* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
[492] Fix | Delete
instead of a memory allocation error if CURL_DOES_CONVERSIONS
[493] Fix | Delete
is defined
[494] Fix | Delete
*/
[495] Fix | Delete
CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
[496] Fix | Delete
CURLE_OBSOLETE29, /* 29 - NOT USED */
[497] Fix | Delete
CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
[498] Fix | Delete
CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function