libcurl.pp 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597
  1. {
  2. $Id: header,v 1.1 2000/07/13 06:33:45 michael Exp $
  3. This file is part of the Free Pascal packages
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {
  12. the curl library is governed by its own copyright, see the curl
  13. website for this.
  14. }
  15. {$mode objfpc}
  16. {$IFNDEF FPC_DOTTEDUNITS}
  17. unit libcurl;
  18. {$ENDIF FPC_DOTTEDUNITS}
  19. interface
  20. {$IFDEF WINDOWS}
  21. {$IFDEF FPC_DOTTEDUNITS}
  22. uses
  23. System.CTypes;
  24. {$ELSE FPC_DOTTEDUNITS}
  25. uses
  26. ctypes;
  27. {$ENDIF FPC_DOTTEDUNITS}
  28. type
  29. time_t = clong;
  30. PTime_t = ^time_t;
  31. off_t = clong;
  32. {$ELSE}
  33. {$IFDEF FPC_DOTTEDUNITS}
  34. uses
  35. UnixApi.Types;
  36. {$ELSE FPC_DOTTEDUNITS}
  37. uses
  38. unixtype;
  39. {$ENDIF FPC_DOTTEDUNITS}
  40. {$ENDIF}
  41. {$IFDEF FPC}
  42. {$PACKRECORDS C}
  43. {$ENDIF}
  44. { Automatically converted by H2Pas 1.0.0 from curl.h
  45. The following command line parameters were used:
  46. -D -l libcurl -p curl.h }
  47. const
  48. External_library='libcurl'; {Setup as you need}
  49. CURLINFO_STRING =$100000;
  50. CURLINFO_LONG =$200000;
  51. CURLINFO_DOUBLE =$300000;
  52. CURLINFO_SLIST =$400000;
  53. CURLINFO_SOCKET =$500000;
  54. CURLINFO_MASK =$0fffff;
  55. CURLINFO_TYPEMASK=$f00000;
  56. CURLOPTTYPE_LONG =0;
  57. CURLOPTTYPE_OBJECTPOINT =10000;
  58. CURLOPTTYPE_STRINGPOINT =10000;
  59. CURLOPTTYPE_FUNCTIONPOINT =20000;
  60. CURLOPTTYPE_OFF_T =30000;
  61. CURLPIPE_NOTHING =0;
  62. CURLPIPE_HTTP1 =1;
  63. CURLPIPE_MULTIPLEX=2;
  64. CURL_WAIT_POLLIN =$0001;
  65. CURL_WAIT_POLLPRI=$0002;
  66. CURL_WAIT_POLLOUT=$0004;
  67. CURLPROTO_HTTP = (1 shl 0);
  68. CURLPROTO_HTTPS = (1 shl 1);
  69. CURLPROTO_FTP = (1 shl 2);
  70. CURLPROTO_FTPS = (1 shl 3);
  71. CURLPROTO_SCP = (1 shl 4);
  72. CURLPROTO_SFTP = (1 shl 5);
  73. CURLPROTO_TELNET = (1 shl 6);
  74. CURLPROTO_LDAP = (1 shl 7);
  75. CURLPROTO_LDAPS = (1 shl 8);
  76. CURLPROTO_DICT = (1 shl 9);
  77. CURLPROTO_FILE = (1 shl 10);
  78. CURLPROTO_TFTP = (1 shl 11);
  79. CURLPROTO_IMAP = (1 shl 12);
  80. CURLPROTO_IMAPS = (1 shl 13);
  81. CURLPROTO_POP3 = (1 shl 14);
  82. CURLPROTO_POP3S = (1 shl 15);
  83. CURLPROTO_SMTP = (1 shl 16);
  84. CURLPROTO_SMTPS = (1 shl 17);
  85. CURLPROTO_RTSP = (1 shl 18);
  86. CURLPROTO_RTMP = (1 shl 19);
  87. CURLPROTO_RTMPT = (1 shl 20);
  88. CURLPROTO_RTMPE = (1 shl 21);
  89. CURLPROTO_RTMPTE = (1 shl 22);
  90. CURLPROTO_RTMPS = (1 shl 23);
  91. CURLPROTO_RTMPTS = (1 shl 24);
  92. CURLPROTO_GOPHER = (1 shl 25);
  93. CURLPROTO_SMB = (1 shl 26);
  94. CURLPROTO_SMBS = (1 shl 27);
  95. CURLPROTO_ALL = (not 0);
  96. Type
  97. PAnsiChar = ^AnsiChar;
  98. Pcurl_calloc_callback = ^curl_calloc_callback;
  99. Pcurl_closepolicy = ^curl_closepolicy;
  100. Pcurl_forms = ^curl_forms;
  101. Pcurl_ftpauth = ^curl_ftpauth;
  102. Pcurl_ftpmethod = ^curl_ftpmethod;
  103. Pcurl_ftpssl = ^curl_ftpssl;
  104. PCURL_HTTP_VERSION = ^CURL_HTTP_VERSION;
  105. Pcurl_httppost = ^curl_httppost;
  106. PPcurl_httppost = ^Pcurl_httppost;
  107. Pcurl_infotype = ^curl_infotype;
  108. Pcurl_lock_access = ^curl_lock_access;
  109. Pcurl_lock_data = ^curl_lock_data;
  110. Pcurl_malloc_callback = ^curl_malloc_callback;
  111. PCURL_NETRC_OPTION = ^CURL_NETRC_OPTION;
  112. Pcurl_off_t = ^curl_off_t;
  113. Pcurl_proxytype = ^curl_proxytype;
  114. Pcurl_realloc_callback = ^curl_realloc_callback;
  115. Pcurl_slist = ^curl_slist;
  116. Pcurl_socket_t = ^curl_socket_t;
  117. PCURL_SSL_VERSION = ^CURL_SSL_VERSION;
  118. Pcurl_strdup_callback = ^curl_strdup_callback;
  119. PCURL_TIMECOND = ^CURL_TIMECOND;
  120. Pcurl_version_info_data = ^curl_version_info_data;
  121. PCURLcode = ^CURLcode;
  122. PCURLFORMcode = ^CURLFORMcode;
  123. PCURLformoption = ^CURLformoption;
  124. PCURLINFO = ^CURLINFO;
  125. Pcurliocmd = ^curliocmd;
  126. Pcurlioerr = ^curlioerr;
  127. PCURLM = ^CURLM;
  128. PCURLMcode = ^CURLMcode;
  129. PCURLMoption = ^CURLMoption;
  130. PCURLMSG = ^CURLMSG;
  131. PCURLoption = ^CURLoption;
  132. PCURLSH = ^CURLSH;
  133. PCURLSHcode = ^CURLSHcode;
  134. PCURLSHoption = ^CURLSHoption;
  135. PCURLversion = ^CURLversion;
  136. Pfd_set = pointer;
  137. PCURL = ^CURL;
  138. CURL = pointer;
  139. curl_off_t = off_t;
  140. curl_socket_t = THandle; //important on win64
  141. curl_httppost = record
  142. next : Pcurl_httppost; // next entry in the list
  143. name : PAnsiChar; // pointer to allocated name
  144. namelength : longint; // length of name length
  145. contents : PAnsiChar; // pointer to allocated data contents
  146. contentslength : longint; // length of contents field, see also CURL_HTTPPOST_LARGE
  147. buffer : PAnsiChar; // pointer to allocated buffer contents
  148. bufferlength : longint; // length of buffer field
  149. contenttype : PAnsiChar; // Content-Type
  150. contentheader : Pcurl_slist; // list of extra headers for this form
  151. more : Pcurl_httppost; { if one field name has more than one file,
  152. this link should link to following files }
  153. flags : longint; // as defined below
  154. showfilename : PAnsiChar; { The file name to show. If not set, the
  155. actual file name will be used (if this
  156. is a file part) }
  157. userp:Pointer; // custom pointer used for HTTPPOST_CALLBACK posts
  158. contentlen:curl_off_t; { alternative length of contents
  159. field. Used if CURL_HTTPPOST_LARGE is
  160. set. Added in 7.46.0 }
  161. end;
  162. curlfiletype = (
  163. CURLFILETYPE_FILE,
  164. CURLFILETYPE_DIRECTORY,
  165. CURLFILETYPE_SYMLINK,
  166. CURLFILETYPE_DEVICE_BLOCK,
  167. CURLFILETYPE_DEVICE_CHAR,
  168. CURLFILETYPE_NAMEDPIPE,
  169. CURLFILETYPE_SOCKET,
  170. CURLFILETYPE_DOOR,
  171. CURLFILETYPE_UNKNOWN);
  172. curl_fileinfo = record
  173. filename : ^AnsiChar;
  174. filetype : curlfiletype;
  175. time : time_t;
  176. perm : dword;
  177. uid : longint;
  178. gid : longint;
  179. size : curl_off_t;
  180. hardlinks : longint;
  181. strings : record
  182. time : ^AnsiChar;
  183. perm : ^AnsiChar;
  184. user : ^AnsiChar;
  185. group : ^AnsiChar;
  186. target : ^AnsiChar;
  187. end;
  188. flags : dword;
  189. b_data : ^AnsiChar;
  190. b_size : size_t;
  191. b_used : size_t;
  192. end;
  193. curl_progress_callback = function (clientp:pointer; dltotal:double; dlnow:double; ultotal:double; ulnow:double):longint;cdecl;
  194. curl_write_callback = function (buffer:PAnsiChar; size:size_t; nitems:size_t; outstream:pointer):size_t;cdecl;
  195. curl_read_callback = function (buffer:PAnsiChar; size:size_t; nitems:size_t; instream:pointer):size_t;cdecl;
  196. curl_passwd_callback = function (clientp:pointer; prompt:PAnsiChar; buffer:PAnsiChar; buflen:longint):longint;cdecl;
  197. curl_chunk_bgn_callback = function (transfer_info:pointer; ptr:pointer; remains:longint):longint;cdecl;
  198. curl_chunk_end_callback = function (ptr:pointer):longint;cdecl;
  199. curl_fnmatch_callback = function (ptr:pointer; pattern:PAnsiChar; _string:PAnsiChar):longint;cdecl;
  200. curl_seek_callback = function (instream:pointer; offset:curl_off_t; origin:longint):longint;cdecl;
  201. curl_XFERINFO_callback =function (clientp:pointer;dltotal:curl_off_t;dlnow:curl_off_t;ultotal:curl_off_t;ulnow:curl_off_t):longint; cdecl;
  202. curlsocktype = (
  203. CURLSOCKTYPE_IPCXN,
  204. CURLSOCKTYPE_LAST
  205. );
  206. curl_sockopt_callback = function (clientp:pointer; curlfd:curl_socket_t; purpose:curlsocktype):longint;cdecl;
  207. curl_sockaddr = record
  208. family : longint;
  209. socktype : longint;
  210. protocol : longint;
  211. addrlen : dword;
  212. addr : array[0..0] of byte; // variable length, needs typecast
  213. end;
  214. pcurl_sockaddr = ^curl_sockaddr;
  215. curl_opensocket_callback = function (clientp:pointer; purpose:curlsocktype; address:Pcurl_sockaddr):curl_socket_t;cdecl;
  216. curl_closesocket_callback = function (clientp:pointer; item:curl_socket_t):longint;cdecl;
  217. curlioerr = (CURLIOE_OK, CURLIOE_UNKNOWNCMD, CURLIOE_FAILRESTART, CURLIOE_LAST);
  218. curliocmd = (CURLIOCMD_NOP, CURLIOCMD_RESTARTREAD, CURLIOCMD_LAST);
  219. curl_ioctl_callback = function (handle:PCURL; cmd:longint; clientp:pointer):curlioerr;cdecl;
  220. curl_malloc_callback = function(size: size_t) : pointer; cdecl;
  221. curl_free_callback = procedure (ptr:pointer); cdecl;
  222. curl_realloc_callback = function(ptr : pointer; size:size_t) : pointer; cdecl;
  223. curl_strdup_callback = function(str : PAnsiChar) : PAnsiChar; cdecl;
  224. curl_calloc_callback = function(nmemb : size_t; size : size_t) : pointer; cdecl;
  225. curl_infotype = (CURLINFO_TEXT := 0,CURLINFO_HEADER_IN,
  226. CURLINFO_HEADER_OUT,CURLINFO_DATA_IN,
  227. CURLINFO_DATA_OUT,CURLINFO_SSL_DATA_IN,
  228. CURLINFO_SSL_DATA_OUT,CURLINFO_END);
  229. curl_debug_callback = function (handle:PCURL; _type:curl_infotype; data:PAnsiChar; size:size_t; userptr:pointer):longint;cdecl;
  230. curl_sslbackend =(
  231. CURLSSLBACKEND_NONE:= 0,
  232. CURLSSLBACKEND_OPENSSL:= 1,
  233. CURLSSLBACKEND_GNUTLS:= 2,
  234. CURLSSLBACKEND_NSS:= 3,
  235. CURLSSLBACKEND_OBSOLETE4:= 4, // Was QSOSSL.
  236. CURLSSLBACKEND_GSKIT:= 5,
  237. CURLSSLBACKEND_POLARSSL:= 6,
  238. CURLSSLBACKEND_WOLFSSL:= 7,
  239. CURLSSLBACKEND_SCHANNEL:= 8,
  240. CURLSSLBACKEND_DARWINSSL:= 9,
  241. CURLSSLBACKEND_AXTLS:= 10,
  242. CURLSSLBACKEND_MBEDTLS:= 11
  243. );
  244. CURLcode = (
  245. CURLE_OK := 0,
  246. CURLE_UNSUPPORTED_PROTOCOL, // 1
  247. CURLE_FAILED_INIT, // 2
  248. CURLE_URL_MALFORMAT, // 3
  249. CURLE_NOT_BUILT_IN, // 4 - [was obsoleted in August 2007 for
  250. // 7.17.0, reused in April 2011 for 7.21.5]
  251. CURLE_COULDNT_RESOLVE_PROXY, // 5
  252. CURLE_COULDNT_RESOLVE_HOST, // 6
  253. CURLE_COULDNT_CONNECT, // 7
  254. CURLE_WEIRD_SERVER_REPLY, // 8
  255. CURLE_REMOTE_ACCESS_DENIED, // 9 a service was denied by the server
  256. // due to lack of access - when login fails
  257. // this is not returned.
  258. CURLE_FTP_ACCEPT_FAILED, // 10 - [was obsoleted in April 2006 for
  259. // 7.15.4, reused in Dec 2011 for 7.24.0]
  260. CURLE_FTP_WEIRD_PASS_REPLY, // 11
  261. CURLE_FTP_ACCEPT_TIMEOUT, // 12 - timeout occurred accepting server
  262. // [was obsoleted in August 2007 for 7.17.0,
  263. // reused in Dec 2011 for 7.24.0]
  264. CURLE_FTP_WEIRD_PASV_REPLY, // 13
  265. CURLE_FTP_WEIRD_227_FORMAT, // 14
  266. CURLE_FTP_CANT_GET_HOST, // 15
  267. CURLE_HTTP2, // 16 - A problem in the http2 framing layer.
  268. // [was obsoleted in August 2007 for 7.17.0,
  269. // reused in July 2014 for 7.38.0]
  270. CURLE_FTP_COULDNT_SET_TYPE, // 17
  271. CURLE_PARTIAL_FILE, // 18
  272. CURLE_FTP_COULDNT_RETR_FILE, // 19
  273. CURLE_OBSOLETE20, // 20 - NOT USED
  274. CURLE_QUOTE_ERROR, // 21 - quote command failure
  275. CURLE_HTTP_RETURNED_ERROR, // 22
  276. CURLE_WRITE_ERROR, // 23
  277. CURLE_OBSOLETE24, // 24 - NOT USED
  278. CURLE_UPLOAD_FAILED, // 25 - failed upload "command"
  279. CURLE_READ_ERROR, // 26 - couldn't open/read from file
  280. CURLE_OUT_OF_MEMORY, // 27
  281. // Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
  282. // instead of a memory allocation error if CURL_DOES_CONVERSIONS
  283. // is defined
  284. CURLE_OPERATION_TIMEDOUT, // 28 - the timeout time was reached
  285. CURLE_OBSOLETE29, // 29 - NOT USED
  286. CURLE_FTP_PORT_FAILED, // 30 - FTP PORT operation failed
  287. CURLE_FTP_COULDNT_USE_REST, // 31 - the REST command failed
  288. CURLE_OBSOLETE32, // 32 - NOT USED
  289. CURLE_RANGE_ERROR, // 33 - RANGE "command" didn't work
  290. CURLE_HTTP_POST_ERROR, // 34
  291. CURLE_SSL_CONNECT_ERROR, // 35 - wrong when connecting with SSL
  292. CURLE_BAD_DOWNLOAD_RESUME, // 36 - couldn't resume download
  293. CURLE_FILE_COULDNT_READ_FILE, // 37
  294. CURLE_LDAP_CANNOT_BIND, // 38
  295. CURLE_LDAP_SEARCH_FAILED, // 39
  296. CURLE_OBSOLETE40, // 40 - NOT USED
  297. CURLE_FUNCTION_NOT_FOUND, // 41 - NOT USED starting with 7.53.0
  298. CURLE_ABORTED_BY_CALLBACK, // 42
  299. CURLE_BAD_FUNCTION_ARGUMENT, // 43
  300. CURLE_OBSOLETE44, // 44 - NOT USED
  301. CURLE_INTERFACE_FAILED, // 45 - CURLOPT_INTERFACE failed
  302. CURLE_OBSOLETE46, // 46 - NOT USED
  303. CURLE_TOO_MANY_REDIRECTS, // 47 - catch endless re-direct loops
  304. CURLE_UNKNOWN_OPTION, // 48 - User specified an unknown option
  305. CURLE_TELNET_OPTION_SYNTAX, // 49 - Malformed telnet option
  306. CURLE_OBSOLETE50, // 50 - NOT USED
  307. CURLE_PEER_FAILED_VERIFICATION, // 51 - peer's certificate or fingerprint
  308. // wasn't verified fine
  309. CURLE_GOT_NOTHING, // 52 - when this is a specific error
  310. CURLE_SSL_ENGINE_NOTFOUND, // 53 - SSL crypto engine not found
  311. CURLE_SSL_ENGINE_SETFAILED, // 54 - can not set SSL crypto engine as
  312. // default
  313. CURLE_SEND_ERROR, // 55 - failed sending network data
  314. CURLE_RECV_ERROR, // 56 - failure in receiving network data
  315. CURLE_OBSOLETE57, // 57 - NOT IN USE
  316. CURLE_SSL_CERTPROBLEM, // 58 - problem with the local certificate
  317. CURLE_SSL_CIPHER, // 59 - couldn't use specified cipher
  318. CURLE_SSL_CACERT, // 60 - problem with the CA cert (path?)
  319. CURLE_BAD_CONTENT_ENCODING, // 61 - Unrecognized/bad encoding
  320. CURLE_LDAP_INVALID_URL, // 62 - Invalid LDAP URL
  321. CURLE_FILESIZE_EXCEEDED, // 63 - Maximum file size exceeded
  322. CURLE_USE_SSL_FAILED, // 64 - Requested FTP SSL level failed
  323. CURLE_SEND_FAIL_REWIND, // 65 - Sending the data requires a rewind
  324. // that failed
  325. CURLE_SSL_ENGINE_INITFAILED, // 66 - failed to initialise ENGINE
  326. CURLE_LOGIN_DENIED, // 67 - user, password or similar was not
  327. // accepted and we failed to login
  328. CURLE_TFTP_NOTFOUND, // 68 - file not found on server
  329. CURLE_TFTP_PERM, // 69 - permission problem on server
  330. CURLE_REMOTE_DISK_FULL, // 70 - out of disk space on server
  331. CURLE_TFTP_ILLEGAL, // 71 - Illegal TFTP operation
  332. CURLE_TFTP_UNKNOWNID, // 72 - Unknown transfer ID
  333. CURLE_REMOTE_FILE_EXISTS, // 73 - File already exists
  334. CURLE_TFTP_NOSUCHUSER, // 74 - No such user
  335. CURLE_CONV_FAILED, // 75 - conversion failed
  336. CURLE_CONV_REQD, // 76 - caller must register conversion
  337. // callbacks using curl_easy_setopt options
  338. // CURLOPT_CONV_FROM_NETWORK_FUNCTION,
  339. // CURLOPT_CONV_TO_NETWORK_FUNCTION, and
  340. // CURLOPT_CONV_FROM_UTF8_FUNCTION
  341. CURLE_SSL_CACERT_BADFILE, // 77 - could not load CACERT file, missing
  342. // or wrong format
  343. CURLE_REMOTE_FILE_NOT_FOUND, // 78 - remote file not found
  344. CURLE_SSH, // 79 - error from the SSH layer, somewhat
  345. // generic so the error message will be of
  346. // interest when this has happened
  347. CURLE_SSL_SHUTDOWN_FAILED, // 80 - Failed to shut down the SSL
  348. // connection
  349. CURLE_AGAIN, // 81 - socket is not ready for send/recv,
  350. // wait till it's ready and try again (Added
  351. // in 7.18.2)
  352. CURLE_SSL_CRL_BADFILE, // 82 - could not load CRL file, missing or
  353. // wrong format (Added in 7.19.0)
  354. CURLE_SSL_ISSUER_ERROR, // 83 - Issuer check failed. (Added in
  355. // 7.19.0)
  356. CURLE_FTP_PRET_FAILED, // 84 - a PRET command failed
  357. CURLE_RTSP_CSEQ_ERROR, // 85 - mismatch of RTSP CSeq numbers
  358. CURLE_RTSP_SESSION_ERROR, // 86 - mismatch of RTSP Session Ids
  359. CURLE_FTP_BAD_FILE_LIST, // 87 - unable to parse FTP file list
  360. CURLE_CHUNK_FAILED, // 88 - chunk callback reported error
  361. CURLE_NO_CONNECTION_AVAILABLE, // 89 - No connection available, the
  362. // session will be queued
  363. CURLE_SSL_PINNEDPUBKEYNOTMATCH, // 90 - specified pinned public key did not
  364. // match
  365. CURLE_SSL_INVALIDCERTSTATUS, // 91 - invalid certificate status
  366. CURLE_HTTP2_STREAM, // 92 - stream error in HTTP/2 framing layer
  367. CURL_LAST); // never use!
  368. curl_conv_callback = function (buffer:PAnsiChar; length:size_t):CURLcode;cdecl;
  369. curl_ssl_ctx_callback = function (curl:PCURL; ssl_ctx:pointer; userptr:pointer):CURLcode;cdecl;
  370. curl_proxytype = (
  371. CURLPROXY_HTTP := 0,
  372. CURLPROXY_SOCKS4 := 4,
  373. CURLPROXY_SOCKS5 := 5,
  374. CURLPROXY_SOCKS4A := 6,
  375. CURLPROXY_SOCKS5_HOSTNAME := 7);
  376. curl_khtype = (
  377. CURLKHTYPE_UNKNOWN,
  378. CURLKHTYPE_RSA1,
  379. CURLKHTYPE_RSA,
  380. CURLKHTYPE_DSS,
  381. CURLKHTYPE_ECDSA,
  382. CURLKHTYPE_ED25519
  383. );
  384. curl_khkey = record
  385. key : ^AnsiChar;
  386. len : size_t;
  387. keytype : curl_khtype;
  388. end;
  389. pcurl_khkey = ^curl_khkey;
  390. curl_khstat = (CURLKHSTAT_FINE_ADD_TO_FILE,
  391. CURLKHSTAT_FINE,
  392. CURLKHSTAT_REJECT,
  393. CURLKHSTAT_DEFER,
  394. CURLKHSTAT_LAST
  395. );
  396. curl_khmatch = (
  397. CURLKHMATCH_OK,
  398. CURLKHMATCH_MISMATCH,
  399. CURLKHMATCH_MISSING,
  400. CURLKHMATCH_LAST);
  401. curl_sshkeycallback = function (easy:PCURL; knownkey:Pcurl_khkey; foundkey:Pcurl_khkey; _para4:curl_khmatch; clientp:pointer):longint;cdecl;
  402. curl_usessl = (
  403. CURLUSESSL_NONE,
  404. CURLUSESSL_TRY,
  405. CURLUSESSL_CONTROL,
  406. CURLUSESSL_ALL,
  407. CURLUSESSL_LAST);
  408. curl_ftpccc = (CURLFTPSSL_CCC_NONE,CURLFTPSSL_CCC_PASSIVE,
  409. CURLFTPSSL_CCC_ACTIVE,CURLFTPSSL_CCC_LAST
  410. );
  411. curl_ftpauth = (
  412. CURLFTPAUTH_DEFAULT,
  413. CURLFTPAUTH_SSL,
  414. CURLFTPAUTH_TLS,
  415. CURLFTPAUTH_LAST);
  416. curl_ftpssl = curl_usessl;
  417. curl_ftpcreatedir = (
  418. CURLFTP_CREATE_DIR_NONE,CURLFTP_CREATE_DIR,
  419. CURLFTP_CREATE_DIR_RETRY,CURLFTP_CREATE_DIR_LAST
  420. );
  421. curl_ftpmethod = (CURLFTPMETHOD_DEFAULT,CURLFTPMETHOD_MULTICWD,
  422. CURLFTPMETHOD_NOCWD,CURLFTPMETHOD_SINGLECWD,
  423. CURLFTPMETHOD_LAST);
  424. CURLoption = (
  425. CURLOPT_WRITEDATA:=CURLOPTTYPE_OBJECTPOINT+1,
  426. { The full URL to get/put }
  427. CURLOPT_URL:=CURLOPTTYPE_STRINGPOINT+2,
  428. { Port number to connect to+if other than default. }
  429. CURLOPT_PORT:=CURLOPTTYPE_LONG+3,
  430. { Name of proxy to use. }
  431. CURLOPT_PROXY:=CURLOPTTYPE_STRINGPOINT+4,
  432. { "user:password;options" to use when fetching. }
  433. CURLOPT_USERPWD:=CURLOPTTYPE_STRINGPOINT+5,
  434. { "user:password" to use with proxy. }
  435. CURLOPT_PROXYUSERPWD:=CURLOPTTYPE_STRINGPOINT+6,
  436. { Range to get+specified as an ASCII string. }
  437. CURLOPT_RANGE:=CURLOPTTYPE_STRINGPOINT+7,
  438. { not used }
  439. { Specified file stream to upload from (use as input: }
  440. CURLOPT_READDATA:=CURLOPTTYPE_OBJECTPOINT+9,
  441. { Buffer to receive error messages in+must be at least CURL_ERROR_SIZE
  442. * bytes big. If this is not used+error messages go to stderr instead: }
  443. CURLOPT_ERRORBUFFER:=CURLOPTTYPE_OBJECTPOINT+10,
  444. { Function that will be called to store the output (instead of fwrite. The
  445. * parameters will use fwrite( syntax+make sure to follow them. }
  446. CURLOPT_WRITEFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+11,
  447. { Function that will be called to read the input (instead of fread. The
  448. * parameters will use fread( syntax+make sure to follow them. }
  449. CURLOPT_READFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+12,
  450. { Time-out the read operation after this amount of seconds }
  451. CURLOPT_TIMEOUT:=CURLOPTTYPE_LONG+13,
  452. { If the CURLOPT_INFILE is used+this can be used to inform libcurl about
  453. * how large the file being sent really is. That allows better error
  454. * checking and better verifies that the upload was successful. -1 means
  455. * unknown size.
  456. *
  457. * For large file support+there is also a _LARGE version of the key
  458. * which takes anCURLOPTTYPE_OFF_T type+allowing platforms with largerCURLOPTTYPE_OFF_T
  459. * sizes to handle larger files. See below for INFILESIZE_LARGE.
  460. }
  461. CURLOPT_INFILESIZE:=CURLOPTTYPE_LONG+14,
  462. { POST static input fields. }
  463. CURLOPT_POSTFIELDS:=CURLOPTTYPE_OBJECTPOINT+15,
  464. { Set the referrer page (needed by some CGIs }
  465. CURLOPT_REFERER:=CURLOPTTYPE_STRINGPOINT+16,
  466. { Set the FTP PORT string (interface name+named or numerical IP address
  467. Use i.e '-' to use default address. }
  468. CURLOPT_FTPPORT:=CURLOPTTYPE_STRINGPOINT+17,
  469. { Set the User-Agent string (examined by some CGIs }
  470. CURLOPT_USERAGENT:=CURLOPTTYPE_STRINGPOINT+18,
  471. { If the download receives less than "low speed limit" bytes/second
  472. * during "low speed time" seconds+the operations is aborted.
  473. * You could i.e if you have a pretty high speed connection+abort if
  474. * it is less than 2000 bytes/sec during 20 seconds.
  475. }
  476. { Set the "low speed limit" }
  477. CURLOPT_LOW_SPEED_LIMIT:=CURLOPTTYPE_LONG+19,
  478. { Set the "low speed time" }
  479. CURLOPT_LOW_SPEED_TIME:=CURLOPTTYPE_LONG+20,
  480. { Set the continuation offset.
  481. *
  482. * Note there is also a _LARGE version of this key which uses
  483. *CURLOPTTYPE_OFF_T types+allowing for large file offsets on platforms which
  484. * use larger-than-32-bitCURLOPTTYPE_OFF_T's. Look below for RESUME_FROM_LARGE.
  485. }
  486. CURLOPT_RESUME_FROM:=CURLOPTTYPE_LONG+21,
  487. { Set cookie in request: }
  488. CURLOPT_COOKIE:=CURLOPTTYPE_STRINGPOINT+22,
  489. { This points to a linked list of headers+struct curl_slist kind. This
  490. list is also used for RTSP (in spite of its name }
  491. CURLOPT_HTTPHEADER:=CURLOPTTYPE_OBJECTPOINT+23,
  492. { This points to a linked list of post entries+struct curl_httppost }
  493. CURLOPT_HTTPPOST:=CURLOPTTYPE_OBJECTPOINT+24,
  494. { name of the file keeping your private SSL-certificate }
  495. CURLOPT_SSLCERT:=CURLOPTTYPE_STRINGPOINT+25,
  496. { password for the SSL or SSH private key }
  497. CURLOPT_KEYPASSWD:=CURLOPTTYPE_STRINGPOINT+26,
  498. { send TYPE parameter? }
  499. CURLOPT_CRLF:=CURLOPTTYPE_LONG+27,
  500. { send linked-list of QUOTE commands }
  501. CURLOPT_QUOTE:=CURLOPTTYPE_OBJECTPOINT+28,
  502. { send FILE * or void * to store headers to+if you use a callback it
  503. is simply passed to the callback unmodified }
  504. CURLOPT_HEADERDATA:=CURLOPTTYPE_OBJECTPOINT+29,
  505. { point to a file to read the initial cookies from+also enables
  506. "cookie awareness" }
  507. CURLOPT_COOKIEFILE:=CURLOPTTYPE_STRINGPOINT+31,
  508. { What version to specifically try to use.
  509. See CURL_SSLVERSION defines below. }
  510. CURLOPT_SSLVERSION:=CURLOPTTYPE_LONG+32,
  511. { What kind of HTTP time condition to use+see defines }
  512. CURLOPT_TIMECONDITION:=CURLOPTTYPE_LONG+33,
  513. { Time to use with the above condition. Specified in number of seconds
  514. since 1 Jan 1970 }
  515. CURLOPT_TIMEVALUE:=CURLOPTTYPE_LONG+34,
  516. { 35 = OBSOLETE }
  517. { Custom request+for customizing the get command like
  518. HTTP: DELETE+TRACE and others
  519. FTP: to use a different list command
  520. }
  521. CURLOPT_CUSTOMREQUEST:=CURLOPTTYPE_STRINGPOINT+36,
  522. { FILE handle to use instead of stderr }
  523. CURLOPT_STDERR:=CURLOPTTYPE_OBJECTPOINT+37,
  524. { 38 is not used }
  525. { send linked-list of post-transfer QUOTE commands }
  526. CURLOPT_POSTQUOTE:=CURLOPTTYPE_OBJECTPOINT+39,
  527. CURLOPT_OBSOLETE40:=CURLOPTTYPE_OBJECTPOINT+40,{ OBSOLETE+do not use! }
  528. CURLOPT_VERBOSE:=CURLOPTTYPE_LONG+41, { talk a lot }
  529. CURLOPT_HEADER:=CURLOPTTYPE_LONG+42, { throw the header out too }
  530. CURLOPT_NOPROGRESS:=CURLOPTTYPE_LONG+43, { shut off the progress meter }
  531. CURLOPT_NOBODY:=CURLOPTTYPE_LONG+44, { use HEAD to get http document }
  532. CURLOPT_FAILONERROR:=CURLOPTTYPE_LONG+45, { no output on http error codes >= 400 }
  533. CURLOPT_UPLOAD:=CURLOPTTYPE_LONG+46, { this is an upload }
  534. CURLOPT_POST:=CURLOPTTYPE_LONG+47, { HTTP POST method }
  535. CURLOPT_DIRLISTONLY:=CURLOPTTYPE_LONG+48, { bare names when listing directories }
  536. CURLOPT_APPEND:=CURLOPTTYPE_LONG+50, { Append instead of overwrite on upload! }
  537. { Specify whether to read the user+password from the .netrc or the URL.
  538. * This must be one of the CURL_NETRC_* enums below. }
  539. CURLOPT_NETRC:=CURLOPTTYPE_LONG+51,
  540. CURLOPT_FOLLOWLOCATION:=CURLOPTTYPE_LONG+52, { use Location: Luke! }
  541. CURLOPT_TRANSFERTEXT:=CURLOPTTYPE_LONG+53,{ transfer data in text/ASCII format }
  542. CURLOPT_PUT:=CURLOPTTYPE_LONG+54, { HTTP PUT }
  543. { 55 = OBSOLETE }
  544. { DEPRECATED
  545. * Function that will be called instead of the internal progress display
  546. * function. This function should be defined as the curl_progress_callback
  547. * prototype defines. }
  548. CURLOPT_PROGRESSFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+56,
  549. { Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
  550. callbacks }
  551. CURLOPT_PROGRESSDATA:=CURLOPTTYPE_OBJECTPOINT+57,
  552. { We want the referrer field set automatically when following locations }
  553. CURLOPT_AUTOREFERER:=CURLOPTTYPE_LONG+58,
  554. { Port of the proxy+can be set in the proxy string as well with:
  555. "[host]:[port]" }
  556. CURLOPT_PROXYPORT:=CURLOPTTYPE_LONG+59,
  557. { size of the POST input data+if strlen( is not good to use }
  558. CURLOPT_POSTFIELDSIZE:=CURLOPTTYPE_LONG+60,
  559. { tunnel non-http operations through a HTTP proxy }
  560. CURLOPT_HTTPPROXYTUNNEL:=CURLOPTTYPE_LONG+61,
  561. { Set the interface string to use as outgoing network interface }
  562. CURLOPT_INTERFACE:=CURLOPTTYPE_STRINGPOINT+62,
  563. { Set the krb4/5 security level+this also enables krb4/5 awareness. This
  564. * is a string+'clear'+'safe'+'confidential' or 'private'. If the string
  565. * is set but doesn't match one of these+'private' will be used. }
  566. CURLOPT_KRBLEVEL:=CURLOPTTYPE_STRINGPOINT+63,
  567. { Set if we should verify the peer in ssl handshake+set 1 to verify. }
  568. CURLOPT_SSL_VERIFYPEER:=CURLOPTTYPE_LONG+64,
  569. { The CApath or CAfile used to validate the peer certificate
  570. this option is used only if SSL_VERIFYPEER is true }
  571. CURLOPT_CAINFO:=CURLOPTTYPE_STRINGPOINT+65,
  572. { 66 = OBSOLETE } { 67 = OBSOLETE }
  573. { Maximum number of http redirects to follow }
  574. CURLOPT_MAXREDIRS:=CURLOPTTYPE_LONG+68,
  575. { Pass aCURLOPTTYPE_LONG set to 1 to get the date of the requested document (if
  576. possible! Pass a zero to shut it off. }
  577. CURLOPT_FILETIME:=CURLOPTTYPE_LONG+69,
  578. { This points to a linked list of telnet options }
  579. CURLOPT_TELNETOPTIONS:=CURLOPTTYPE_OBJECTPOINT+70,
  580. { Max amount of cached alive connections }
  581. CURLOPT_MAXCONNECTS:=CURLOPTTYPE_LONG+71,
  582. CURLOPT_OBSOLETE72:=CURLOPTTYPE_LONG+72,{ OBSOLETE+do not use! }
  583. { 73 = OBSOLETE }
  584. { Set to explicitly use a new connection for the upcoming transfer.
  585. Do not use this unless you're absolutely sure of this+as it makes the
  586. operation slower and is less friendly for the network. }
  587. CURLOPT_FRESH_CONNECT:=CURLOPTTYPE_LONG+74,
  588. { Set to explicitly forbid the upcoming transfer's connection to be re-used
  589. when done. Do not use this unless you're absolutely sure of this+as it
  590. makes the operation slower and is less friendly for the network. }
  591. CURLOPT_FORBID_REUSE:=CURLOPTTYPE_LONG+75,
  592. { Set to a file name that contains random data for libcurl to use to
  593. seed the random engine when doing SSL connects. }
  594. CURLOPT_RANDOM_FILE:=CURLOPTTYPE_STRINGPOINT+76,
  595. { Set to the Entropy Gathering Daemon socket pathname }
  596. CURLOPT_EGDSOCKET:=CURLOPTTYPE_STRINGPOINT+77,
  597. { Time-out connect operations after this amount of seconds+if connects are
  598. OK within this time+then fine... This only aborts the connect phase. }
  599. CURLOPT_CONNECTTIMEOUT:=CURLOPTTYPE_LONG+78,
  600. { Function that will be called to store headers (instead of fwrite. The
  601. * parameters will use fwrite( syntax+make sure to follow them. }
  602. CURLOPT_HEADERFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+79,
  603. { Set this to force the HTTP request to get back to GET. Only really usable
  604. if POST+PUT or a custom request have been used first.
  605. }
  606. CURLOPT_HTTPGET:=CURLOPTTYPE_LONG+80,
  607. { Set if we should verify the Common name from the peer certificate in ssl
  608. * handshake+set 1 to check existence+2 to ensure that it matches the
  609. * provided hostname. }
  610. CURLOPT_SSL_VERIFYHOST:=CURLOPTTYPE_LONG+81,
  611. { Specify which file name to write all known cookies in after completed
  612. operation. Set file name to "-" (dash to make it go to stdout. }
  613. CURLOPT_COOKIEJAR:=CURLOPTTYPE_STRINGPOINT+82,
  614. { Specify which SSL ciphers to use }
  615. CURLOPT_SSL_CIPHER_LIST:=CURLOPTTYPE_STRINGPOINT+83,
  616. { Specify which HTTP version to use! This must be set to one of the
  617. CURL_HTTP_VERSION* enums set below. }
  618. CURLOPT_HTTP_VERSION:=CURLOPTTYPE_LONG+84,
  619. { Specifically switch on or off the FTP engine's use of the EPSV command. By
  620. default+that one will always be attempted before the more traditional
  621. PASV command. }
  622. CURLOPT_FTP_USE_EPSV:=CURLOPTTYPE_LONG+85,
  623. { type of the file keeping your SSL-certificate ("DER"+"PEM"+"ENG" }
  624. CURLOPT_SSLCERTTYPE:=CURLOPTTYPE_STRINGPOINT+86,
  625. { name of the file keeping your private SSL-key }
  626. CURLOPT_SSLKEY:=CURLOPTTYPE_STRINGPOINT+87,
  627. { type of the file keeping your private SSL-key ("DER"+"PEM"+"ENG" }
  628. CURLOPT_SSLKEYTYPE:=CURLOPTTYPE_STRINGPOINT+88,
  629. { crypto engine for the SSL-sub system }
  630. CURLOPT_SSLENGINE:=CURLOPTTYPE_STRINGPOINT+89,
  631. { set the crypto engine for the SSL-sub system as default
  632. the param has no meaning...
  633. }
  634. CURLOPT_SSLENGINE_DEFAULT:=CURLOPTTYPE_LONG+90,
  635. { Non-zero value means to use the global dns cache }
  636. CURLOPT_DNS_USE_GLOBAL_CACHE:=CURLOPTTYPE_LONG+91,{ DEPRECATED+do not use! }
  637. { DNS cache timeout }
  638. CURLOPT_DNS_CACHE_TIMEOUT:=CURLOPTTYPE_LONG+92,
  639. { send linked-list of pre-transfer QUOTE commands }
  640. CURLOPT_PREQUOTE:=CURLOPTTYPE_OBJECTPOINT+93,
  641. { set the debug function }
  642. CURLOPT_DEBUGFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+94,
  643. { set the data for the debug function }
  644. CURLOPT_DEBUGDATA:=CURLOPTTYPE_OBJECTPOINT+95,
  645. { mark this as start of a cookie session }
  646. CURLOPT_COOKIESESSION:=CURLOPTTYPE_LONG+96,
  647. { The CApath directory used to validate the peer certificate
  648. this option is used only if SSL_VERIFYPEER is true }
  649. CURLOPT_CAPATH:=CURLOPTTYPE_STRINGPOINT+97,
  650. { Instruct libcurl to use a smaller receive buffer }
  651. CURLOPT_BUFFERSIZE:=CURLOPTTYPE_LONG+98,
  652. { Instruct libcurl to not use any signal/alarm handlers+even when using
  653. timeouts. This option is useful for multi-threaded applications.
  654. See libcurl-the-guide for more background information. }
  655. CURLOPT_NOSIGNAL:=CURLOPTTYPE_LONG+99,
  656. { Provide a CURLShare for mutexing non-ts data }
  657. CURLOPT_SHARE:=CURLOPTTYPE_OBJECTPOINT+100,
  658. { indicates type of proxy. accepted values are CURLPROXY_HTTP (default,
  659. CURLPROXY_HTTPS+CURLPROXY_SOCKS4+CURLPROXY_SOCKS4A and
  660. CURLPROXY_SOCKS5. }
  661. CURLOPT_PROXYTYPE:=CURLOPTTYPE_LONG+101,
  662. { Set the Accept-Encoding string. Use this to tell a server you would like
  663. the response to be compressed. Before 7.21.6+this was known as
  664. CURLOPT_ENCODING }
  665. CURLOPT_ACCEPT_ENCODING:=CURLOPTTYPE_STRINGPOINT+102,
  666. { Set pointer to private data }
  667. CURLOPT_PRIVATE:=CURLOPTTYPE_OBJECTPOINT+103,
  668. { Set aliases for HTTP 200 in the HTTP Response header }
  669. CURLOPT_HTTP200ALIASES:=CURLOPTTYPE_OBJECTPOINT+104,
  670. { Continue to send authentication (user+password when following locations,
  671. even when hostname changed. This can potentially send off the name
  672. and password to whatever host the server decides. }
  673. CURLOPT_UNRESTRICTED_AUTH:=CURLOPTTYPE_LONG+105,
  674. { Specifically switch on or off the FTP engine's use of the EPRT command (
  675. it also disables the LPRT attempt. By default+those ones will always be
  676. attempted before the good old traditional PORT command. }
  677. CURLOPT_FTP_USE_EPRT:=CURLOPTTYPE_LONG+106,
  678. { Set this to a bitmask value to enable the particular authentications
  679. methods you like. Use this in combination with CURLOPT_USERPWD.
  680. Note that setting multiple bits may cause extra network round-trips. }
  681. CURLOPT_HTTPAUTH:=CURLOPTTYPE_LONG+107,
  682. { Set the ssl context callback function+currently only for OpenSSL ssl_ctx
  683. in second argument. The function must be matching the
  684. curl_ssl_ctx_callback proto. }
  685. CURLOPT_SSL_CTX_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+108,
  686. { Set the userdata for the ssl context callback function's third
  687. argument }
  688. CURLOPT_SSL_CTX_DATA:=CURLOPTTYPE_OBJECTPOINT+109,
  689. { FTP Option that causes missing dirs to be created on the remote server.
  690. In 7.19.4 we introduced the convenience enums for this option using the
  691. CURLFTP_CREATE_DIR prefix.
  692. }
  693. CURLOPT_FTP_CREATE_MISSING_DIRS:=CURLOPTTYPE_LONG+110,
  694. { Set this to a bitmask value to enable the particular authentications
  695. methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
  696. Note that setting multiple bits may cause extra network round-trips. }
  697. CURLOPT_PROXYAUTH:=CURLOPTTYPE_LONG+111,
  698. { FTP option that changes the timeout+in seconds+associated with
  699. getting a response. This is different from transfer timeout time and
  700. essentially places a demand on the FTP server to acknowledge commands
  701. in a timely manner. }
  702. CURLOPT_FTP_RESPONSE_TIMEOUT:=CURLOPTTYPE_LONG+112,
  703. { Set this option to one of the CURL_IPRESOLVE_* defines (see below to
  704. tell libcurl to resolve names to those IP versions only. This only has
  705. affect on systems with support for more than one+i.e IPv4 _and_ IPv6. }
  706. CURLOPT_IPRESOLVE:=CURLOPTTYPE_LONG+113,
  707. { Set this option to limit the size of a file that will be downloaded from
  708. an HTTP or FTP server.
  709. Note there is also _LARGE version which adds large file support for
  710. platforms which have largerCURLOPTTYPE_OFF_T sizes. See MAXFILESIZE_LARGE below. }
  711. CURLOPT_MAXFILESIZE:=CURLOPTTYPE_LONG+114,
  712. { See the comment for INFILESIZE above+but in short+specifies
  713. * the size of the file being uploaded. -1 means unknown.
  714. }
  715. CURLOPT_INFILESIZE_LARGE:=CURLOPTTYPE_OFF_T+115,
  716. { Sets the continuation offset. There is also aCURLOPTTYPE_LONG version of this;
  717. * look above for RESUME_FROM.
  718. }
  719. CURLOPT_RESUME_FROM_LARGE:=CURLOPTTYPE_OFF_T+116,
  720. { Sets the maximum size of data that will be downloaded from
  721. * an HTTP or FTP server. See MAXFILESIZE above for theCURLOPTTYPE_LONG version.
  722. }
  723. CURLOPT_MAXFILESIZE_LARGE:=CURLOPTTYPE_OFF_T+117,
  724. { Set this option to the file name of your .netrc file you want libcurl
  725. to parse (using the CURLOPT_NETRC option. If not set+libcurl will do
  726. a poor attempt to find the user's home directory and check for a .netrc
  727. file in there. }
  728. CURLOPT_NETRC_FILE:=CURLOPTTYPE_STRINGPOINT+118,
  729. { Enable SSL/TLS for FTP+pick one of:
  730. CURLUSESSL_TRY - try using SSL+proceed anyway otherwise
  731. CURLUSESSL_CONTROL - SSL for the control connection or fail
  732. CURLUSESSL_ALL - SSL for all communication or fail
  733. }
  734. CURLOPT_USE_SSL:=CURLOPTTYPE_LONG+119,
  735. { The _LARGE version of the standard POSTFIELDSIZE option }
  736. CURLOPT_POSTFIELDSIZE_LARGE:=CURLOPTTYPE_OFF_T+120,
  737. { Enable/disable the TCP Nagle algorithm }
  738. CURLOPT_TCP_NODELAY:=CURLOPTTYPE_LONG+121,
  739. { 122 OBSOLETE+used in 7.12.3. Gone in 7.13.0 } { 123 OBSOLETE. Gone in 7.16.0 } { 124 OBSOLETE+used in 7.12.3. Gone in 7.13.0 } { 125 OBSOLETE+used in 7.12.3. Gone in 7.13.0 } { 126 OBSOLETE+used in 7.12.3. Gone in 7.13.0 } { 127 OBSOLETE. Gone in 7.16.0 } { 128 OBSOLETE. Gone in 7.16.0 }
  740. { When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL+this option
  741. can be used to change libcurl's default action which is to first try
  742. "AUTH SSL" and then "AUTH TLS" in this order+and proceed when a OK
  743. response has been received.
  744. Available parameters are:
  745. CURLFTPAUTH_DEFAULT - let libcurl decide
  746. CURLFTPAUTH_SSL - try "AUTH SSL" first+then TLS
  747. CURLFTPAUTH_TLS - try "AUTH TLS" first+then SSL
  748. }
  749. CURLOPT_FTPSSLAUTH:=CURLOPTTYPE_LONG+129,
  750. CURLOPT_IOCTLFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+130,
  751. CURLOPT_IOCTLDATA:=CURLOPTTYPE_OBJECTPOINT+131,
  752. { 132 OBSOLETE. Gone in 7.16.0 } { 133 OBSOLETE. Gone in 7.16.0 }
  753. { zero terminated string for pass on to the FTP server when asked for
  754. "account" info }
  755. CURLOPT_FTP_ACCOUNT:=CURLOPTTYPE_STRINGPOINT+134,
  756. { feed cookie into cookie engine }
  757. CURLOPT_COOKIELIST:=CURLOPTTYPE_STRINGPOINT+135,
  758. { ignore Content-Length }
  759. CURLOPT_IGNORE_CONTENT_LENGTH:=CURLOPTTYPE_LONG+136,
  760. { Set to non-zero to skip the IP address received in a 227 PASV FTP server
  761. response. Typically used for FTP-SSL purposes but is not restricted to
  762. that. libcurl will then instead use the same IP address it used for the
  763. control connection. }
  764. CURLOPT_FTP_SKIP_PASV_IP:=CURLOPTTYPE_LONG+137,
  765. { Select "file method" to use when doing FTP+see the curl_ftpmethod
  766. above. }
  767. CURLOPT_FTP_FILEMETHOD:=CURLOPTTYPE_LONG+138,
  768. { Local port number to bind the socket to }
  769. CURLOPT_LOCALPORT:=CURLOPTTYPE_LONG+139,
  770. { Number of ports to try+including the first one set with LOCALPORT.
  771. Thus+setting it to 1 will make no additional attempts but the first.
  772. }
  773. CURLOPT_LOCALPORTRANGE:=CURLOPTTYPE_LONG+140,
  774. { no transfer+set up connection and let application use the socket by
  775. extracting it with CURLINFO_LASTSOCKET }
  776. CURLOPT_CONNECT_ONLY:=CURLOPTTYPE_LONG+141,
  777. { Function that will be called to convert from the
  778. network encoding (instead of using the iconv calls in libcurl }
  779. CURLOPT_CONV_FROM_NETWORK_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+142,
  780. { Function that will be called to convert to the
  781. network encoding (instead of using the iconv calls in libcurl }
  782. CURLOPT_CONV_TO_NETWORK_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+143,
  783. { Function that will be called to convert from UTF8
  784. (instead of using the iconv calls in libcurl
  785. Note that this is used only for SSL certificate processing }
  786. CURLOPT_CONV_FROM_UTF8_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+144,
  787. { if the connection proceeds too quickly then need to slow it down } { limit-rate: maximum number of bytes per second to send or receive }
  788. CURLOPT_MAX_SEND_SPEED_LARGE:=CURLOPTTYPE_OFF_T+145,
  789. CURLOPT_MAX_RECV_SPEED_LARGE:=CURLOPTTYPE_OFF_T+146,
  790. { Pointer to command string to send if USER/PASS fails. }
  791. CURLOPT_FTP_ALTERNATIVE_TO_USER:=CURLOPTTYPE_STRINGPOINT+147,
  792. { callback function for setting socket options }
  793. CURLOPT_SOCKOPTFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+148,
  794. CURLOPT_SOCKOPTDATA:=CURLOPTTYPE_OBJECTPOINT+149,
  795. { set to 0 to disable session ID re-use for this transfer+default is
  796. enabled (== 1 }
  797. CURLOPT_SSL_SESSIONID_CACHE:=CURLOPTTYPE_LONG+150,
  798. { allowed SSH authentication methods }
  799. CURLOPT_SSH_AUTH_TYPES:=CURLOPTTYPE_LONG+151,
  800. { Used by scp/sftp to do public/private key authentication }
  801. CURLOPT_SSH_PUBLIC_KEYFILE:=CURLOPTTYPE_STRINGPOINT+152,
  802. CURLOPT_SSH_PRIVATE_KEYFILE:=CURLOPTTYPE_STRINGPOINT+153,
  803. { Send CCC (Clear Command Channel after authentication }
  804. CURLOPT_FTP_SSL_CCC:=CURLOPTTYPE_LONG+154,
  805. { Same as TIMEOUT and CONNECTTIMEOUT+but with ms resolution }
  806. CURLOPT_TIMEOUT_MS:=CURLOPTTYPE_LONG+155,
  807. CURLOPT_CONNECTTIMEOUT_MS:=CURLOPTTYPE_LONG+156,
  808. { set to zero to disable the libcurl's decoding and thus pass the raw body
  809. data to the application even when it is encoded/compressed }
  810. CURLOPT_HTTP_TRANSFER_DECODING:=CURLOPTTYPE_LONG+157,
  811. CURLOPT_HTTP_CONTENT_DECODING:=CURLOPTTYPE_LONG+158,
  812. { Permission used when creating new files and directories on the remote
  813. server for protocols that support it+SFTP/SCP/FILE }
  814. CURLOPT_NEW_FILE_PERMS:=CURLOPTTYPE_LONG+159,
  815. CURLOPT_NEW_DIRECTORY_PERMS:=CURLOPTTYPE_LONG+160,
  816. { Set the behaviour of POST when redirecting. Values must be set to one
  817. of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 }
  818. CURLOPT_POSTREDIR:=CURLOPTTYPE_LONG+161,
  819. { used by scp/sftp to verify the host's public key }
  820. CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:=CURLOPTTYPE_STRINGPOINT+162,
  821. { Callback function for opening socket (instead of socket(2. Optionally,
  822. callback is able change the address or refuse to connect returning
  823. CURL_SOCKET_BAD. The callback should have type
  824. curl_opensocket_callback }
  825. CURLOPT_OPENSOCKETFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+163,
  826. CURLOPT_OPENSOCKETDATA:=CURLOPTTYPE_OBJECTPOINT+164,
  827. { POST volatile input fields. }
  828. CURLOPT_COPYPOSTFIELDS:=CURLOPTTYPE_OBJECTPOINT+165,
  829. { set transfer mode (;type=<a|i> when doing FTP via an HTTP proxy }
  830. CURLOPT_PROXY_TRANSFER_MODE:=CURLOPTTYPE_LONG+166,
  831. { Callback function for seeking in the input stream }
  832. CURLOPT_SEEKFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+167,
  833. CURLOPT_SEEKDATA:=CURLOPTTYPE_OBJECTPOINT+168,
  834. { CRL file }
  835. CURLOPT_CRLFILE:=CURLOPTTYPE_STRINGPOINT+169,
  836. { Issuer certificate }
  837. CURLOPT_ISSUERCERT:=CURLOPTTYPE_STRINGPOINT+170,
  838. { (IPv6 Address scope }
  839. CURLOPT_ADDRESS_SCOPE:=CURLOPTTYPE_LONG+171,
  840. { Collect certificate chain info and allow it to get retrievable with
  841. CURLINFO_CERTINFO after the transfer is complete. }
  842. CURLOPT_CERTINFO:=CURLOPTTYPE_LONG+172,
  843. { "name" and "pwd" to use when fetching. }
  844. CURLOPT_USERNAME:=CURLOPTTYPE_STRINGPOINT+173,
  845. CURLOPT_PASSWORD:=CURLOPTTYPE_STRINGPOINT+174,
  846. { "name" and "pwd" to use with Proxy when fetching. }
  847. CURLOPT_PROXYUSERNAME:=CURLOPTTYPE_STRINGPOINT+175,
  848. CURLOPT_PROXYPASSWORD:=CURLOPTTYPE_STRINGPOINT+176,
  849. { Comma separated list of hostnames defining no-proxy zones. These should
  850. match both hostnames directly+and hostnames within a domain. For
  851. example+local.com will match local.com and www.local.com+but NOT
  852. notlocal.com or www.notlocal.com. For compatibility with other
  853. implementations of this+.local.com will be considered to be the same as
  854. local.com. A single * is the only valid wildcard+and effectively
  855. disables the use of proxy. }
  856. CURLOPT_NOPROXY:=CURLOPTTYPE_STRINGPOINT+177,
  857. { block size for TFTP transfers }
  858. CURLOPT_TFTP_BLKSIZE:=CURLOPTTYPE_LONG+178,
  859. { Socks Service }
  860. CURLOPT_SOCKS5_GSSAPI_SERVICE:=CURLOPTTYPE_STRINGPOINT+179,{ DEPRECATED+do not use! }
  861. { Socks Service }
  862. CURLOPT_SOCKS5_GSSAPI_NEC:=CURLOPTTYPE_LONG+180,
  863. { set the bitmask for the protocols that are allowed to be used for the
  864. transfer+which thus helps the app which takes URLs from users or other
  865. external inputs and want to restrict what protocol(s to deal
  866. with. Defaults to CURLPROTO_ALL. }
  867. CURLOPT_PROTOCOLS:=CURLOPTTYPE_LONG+181,
  868. { set the bitmask for the protocols that libcurl is allowed to follow to,
  869. as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
  870. to be set in both bitmasks to be allowed to get redirected to. Defaults
  871. to all protocols except FILE and SCP. }
  872. CURLOPT_REDIR_PROTOCOLS:=CURLOPTTYPE_LONG+182,
  873. { set the SSH knownhost file name to use }
  874. CURLOPT_SSH_KNOWNHOSTS:=CURLOPTTYPE_STRINGPOINT+183,
  875. { set the SSH host key callback+must point to a curl_sshkeycallback
  876. function }
  877. CURLOPT_SSH_KEYFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+184,
  878. { set the SSH host key callback custom pointer }
  879. CURLOPT_SSH_KEYDATA:=CURLOPTTYPE_OBJECTPOINT+185,
  880. { set the SMTP mail originator }
  881. CURLOPT_MAIL_FROM:=CURLOPTTYPE_STRINGPOINT+186,
  882. { set the list of SMTP mail receiver(s }
  883. CURLOPT_MAIL_RCPT:=CURLOPTTYPE_OBJECTPOINT+187,
  884. { FTP: send PRET before PASV }
  885. CURLOPT_FTP_USE_PRET:=CURLOPTTYPE_LONG+188,
  886. { RTSP request method (OPTIONS+SETUP+PLAY+etc... }
  887. CURLOPT_RTSP_REQUEST:=CURLOPTTYPE_LONG+189,
  888. { The RTSP session identifier }
  889. CURLOPT_RTSP_SESSION_ID:=CURLOPTTYPE_STRINGPOINT+190,
  890. { The RTSP stream URI }
  891. CURLOPT_RTSP_STREAM_URI:=CURLOPTTYPE_STRINGPOINT+191,
  892. { The Transport: header to use in RTSP requests }
  893. CURLOPT_RTSP_TRANSPORT:=CURLOPTTYPE_STRINGPOINT+192,
  894. { Manually initialize the client RTSP CSeq for this handle }
  895. CURLOPT_RTSP_CLIENT_CSEQ:=CURLOPTTYPE_LONG+193,
  896. { Manually initialize the server RTSP CSeq for this handle }
  897. CURLOPT_RTSP_SERVER_CSEQ:=CURLOPTTYPE_LONG+194,
  898. { The stream to pass to INTERLEAVEFUNCTION. }
  899. CURLOPT_INTERLEAVEDATA:=CURLOPTTYPE_OBJECTPOINT+195,
  900. { Let the application define a custom write method for RTP data }
  901. CURLOPT_INTERLEAVEFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+196,
  902. { Turn on wildcard matching }
  903. CURLOPT_WILDCARDMATCH:=CURLOPTTYPE_LONG+197,
  904. { Directory matching callback called before downloading of an
  905. individual file (chunk started }
  906. CURLOPT_CHUNK_BGN_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+198,
  907. { Directory matching callback called after the file (chunk
  908. was downloaded+or skipped }
  909. CURLOPT_CHUNK_END_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+199,
  910. { Change match (fnmatch-like callback for wildcard matching }
  911. CURLOPT_FNMATCH_FUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+200,
  912. { Let the application define custom chunk data pointer }
  913. CURLOPT_CHUNK_DATA:=CURLOPTTYPE_OBJECTPOINT+201,
  914. { FNMATCH_FUNCTION user pointer }
  915. CURLOPT_FNMATCH_DATA:=CURLOPTTYPE_OBJECTPOINT+202,
  916. { send linked-list of name:port:address sets }
  917. CURLOPT_RESOLVE:=CURLOPTTYPE_OBJECTPOINT+203,
  918. { Set a username for authenticated TLS }
  919. CURLOPT_TLSAUTH_USERNAME:=CURLOPTTYPE_STRINGPOINT+204,
  920. { Set a password for authenticated TLS }
  921. CURLOPT_TLSAUTH_PASSWORD:=CURLOPTTYPE_STRINGPOINT+205,
  922. { Set authentication type for authenticated TLS }
  923. CURLOPT_TLSAUTH_TYPE:=CURLOPTTYPE_STRINGPOINT+206,
  924. { Set to 1 to enable the "TE:" header in HTTP requests to ask for
  925. compressed transfer-encoded responses. Set to 0 to disable the use of TE:
  926. in outgoing requests. The current default is 0+but it might change in a
  927. future libcurl release.
  928. libcurl will ask for the compressed methods it knows of+and if that
  929. isn't any+it will not ask for transfer-encoding at all even if this
  930. option is set to 1.
  931. }
  932. CURLOPT_TRANSFER_ENCODING:=CURLOPTTYPE_LONG+207,
  933. { Callback function for closing socket (instead of close(2. The callback
  934. should have type curl_closesocket_callback }
  935. CURLOPT_CLOSESOCKETFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+208,
  936. CURLOPT_CLOSESOCKETDATA:=CURLOPTTYPE_OBJECTPOINT+209,
  937. { allow GSSAPI credential delegation }
  938. CURLOPT_GSSAPI_DELEGATION:=CURLOPTTYPE_LONG+210,
  939. { Set the name servers to use for DNS resolution }
  940. CURLOPT_DNS_SERVERS:=CURLOPTTYPE_STRINGPOINT+211,
  941. { Time-out accept operations (currently for FTP only after this amount
  942. of milliseconds. }
  943. CURLOPT_ACCEPTTIMEOUT_MS:=CURLOPTTYPE_LONG+212,
  944. { Set TCP keepalive }
  945. CURLOPT_TCP_KEEPALIVE:=CURLOPTTYPE_LONG+213,
  946. { non-universal keepalive knobs (Linux+AIX+HP-UX+more }
  947. CURLOPT_TCP_KEEPIDLE:=CURLOPTTYPE_LONG+214,
  948. CURLOPT_TCP_KEEPINTVL:=CURLOPTTYPE_LONG+215,
  949. { Enable/disable specific SSL features with a bitmask+see CURLSSLOPT_* }
  950. CURLOPT_SSL_OPTIONS:=CURLOPTTYPE_LONG+216,
  951. { Set the SMTP auth originator }
  952. CURLOPT_MAIL_AUTH:=CURLOPTTYPE_STRINGPOINT+217,
  953. { Enable/disable SASL initial response }
  954. CURLOPT_SASL_IR:=CURLOPTTYPE_LONG+218,
  955. { Function that will be called instead of the internal progress display
  956. * function. This function should be defined as the curl_xferinfo_callback
  957. * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION }
  958. CURLOPT_XFERINFOFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+219,
  959. { The XOAUTH2 bearer token }
  960. CURLOPT_XOAUTH2_BEARER:=CURLOPTTYPE_STRINGPOINT+220,
  961. { Set the interface string to use as outgoing network
  962. * interface for DNS requests.
  963. * Only supported by the c-ares DNS backend }
  964. CURLOPT_DNS_INTERFACE:=CURLOPTTYPE_STRINGPOINT+221,
  965. { Set the local IPv4 address to use for outgoing DNS requests.
  966. * Only supported by the c-ares DNS backend }
  967. CURLOPT_DNS_LOCAL_IP4:=CURLOPTTYPE_STRINGPOINT+222,
  968. { Set the local IPv4 address to use for outgoing DNS requests.
  969. * Only supported by the c-ares DNS backend }
  970. CURLOPT_DNS_LOCAL_IP6:=CURLOPTTYPE_STRINGPOINT+223,
  971. { Set authentication options directly }
  972. CURLOPT_LOGIN_OPTIONS:=CURLOPTTYPE_STRINGPOINT+224,
  973. { Enable/disable TLS NPN extension (http2 over ssl might fail without }
  974. CURLOPT_SSL_ENABLE_NPN:=CURLOPTTYPE_LONG+225,
  975. { Enable/disable TLS ALPN extension (http2 over ssl might fail without }
  976. CURLOPT_SSL_ENABLE_ALPN:=CURLOPTTYPE_LONG+226,
  977. { Time to wait for a response to a HTTP request containing an
  978. * Expect: 100-continue header before sending the data anyway. }
  979. CURLOPT_EXPECT_100_TIMEOUT_MS:=CURLOPTTYPE_LONG+227,
  980. { This points to a linked list of headers used for proxy requests only,
  981. struct curl_slist kind }
  982. CURLOPT_PROXYHEADER:=CURLOPTTYPE_OBJECTPOINT+228,
  983. { Pass in a bitmask of "header options" }
  984. CURLOPT_HEADEROPT:=CURLOPTTYPE_LONG+229,
  985. { The public key in DER form used to validate the peer public key
  986. this option is used only if SSL_VERIFYPEER is true }
  987. CURLOPT_PINNEDPUBLICKEY:=CURLOPTTYPE_STRINGPOINT+230,
  988. { Path to Unix domain socket }
  989. CURLOPT_UNIX_SOCKET_PATH:=CURLOPTTYPE_STRINGPOINT+231,
  990. { Set if we should verify the certificate status. }
  991. CURLOPT_SSL_VERIFYSTATUS:=CURLOPTTYPE_LONG+232,
  992. { Set if we should enable TLS false start. }
  993. CURLOPT_SSL_FALSESTART:=CURLOPTTYPE_LONG+233,
  994. { Do not squash dot-dot sequences }
  995. CURLOPT_PATH_AS_IS:=CURLOPTTYPE_LONG+234,
  996. { Proxy Service Name }
  997. CURLOPT_PROXY_SERVICE_NAME:=CURLOPTTYPE_STRINGPOINT+235,
  998. { Service Name }
  999. CURLOPT_SERVICE_NAME:=CURLOPTTYPE_STRINGPOINT+236,
  1000. { Wait/don't wait for pipe/mutex to clarify }
  1001. CURLOPT_PIPEWAIT:=CURLOPTTYPE_LONG+237,
  1002. { Set the protocol used when curl is given a URL without a protocol }
  1003. CURLOPT_DEFAULT_PROTOCOL:=CURLOPTTYPE_STRINGPOINT+238,
  1004. { Set stream weight+1 - 256 (default is 16 }
  1005. CURLOPT_STREAM_WEIGHT:=CURLOPTTYPE_LONG+239,
  1006. { Set stream dependency on another CURL handle }
  1007. CURLOPT_STREAM_DEPENDS:=CURLOPTTYPE_OBJECTPOINT+240,
  1008. { Set E-xclusive stream dependency on another CURL handle }
  1009. CURLOPT_STREAM_DEPENDS_E:=CURLOPTTYPE_OBJECTPOINT+241,
  1010. { Do not send any tftp option requests to the server }
  1011. CURLOPT_TFTP_NO_OPTIONS:=CURLOPTTYPE_LONG+242,
  1012. { Linked-list of host:port:connect-to-host:connect-to-port,
  1013. overrides the URL's host:port (only for the network layer }
  1014. CURLOPT_CONNECT_TO:=CURLOPTTYPE_OBJECTPOINT+243,
  1015. { Set TCP Fast Open }
  1016. CURLOPT_TCP_FASTOPEN:=CURLOPTTYPE_LONG+244,
  1017. { Continue to send data if the server responds early with an
  1018. * HTTP status code >= 300 }
  1019. CURLOPT_KEEP_SENDING_ON_ERROR:=CURLOPTTYPE_LONG+245,
  1020. { The CApath or CAfile used to validate the proxy certificate
  1021. this option is used only if PROXY_SSL_VERIFYPEER is true }
  1022. CURLOPT_PROXY_CAINFO:=CURLOPTTYPE_STRINGPOINT+246,
  1023. { The CApath directory used to validate the proxy certificate
  1024. this option is used only if PROXY_SSL_VERIFYPEER is true }
  1025. CURLOPT_PROXY_CAPATH:=CURLOPTTYPE_STRINGPOINT+247,
  1026. { Set if we should verify the proxy in ssl handshake,
  1027. set 1 to verify. }
  1028. CURLOPT_PROXY_SSL_VERIFYPEER:=CURLOPTTYPE_LONG+248,
  1029. { Set if we should verify the Common name from the proxy certificate in ssl
  1030. * handshake+set 1 to check existence+2 to ensure that it matches
  1031. * the provided hostname. }
  1032. CURLOPT_PROXY_SSL_VERIFYHOST:=CURLOPTTYPE_LONG+249,
  1033. { What version to specifically try to use for proxy.
  1034. See CURL_SSLVERSION defines below. }
  1035. CURLOPT_PROXY_SSLVERSION:=CURLOPTTYPE_LONG+250,
  1036. { Set a username for authenticated TLS for proxy }
  1037. CURLOPT_PROXY_TLSAUTH_USERNAME:=CURLOPTTYPE_STRINGPOINT+251,
  1038. { Set a password for authenticated TLS for proxy }
  1039. CURLOPT_PROXY_TLSAUTH_PASSWORD:=CURLOPTTYPE_STRINGPOINT+252,
  1040. { Set authentication type for authenticated TLS for proxy }
  1041. CURLOPT_PROXY_TLSAUTH_TYPE:=CURLOPTTYPE_STRINGPOINT+253,
  1042. { name of the file keeping your private SSL-certificate for proxy }
  1043. CURLOPT_PROXY_SSLCERT:=CURLOPTTYPE_STRINGPOINT+254,
  1044. { type of the file keeping your SSL-certificate ("DER"+"PEM"+"ENG" for
  1045. proxy }
  1046. CURLOPT_PROXY_SSLCERTTYPE:=CURLOPTTYPE_STRINGPOINT+255,
  1047. { name of the file keeping your private SSL-key for proxy }
  1048. CURLOPT_PROXY_SSLKEY:=CURLOPTTYPE_STRINGPOINT+256,
  1049. { type of the file keeping your private SSL-key ("DER"+"PEM"+"ENG" for
  1050. proxy }
  1051. CURLOPT_PROXY_SSLKEYTYPE:=CURLOPTTYPE_STRINGPOINT+257,
  1052. { password for the SSL private key for proxy }
  1053. CURLOPT_PROXY_KEYPASSWD:=CURLOPTTYPE_STRINGPOINT+258,
  1054. { Specify which SSL ciphers to use for proxy }
  1055. CURLOPT_PROXY_SSL_CIPHER_LIST:=CURLOPTTYPE_STRINGPOINT+259,
  1056. { CRL file for proxy }
  1057. CURLOPT_PROXY_CRLFILE:=CURLOPTTYPE_STRINGPOINT+260,
  1058. { Enable/disable specific SSL features with a bitmask for proxy+see
  1059. CURLSSLOPT_* }
  1060. CURLOPT_PROXY_SSL_OPTIONS:=CURLOPTTYPE_LONG+261,
  1061. { Name of pre proxy to use. }
  1062. CURLOPT_PRE_PROXY:=CURLOPTTYPE_STRINGPOINT+262,
  1063. { The public key in DER form used to validate the proxy public key
  1064. this option is used only if PROXY_SSL_VERIFYPEER is true }
  1065. CURLOPT_PROXY_PINNEDPUBLICKEY:=CURLOPTTYPE_STRINGPOINT+263,
  1066. { Path to an abstract Unix domain socket }
  1067. CURLOPT_ABSTRACT_UNIX_SOCKET:=CURLOPTTYPE_STRINGPOINT+264,
  1068. { Suppress proxy CONNECT response headers from user callbacks }
  1069. CURLOPT_SUPPRESS_CONNECT_HEADERS:=CURLOPTTYPE_LONG+265,
  1070. { The request target+instead of extracted from the URL }
  1071. CURLOPT_REQUEST_TARGET:=CURLOPTTYPE_STRINGPOINT+266,
  1072. { bitmask of allowed auth methods for connections to SOCKS5 proxies }
  1073. CURLOPT_SOCKS5_AUTH:=CURLOPTTYPE_LONG+267,
  1074. CURLOPT_LASTENTRY); { the last unused }
  1075. CURL_HTTP_VERSION = (CURL_HTTP_VERSION_NONE,
  1076. CURL_HTTP_VERSION_1_0,
  1077. CURL_HTTP_VERSION_1_1,
  1078. CURL_HTTP_VERSION_2_0,
  1079. CURL_HTTP_VERSION_2TLS,
  1080. CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,
  1081. CURL_HTTP_VERSION_LAST);
  1082. curl_rtspreq = (CURL_RTSPREQ_NONE,CURL_RTSPREQ_OPTIONS,
  1083. CURL_RTSPREQ_DESCRIBE,CURL_RTSPREQ_ANNOUNCE,
  1084. CURL_RTSPREQ_SETUP,CURL_RTSPREQ_PLAY,
  1085. CURL_RTSPREQ_PAUSE,CURL_RTSPREQ_TEARDOWN,
  1086. CURL_RTSPREQ_GET_PARAMETER,CURL_RTSPREQ_SET_PARAMETER,
  1087. CURL_RTSPREQ_RECORD,CURL_RTSPREQ_RECEIVE,
  1088. CURL_RTSPREQ_LAST);
  1089. CURL_NETRC_OPTION = (CURL_NETRC_IGNORED,CURL_NETRC_OPTIONAL,
  1090. CURL_NETRC_REQUIRED,CURL_NETRC_LAST);
  1091. CURL_SSL_VERSION = (CURL_SSLVERSION_DEFAULT,CURL_SSLVERSION_TLSv1,
  1092. CURL_SSLVERSION_SSLv2,CURL_SSLVERSION_SSLv3,
  1093. CURL_SSLVERSION_LAST);
  1094. CURL_TLSAUTH = (CURL_TLSAUTH_NONE,CURL_TLSAUTH_SRP,CURL_TLSAUTH_LAST);
  1095. CURL_TIMECOND = (CURL_TIMECOND_NONE,CURL_TIMECOND_IFMODSINCE,
  1096. CURL_TIMECOND_IFUNMODSINCE,CURL_TIMECOND_LASTMOD,
  1097. CURL_TIMECOND_LAST);
  1098. CURLformoption = (CURLFORM_NOTHING,
  1099. CURLFORM_COPYNAME,
  1100. CURLFORM_PTRNAME,
  1101. CURLFORM_NAMELENGTH,
  1102. CURLFORM_COPYCONTENTS,
  1103. CURLFORM_PTRCONTENTS,
  1104. CURLFORM_CONTENTSLENGTH,
  1105. CURLFORM_FILECONTENT,
  1106. CURLFORM_ARRAY,
  1107. CURLFORM_OBSOLETE,
  1108. CURLFORM_FILE,
  1109. CURLFORM_BUFFER,
  1110. CURLFORM_BUFFERPTR,
  1111. CURLFORM_BUFFERLENGTH,
  1112. CURLFORM_CONTENTTYPE,
  1113. CURLFORM_CONTENTHEADER,
  1114. CURLFORM_FILENAME,
  1115. CURLFORM_END,
  1116. CURLFORM_OBSOLETE2,
  1117. CURLFORM_STREAM,
  1118. CURLFORM_CONTENTLEN, // added in 7.46.0, provide a curl_off_t length
  1119. CURLFORM_LASTENTRY // the last unused
  1120. );
  1121. curl_forms = record
  1122. option : CURLformoption;
  1123. value : PAnsiChar;
  1124. end;
  1125. CURLFORMcode = (CURL_FORMADD_OK,CURL_FORMADD_MEMORY,
  1126. CURL_FORMADD_OPTION_TWICE,CURL_FORMADD_NULL,
  1127. CURL_FORMADD_UNKNOWN_OPTION,CURL_FORMADD_INCOMPLETE,
  1128. CURL_FORMADD_ILLEGAL_ARRAY,CURL_FORMADD_DISABLED,
  1129. CURL_FORMADD_LAST);
  1130. curl_formget_callback = function (arg:pointer; buf:PAnsiChar; len:size_t):size_t;cdecl;
  1131. curl_slist = record
  1132. data : PAnsiChar;
  1133. next : Pcurl_slist;
  1134. end;
  1135. CURLINFO = (
  1136. CURLINFO_NONE, // first, never use this
  1137. CURLINFO_EFFECTIVE_URL :=CURLINFO_STRING+1,
  1138. CURLINFO_RESPONSE_CODE :=CURLINFO_LONG +2,
  1139. CURLINFO_TOTAL_TIME :=CURLINFO_DOUBLE+3,
  1140. CURLINFO_NAMELOOKUP_TIME :=CURLINFO_DOUBLE+4,
  1141. CURLINFO_CONNECT_TIME :=CURLINFO_DOUBLE+5,
  1142. CURLINFO_PRETRANSFER_TIME :=CURLINFO_DOUBLE+6,
  1143. CURLINFO_SIZE_UPLOAD :=CURLINFO_DOUBLE+7,
  1144. CURLINFO_SIZE_DOWNLOAD :=CURLINFO_DOUBLE+8,
  1145. CURLINFO_SPEED_DOWNLOAD :=CURLINFO_DOUBLE+9,
  1146. CURLINFO_SPEED_UPLOAD :=CURLINFO_DOUBLE+10,
  1147. CURLINFO_HEADER_SIZE :=CURLINFO_LONG +11,
  1148. CURLINFO_REQUEST_SIZE :=CURLINFO_LONG +12,
  1149. CURLINFO_SSL_VERIFYRESULT :=CURLINFO_LONG +13,
  1150. CURLINFO_FILETIME :=CURLINFO_LONG +14,
  1151. CURLINFO_CONTENT_LENGTH_DOWNLOAD:=CURLINFO_DOUBLE+15,
  1152. CURLINFO_CONTENT_LENGTH_UPLOAD :=CURLINFO_DOUBLE+16,
  1153. CURLINFO_STARTTRANSFER_TIME :=CURLINFO_DOUBLE+17,
  1154. CURLINFO_CONTENT_TYPE :=CURLINFO_STRING+18,
  1155. CURLINFO_REDIRECT_TIME :=CURLINFO_DOUBLE+19,
  1156. CURLINFO_REDIRECT_COUNT :=CURLINFO_LONG +20,
  1157. CURLINFO_PRIVATE :=CURLINFO_STRING+21,
  1158. CURLINFO_HTTP_CONNECTCODE :=CURLINFO_LONG +22,
  1159. CURLINFO_HTTPAUTH_AVAIL :=CURLINFO_LONG +23,
  1160. CURLINFO_PROXYAUTH_AVAIL :=CURLINFO_LONG +24,
  1161. CURLINFO_OS_ERRNO :=CURLINFO_LONG +25,
  1162. CURLINFO_NUM_CONNECTS :=CURLINFO_LONG +26,
  1163. CURLINFO_SSL_ENGINES :=CURLINFO_SLIST +27,
  1164. CURLINFO_COOKIELIST :=CURLINFO_SLIST +28,
  1165. CURLINFO_LASTSOCKET :=CURLINFO_LONG +29,
  1166. CURLINFO_FTP_ENTRY_PATH :=CURLINFO_STRING+30,
  1167. CURLINFO_REDIRECT_URL :=CURLINFO_STRING+31,
  1168. CURLINFO_PRIMARY_IP :=CURLINFO_STRING+32,
  1169. CURLINFO_APPCONNECT_TIME :=CURLINFO_DOUBLE+33,
  1170. CURLINFO_CERTINFO :=CURLINFO_SLIST +34,
  1171. CURLINFO_CONDITION_UNMET :=CURLINFO_LONG +35,
  1172. CURLINFO_RTSP_SESSION_ID :=CURLINFO_STRING+36,
  1173. CURLINFO_RTSP_CLIENT_CSEQ :=CURLINFO_LONG +37,
  1174. CURLINFO_RTSP_SERVER_CSEQ :=CURLINFO_LONG +38,
  1175. CURLINFO_RTSP_CSEQ_RECV :=CURLINFO_LONG +39,
  1176. CURLINFO_PRIMARY_PORT :=CURLINFO_LONG +40,
  1177. CURLINFO_LOCAL_IP :=CURLINFO_STRING+41,
  1178. CURLINFO_LOCAL_PORT :=CURLINFO_LONG +42,
  1179. CURLINFO_TLS_SESSION :=CURLINFO_SLIST +43,
  1180. CURLINFO_ACTIVESOCKET :=CURLINFO_SOCKET+44,
  1181. CURLINFO_TLS_SSL_PTR :=CURLINFO_SLIST +45,
  1182. CURLINFO_HTTP_VERSION :=CURLINFO_LONG +46,
  1183. CURLINFO_PROXY_SSL_VERIFYRESULT :=CURLINFO_LONG +47,
  1184. CURLINFO_PROTOCOL :=CURLINFO_LONG +48,
  1185. CURLINFO_SCHEME :=CURLINFO_STRING+49,
  1186. // Fill in new entries below here!
  1187. CURLINFO_LASTONE:=49
  1188. );
  1189. curl_closepolicy = (CURLCLOSEPOLICY_NONE,CURLCLOSEPOLICY_OLDEST,
  1190. CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
  1191. CURLCLOSEPOLICY_LEAST_TRAFFIC,CURLCLOSEPOLICY_SLOWEST,
  1192. CURLCLOSEPOLICY_CALLBACK,CURLCLOSEPOLICY_LAST);
  1193. curl_lock_data = (CURL_LOCK_DATA_NONE := 0,
  1194. CURL_LOCK_DATA_SHARE,
  1195. CURL_LOCK_DATA_COOKIE,
  1196. CURL_LOCK_DATA_DNS,
  1197. CURL_LOCK_DATA_SSL_SESSION,
  1198. CURL_LOCK_DATA_CONNECT,
  1199. CURL_LOCK_DATA_LAST);
  1200. curl_lock_access = (CURL_LOCK_ACCESS_NONE := 0,
  1201. CURL_LOCK_ACCESS_SHARED := 1,
  1202. CURL_LOCK_ACCESS_SINGLE := 2,
  1203. CURL_LOCK_ACCESS_LAST);
  1204. curl_lock_function = procedure (handle:PCURL; data:curl_lock_data; locktype:curl_lock_access; userptr:pointer);cdecl;
  1205. curl_unlock_function = procedure (handle:PCURL; data:curl_lock_data; userptr:pointer);cdecl;
  1206. CURLSH = pointer;
  1207. CURLSHcode = (CURLSHE_OK, // all is fine
  1208. CURLSHE_BAD_OPTION, // 1
  1209. CURLSHE_IN_USE, // 2
  1210. CURLSHE_INVALID, // 3
  1211. CURLSHE_NOMEM, // 4 out of memory
  1212. CURLSHE_NOT_BUILT_IN, // 5 feature not present in lib
  1213. CURLSHE_LAST); // never use
  1214. CURLSHoption = (CURLSHOPT_NONE,
  1215. CURLSHOPT_SHARE,
  1216. CURLSHOPT_UNSHARE,
  1217. CURLSHOPT_LOCKFUNC,
  1218. CURLSHOPT_UNLOCKFUNC,
  1219. CURLSHOPT_USERDATA,
  1220. CURLSHOPT_LAST);
  1221. CURLversion = (CURLVERSION_FIRST,
  1222. CURLVERSION_SECOND,
  1223. CURLVERSION_THIRD,
  1224. CURLVERSION_FOURTH,
  1225. CURLVERSION_LAST); // never actually use this
  1226. curl_version_info_data = record
  1227. age : CURLversion; // age of the returned struct
  1228. version : PAnsiChar; // LIBCURL_VERSION
  1229. version_num : dword; // LIBCURL_VERSION_NUM
  1230. host : PAnsiChar; // OS/host/cpu/machine when configured
  1231. features : longint; // bitmask, see defines below
  1232. ssl_version : PAnsiChar; // human readable string
  1233. ssl_version_num : longint; // not used anymore, always 0
  1234. libz_version : PAnsiChar; // human readable string
  1235. // protocols is terminated by an entry with a NULL protoname
  1236. protocols : ^PAnsiChar;
  1237. // The fields below this were added in CURLVERSION_SECOND
  1238. ares : PAnsiChar;
  1239. ares_num : longint;
  1240. // This field was added in CURLVERSION_THIRD
  1241. libidn : PAnsiChar;
  1242. // These field were added in CURLVERSION_FOURTH
  1243. iconv_ver_num : longint;
  1244. libssh_version:PAnsiChar;
  1245. end;
  1246. CURLM = pointer;
  1247. CURLMcode = (CURLM_CALL_MULTI_PERFORM := -(1),CURLM_OK,
  1248. CURLM_BAD_HANDLE,CURLM_BAD_EASY_HANDLE,
  1249. CURLM_OUT_OF_MEMORY,CURLM_INTERNAL_ERROR,
  1250. CURLM_BAD_SOCKET,CURLM_UNKNOWN_OPTION,
  1251. CURLM_ADDED_ALREADY,CURLM_LAST);
  1252. TCURLMSG = (CURLMSG_NONE,CURLMSG_DONE,CURLMSG_LAST);
  1253. CURLMsg = record
  1254. msg : TCURLMSG;
  1255. easy_handle : PCURL;
  1256. data : record
  1257. case longint of
  1258. 0 : ( whatever : pointer );
  1259. 1 : ( result : CURLcode );
  1260. end;
  1261. end;
  1262. curl_socket_callback = function (easy:PCURL; s:curl_socket_t; what:longint; userp:pointer; socketp:pointer):longint;cdecl;
  1263. CURLMoption = (
  1264. // This is the socket callback function pointer
  1265. CURLMOPT_SOCKETFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+1,
  1266. // This is the argument passed to the socket callback
  1267. CURLMOPT_SOCKETDATA:=CURLOPTTYPE_OBJECTPOINT+2,
  1268. // set to 1 to enable pipelining for this multi handle
  1269. CURLMOPT_PIPELINING:=CURLOPTTYPE_LONG+3,
  1270. // This is the timer callback function pointer
  1271. CURLMOPT_TIMERFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+4,
  1272. // This is the argument passed to the timer callback
  1273. CURLMOPT_TIMERDATA:=CURLOPTTYPE_OBJECTPOINT+5,
  1274. // maximum number of entries in the connection cache
  1275. CURLMOPT_MAXCONNECTS:=CURLOPTTYPE_LONG+6,
  1276. // maximum number of (pipelining connections to one host
  1277. CURLMOPT_MAX_HOST_CONNECTIONS:=CURLOPTTYPE_LONG+7,
  1278. // maximum number of requests in a pipeline
  1279. CURLMOPT_MAX_PIPELINE_LENGTH:=CURLOPTTYPE_LONG+8,
  1280. // a connection with a content-lengthCURLOPTTYPE_LONGer than this will not be considered for pipelining
  1281. CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE:=CURLOPTTYPE_OFF_T+9,
  1282. // a connection with a chunk lengthCURLOPTTYPE_LONGer than this will not be considered for pipelining
  1283. CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE:=CURLOPTTYPE_OFF_T+10,
  1284. // a list of site names(+port that are blacklisted from pipelining
  1285. CURLMOPT_PIPELINING_SITE_BL:=CURLOPTTYPE_OBJECTPOINT+11,
  1286. // a list of server types that are blacklisted from pipelining
  1287. CURLMOPT_PIPELINING_SERVER_BL:=CURLOPTTYPE_OBJECTPOINT+12,
  1288. // maximum number of open connections in total
  1289. CURLMOPT_MAX_TOTAL_CONNECTIONS:=CURLOPTTYPE_LONG+13,
  1290. // This is the server push callback function pointer
  1291. CURLMOPT_PUSHFUNCTION:=CURLOPTTYPE_FUNCTIONPOINT+14,
  1292. // This is the argument passed to the server push callback
  1293. CURLMOPT_PUSHDATA:=CURLOPTTYPE_OBJECTPOINT+15,
  1294. CURLMOPT_CURLMOPT_LASTENTRY); // the last unused
  1295. Pcurl_waitfd=^curl_waitfd;
  1296. curl_waitfd=record
  1297. fd:curl_socket_t;
  1298. events,revents:Word;
  1299. end;
  1300. Const
  1301. CURLAUTH_ANY = not (0);
  1302. CURLAUTH_BASIC = 1 shl 0;
  1303. CURLAUTH_ANYSAFE = not (CURLAUTH_BASIC);
  1304. CURLAUTH_DIGEST = 1 shl 1;
  1305. CURLAUTH_GSSNEGOTIATE = 1 shl 2;
  1306. CURLAUTH_NONE = 0;
  1307. CURLAUTH_NTLM = 1 shl 3;
  1308. CURL_CHUNK_BGN_FUNC_OK = 0;
  1309. CURL_CHUNK_BGN_FUNC_FAIL = 1;
  1310. CURL_CHUNK_BGN_FUNC_SKIP = 2;
  1311. CURL_CHUNK_END_FUNC_OK = 0;
  1312. CURL_CHUNK_END_FUNC_FAIL = 1;
  1313. CURL_FNMATCHFUNC_MATCH = 0;
  1314. CURL_FNMATCHFUNC_NOMATCH = 1;
  1315. CURL_FNMATCHFUNC_FAIL = 2;
  1316. CURL_SEEKFUNC_OK = 0;
  1317. CURL_SEEKFUNC_FAIL = 1;
  1318. CURL_SEEKFUNC_CANTSEEK = 2;
  1319. CURL_READFUNC_ABORT = $10000000;
  1320. CURL_READFUNC_PAUSE = $10000001;
  1321. CURL_SOCKOPT_OK = 0;
  1322. CURL_SOCKOPT_ERROR = 1;
  1323. CURL_SOCKOPT_ALREADY_CONNECTED = 2;
  1324. CURLE_ALREADY_COMPLETE = 99999;
  1325. CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME;
  1326. CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE;
  1327. CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR;
  1328. CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED;
  1329. CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT;
  1330. CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED;
  1331. CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE;
  1332. CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR;
  1333. CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL;
  1334. CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS;
  1335. CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR;
  1336. CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED;
  1337. CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED;
  1338. CURLFTPSSL_NONE = CURLUSESSL_NONE;
  1339. CURLFTPSSL_TRY = CURLUSESSL_TRY;
  1340. CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL;
  1341. CURLFTPSSL_ALL = CURLUSESSL_ALL;
  1342. CURLFTPSSL_LAST = CURLUSESSL_LAST;
  1343. CURL_ERROR_SIZE = 256;
  1344. CURL_FORMAT_OFF_T = '%ld';
  1345. CURL_GLOBAL_NOTHING = 0;
  1346. CURL_GLOBAL_SSL = 1 shl 0;
  1347. CURL_GLOBAL_WIN32 = 1 shl 1;
  1348. CURL_GLOBAL_ALL = CURL_GLOBAL_SSL or CURL_GLOBAL_WIN32;
  1349. CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL;
  1350. CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE;
  1351. CURL_IPRESOLVE_V4 = 1;
  1352. CURL_IPRESOLVE_V6 = 2;
  1353. CURL_IPRESOLVE_WHATEVER = 0;
  1354. CURL_MAX_WRITE_SIZE = 16384;
  1355. CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM;
  1356. CURLOPT_CLOSEFUNCTION = -(5);
  1357. CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT;
  1358. CURLOPT_FTPASCII = CURLOPT_TRANSFERTEXT;
  1359. CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA;
  1360. CURLOPT_XFERINFODATA = CURLOPT_PROGRESSDATA;
  1361. CURLOPT_HTTPREQUEST = -(1);
  1362. CURLOPT_MUTE = -(2);
  1363. CURLOPT_PASSWDDATA = -(4);
  1364. CURLOPT_PASSWDFUNCTION = -(3);
  1365. CURLOPT_PASV_HOST = -(9);
  1366. CURLOPT_FILE = CURLOPT_WRITEDATA; // name changed in 7.9.7
  1367. CURLOPT_INFILE = CURLOPT_READDATA; // name changed in 7.9.7
  1368. CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING;
  1369. CURLOPT_SOURCE_HOST = -(6);
  1370. CURLOPT_SOURCE_PATH = -(7);
  1371. CURLOPT_SOURCE_PORT = -(8);
  1372. CURL_POLL_IN = 1;
  1373. CURL_POLL_INOUT = 3;
  1374. CURL_POLL_NONE = 0;
  1375. CURL_POLL_OUT = 2;
  1376. CURL_POLL_REMOVE = 4;
  1377. CURLVERSION_NOW = CURLVERSION_FOURTH;
  1378. CURL_SOCKET_BAD = -(1);
  1379. CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD;
  1380. CURL_VERSION_IPV6 =(1 shl 0); // IPv6-enabled
  1381. CURL_VERSION_KERBEROS4 =(1 shl 1); // Kerberos V4 auth is supported(deprecated);
  1382. CURL_VERSION_SSL =(1 shl 2); // SSL options are present
  1383. CURL_VERSION_LIBZ =(1 shl 3); // libz features are present
  1384. CURL_VERSION_NTLM =(1 shl 4); // NTLM auth is supported
  1385. CURL_VERSION_GSSNEGOTIATE=(1 shl 5); // Negotiate auth is supported(deprecated);
  1386. CURL_VERSION_DEBUG =(1 shl 6); // Built with debug capabilities
  1387. CURL_VERSION_ASYNCHDNS =(1 shl 7); // Asynchronous DNS resolves
  1388. CURL_VERSION_SPNEGO =(1 shl 8); // SPNEGO auth is supported
  1389. CURL_VERSION_LARGEFILE =(1 shl 9); // Supports files larger than 2GB
  1390. CURL_VERSION_IDN =(1 shl 10);// Internationized Domain Names are supported
  1391. CURL_VERSION_SSPI =(1 shl 11);// Built against Windows SSPI
  1392. CURL_VERSION_CONV =(1 shl 12);// Character conversions supported
  1393. CURL_VERSION_CURLDEBUG =(1 shl 13);// Debug memory tracking supported
  1394. CURL_VERSION_TLSAUTH_SRP =(1 shl 14);// TLS-SRP auth is supported
  1395. CURL_VERSION_NTLM_WB =(1 shl 15);// NTLM delegation to winbind helper is supported
  1396. CURL_VERSION_HTTP2 =(1 shl 16);// HTTP2 support built-in
  1397. CURL_VERSION_GSSAPI =(1 shl 17);// Built against a GSS-API library
  1398. CURL_VERSION_KERBEROS5 =(1 shl 18);// Kerberos V5 auth is supported
  1399. CURL_VERSION_UNIX_SOCKETS=(1 shl 19);// Unix domain sockets support
  1400. CURL_VERSION_PSL =(1 shl 20);// Mozilla's Public Suffix List, used for cookie domain verification
  1401. CURL_VERSION_HTTPS_PROXY =(1 shl 21);// HTTPS-proxy support built-in
  1402. _FILE_OFFSET_BITS = 0;
  1403. FILESIZEBITS = 0;
  1404. FUNCTIONPOINT = CURLOPTTYPE_FUNCTIONPOINT;
  1405. HTTPPOST_BUFFER = 1 shl 4;
  1406. HTTPPOST_FILENAME = 1 shl 0;
  1407. HTTPPOST_PTRBUFFER = 1 shl 5;
  1408. HTTPPOST_PTRCONTENTS = 1 shl 3;
  1409. HTTPPOST_PTRNAME = 1 shl 2;
  1410. HTTPPOST_READFILE = 1 shl 1;
  1411. LIBCURL_COPYRIGHT = '1996 - 2011 Daniel Stenberg, <[email protected]>.';
  1412. LIBCURL_VERSION = '7.55.1';
  1413. LIBCURL_VERSION_MAJOR = 7;
  1414. LIBCURL_VERSION_MINOR = 55;
  1415. LIBCURL_VERSION_NUM = $073701;
  1416. LIBCURL_VERSION_PATCH = 1;
  1417. LIBCURL_TIMESTAMP = 'Tue Sep 13 16:53:51 UTC 2011';
  1418. CURL_CSELECT_IN = $01;
  1419. CURL_CSELECT_OUT = $02;
  1420. CURL_CSELECT_ERR = $04;
  1421. // specified content is a file name
  1422. CURL_HTTPPOST_FILENAME=(1 shl 0);
  1423. // specified content is a file name
  1424. CURL_HTTPPOST_READFILE=(1 shl 1);
  1425. // name is only stored pointer do not free in formfree
  1426. CURL_HTTPPOST_PTRNAME=(1 shl 2);
  1427. // contents is only stored pointer do not free in formfree
  1428. CURL_HTTPPOST_PTRCONTENTS=(1 shl 3);
  1429. // upload file from buffer
  1430. CURL_HTTPPOST_BUFFER=(1 shl 4);
  1431. // upload file from pointer contents
  1432. CURL_HTTPPOST_PTRBUFFER=(1 shl 5);
  1433. // upload file contents by using the regular read callback to get the data and
  1434. // pass the given pointer as custom pointer
  1435. CURL_HTTPPOST_CALLBACK=(1 shl 6);
  1436. // use size in 'contentlen', added in 7.46.0
  1437. CURL_HTTPPOST_LARGE=(1 shl 7);
  1438. function curl_strequal(s1:PAnsiChar; s2:PAnsiChar):longint;cdecl;external External_library name 'curl_strequal';
  1439. function curl_strnequal(s1:PAnsiChar; s2:PAnsiChar; n:size_t):longint;cdecl;external External_library name 'curl_strnequal';
  1440. function curl_formadd(httppost:PPcurl_httppost; last_post:PPcurl_httppost; args:array of const):CURLFORMcode;cdecl;external External_library name 'curl_formadd';
  1441. function curl_formadd(httppost:PPcurl_httppost; last_post:PPcurl_httppost):CURLFORMcode;cdecl;external External_library name 'curl_formadd';
  1442. function curl_formget(form:Pcurl_httppost; arg:pointer; append:curl_formget_callback):longint;cdecl;external External_library name 'curl_formget';
  1443. procedure curl_formfree(form:Pcurl_httppost);cdecl;external External_library name 'curl_formfree';
  1444. function curl_getenv(variable:PAnsiChar):PAnsiChar;cdecl;external External_library name 'curl_getenv';
  1445. function curl_version:PAnsiChar;cdecl;external External_library name 'curl_version';
  1446. function curl_version_info(_para1:CURLversion):Pcurl_version_info_data;cdecl;external External_library name 'curl_version_info';
  1447. function curl_easy_escape(handle:PCURL; _string:PAnsiChar; length:longint):PAnsiChar;cdecl;external External_library name 'curl_easy_escape';
  1448. function curl_escape(_string:PAnsiChar; length:longint):PAnsiChar;cdecl;external External_library name 'curl_escape';
  1449. function curl_easy_unescape(handle:PCURL; _string:PAnsiChar; length:longint; outlength:Plongint):PAnsiChar;cdecl;external External_library name 'curl_easy_unescape';
  1450. function curl_unescape(_string:PAnsiChar; length:longint):PAnsiChar;cdecl;external External_library name 'curl_unescape';
  1451. procedure curl_free(p:pointer);cdecl;external External_library name 'curl_free';
  1452. function curl_global_init(flags:longint):CURLcode;cdecl;external External_library name 'curl_global_init';
  1453. function curl_global_init_mem(flags:longint; m:curl_malloc_callback; f:curl_free_callback; r:curl_realloc_callback; s:curl_strdup_callback;
  1454. c:curl_calloc_callback):CURLcode;cdecl;external External_library name 'curl_global_init_mem';
  1455. procedure curl_global_cleanup;cdecl;external External_library name 'curl_global_cleanup';
  1456. function curl_slist_append (curl_slist : Pcurl_slist; P : PAnsiChar) : Pcurl_slist; cdecl; external External_library name 'curl_slist_append';
  1457. procedure curl_slist_free_all(_para1:Pcurl_slist);cdecl;external External_library name 'curl_slist_free_all';
  1458. function curl_getdate(p:PAnsiChar; unused:Ptime_t):time_t;cdecl;external External_library name 'curl_getdate';
  1459. function curl_share_init:PCURLSH;cdecl;external External_library name 'curl_share_init';
  1460. function curl_share_setopt(_para1:PCURLSH; option:CURLSHoption; args:array of const):CURLSHcode;cdecl;external External_library name 'curl_share_setopt';
  1461. function curl_share_setopt(_para1:PCURLSH; option:CURLSHoption):CURLSHcode;cdecl;external External_library name 'curl_share_setopt';
  1462. function curl_share_cleanup(_para1:PCURLSH):CURLSHcode;cdecl;external External_library name 'curl_share_cleanup';
  1463. function curl_share_strerror(_para1:CURLSHcode):PAnsiChar;cdecl;external External_library name 'curl_share_strerror';
  1464. function curl_easy_strerror(_para1:CURLcode):PAnsiChar;cdecl;external External_library name 'curl_easy_strerror';
  1465. function curl_easy_init:PCURL;cdecl;external External_library name 'curl_easy_init';
  1466. function curl_easy_setopt(curl:PCURL; option:CURLoption; args:array of const):CURLcode;cdecl;external External_library name 'curl_easy_setopt';
  1467. function curl_easy_setopt(curl:PCURL; option:CURLoption):CURLcode;cdecl;external External_library name 'curl_easy_setopt';
  1468. function curl_easy_perform(curl:PCURL):CURLcode;cdecl;external External_library name 'curl_easy_perform';
  1469. procedure curl_easy_cleanup(curl:PCURL);cdecl;external External_library name 'curl_easy_cleanup';
  1470. function curl_easy_getinfo(curl:PCURL; info:CURLINFO; args:array of const):CURLcode;cdecl;external External_library name 'curl_easy_getinfo';
  1471. function curl_easy_getinfo(curl:PCURL; info:CURLINFO):CURLcode;cdecl;external External_library name 'curl_easy_getinfo';
  1472. function curl_easy_duphandle(curl:PCURL):PCURL;cdecl;external External_library name 'curl_easy_duphandle';
  1473. procedure curl_easy_reset(curl:PCURL);cdecl;external External_library name 'curl_easy_reset';
  1474. function curl_multi_init:PCURLM;cdecl;external External_library name 'curl_multi_init';
  1475. function curl_multi_add_handle(multi_handle:PCURLM; curl_handle:PCURL):CURLMcode;cdecl;external External_library name 'curl_multi_add_handle';
  1476. function curl_multi_remove_handle(multi_handle:PCURLM; curl_handle:PCURL):CURLMcode;cdecl;external External_library name 'curl_multi_remove_handle';
  1477. function curl_multi_fdset(multi_handle:PCURLM; read_fd_set:Pfd_set; write_fd_set:Pfd_set; exc_fd_set:Pfd_set; max_fd:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_fdset';
  1478. function curl_multi_perform(multi_handle:PCURLM; running_handles:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_perform';
  1479. function curl_multi_cleanup(multi_handle:PCURLM):CURLMcode;cdecl;external External_library name 'curl_multi_cleanup';
  1480. function curl_multi_info_read(multi_handle:PCURLM; msgs_in_queue:Plongint):PCURLMsg;cdecl;external External_library name 'curl_multi_info_read';
  1481. function curl_multi_strerror(_para1:CURLMcode):PAnsiChar;cdecl;external External_library name 'curl_multi_strerror';
  1482. function curl_multi_socket(multi_handle:PCURLM; s:curl_socket_t; running_handles:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_socket';
  1483. function curl_multi_socket_all(multi_handle:PCURLM; running_handles:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_socket_all';
  1484. function curl_multi_timeout(multi_handle:PCURLM; milliseconds:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_timeout';
  1485. function curl_multi_wait(multi_handle:PCURLM;extra_fds:Pcurl_waitfd;extra_nfds:longint;timeout_ms:longint;numfds:Plongint):CURLMcode;cdecl;external External_library name 'curl_multi_wait';
  1486. function curl_multi_setopt(multi_handle:PCURLM; option:CURLMoption; args:array of const):CURLMcode;cdecl;external External_library name 'curl_multi_setopt';
  1487. function curl_multi_setopt(multi_handle:PCURLM; option:CURLMoption):CURLMcode;cdecl;external External_library name 'curl_multi_setopt';
  1488. function curl_multi_assign(multi_handle:PCURLM; sockfd:curl_socket_t; sockp:pointer):CURLMcode;cdecl;external External_library name 'curl_multi_assign';
  1489. implementation
  1490. end.