libcurl.pp 76 KB

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