7599e88f1db9fb6ce92a7d6836788578eeedb169
[beifahrer] / vapi / libcurl.vapi
1 [CCode (cheader_filename = "curl/curl.h")]
2 namespace Curl {
3         [CCode (cname = "CURL_GLOBAL_SSL")]
4         public const long GLOBAL_SSL;
5         [CCode (cname = "CURL_GLOBAL_WIN32")]
6         public const long GLOBAL_WIN32;
7         [CCode (cname = "CURL_GLOBAL_ALL")]
8         public const long GLOBAL_ALL;
9         [CCode (cname = "CURL_GLOBAL_NOTHING")]
10         public const long GLOBAL_NOTHING;
11         [CCode (cname = "CURL_GLOBAL_DEFAULT")]
12         public const int GLOBAL_DEFAULT;
13         public Curl.Code global_init (long flags);
14         public Curl.Code global_init_mem (long flags, Curl.MallocCallback m, Curl.FreeCallback f, Curl.ReallocCallback r, Curl.StrdupCallback s, Curl.CallocCallback c);
15         public static void global_cleanup ();
16         [Compact]
17         [CCode (cname = "CURL", cprefix = "curl_easy_", free_function = "curl_easy_cleanup")]
18         public class EasyHandle {
19                 [CCode (cname = "curl_easy_init")]
20                 public EasyHandle ();
21                 [PrintfFormat]
22                 public Curl.Code setopt (Curl.Option option, ...);
23                 public Curl.Code perform ();
24                 [PrintfFormat]
25                 public Curl.Code getinfo (Curl.Info info, ...);
26                 public Curl.EasyHandle duphandle ();
27                 public void reset ();
28                 public Curl.Code recv (void *buffer, size_t buflen, out size_t n);
29                 public Curl.Code send (void *buffer, size_t buflen, out size_t n);
30                 public string escape (string @string, int length);
31                 public string unescape (string @string, int length, out int outlength);
32                 [CCode (has_target = false)]
33                 public delegate int SocketCallback (Curl.Socket s, int what, void* userp, void *socketp);
34         }
35         [CCode (cname = "CURLcode", cprefix = "CURLE_")]
36         public enum Code {
37                 OK,
38                 UNSUPPORTED_PROTOCOL,
39                 FAILED_INIT,
40                 URL_MALFORMAT,
41                 COULDNT_RESOLVE_PROXY,
42                 COULDNT_RESOLVE_HOST,
43                 COULDNT_CONNECT,
44                 FTP_WEIRD_SERVER_REPLY,
45                 REMOTE_ACCESS_DENIED,
46                 FTP_WEIRD_PASS_REPLY,
47                 FTP_WEIRD_PASV_REPLY,
48                 FTP_WEIRD_227_FORMAT,
49                 FTP_CANT_GET_HOST,
50                 FTP_COULDNT_SET_TYPE,
51                 PARTIAL_FILE,
52                 FTP_COULDNT_RETR_FILE,
53                 QUOTE_ERROR,
54                 HTTP_RETURNED_ERROR,
55                 WRITE_ERROR,
56                 UPLOAD_FAILED,
57                 READ_ERROR,
58                 OUT_OF_MEMORY,
59                 OPERATION_TIMEDOUT,
60                 FTP_PORT_FAILED,
61                 FTP_COULDNT_USE_REST,
62                 RANGE_ERROR,
63                 HTTP_POST_ERROR,
64                 SSL_CONNECT_ERROR,
65                 BAD_DOWNLOAD_RESUME,
66                 FILE_COULDNT_READ_FILE,
67                 LDAP_CANNOT_BIND,
68                 LDAP_SEARCH_FAILED,
69                 FUNCTION_NOT_FOUND,
70                 ABORTED_BY_CALLBACK,
71                 BAD_FUNCTION_ARGUMENT,
72                 INTERFACE_FAILED,
73                 TOO_MANY_REDIRECTS,
74                 UNKNOWN_TELNET_OPTION,
75                 TELNET_OPTION_SYNTAX,
76                 PEER_FAILED_VERIFICATION,
77                 GOT_NOTHING,
78                 SSL_ENGINE_NOTFOUND,
79                 SSL_ENGINE_SETFAILED,
80                 SEND_ERROR,
81                 RECV_ERROR,
82                 SSL_CERTPROBLEM,
83                 SSL_CIPHER,
84                 SSL_CACERT,
85                 BAD_CONTENT_ENCODING,
86                 LDAP_INVALID_URL,
87                 FILESIZE_EXCEEDED,
88                 USE_SSL_FAILED,
89                 SEND_FAIL_REWIND,
90                 SSL_ENGINE_INITFAILED,
91                 LOGIN_DENIED,
92                 TFTP_NOTFOUND,
93                 TFTP_PERM,
94                 REMOTE_DISK_FULL,
95                 TFTP_ILLEGAL,
96                 TFTP_UNKNOWNID,
97                 REMOTE_FILE_EXISTS,
98                 TFTP_NOSUCHUSER,
99                 CONV_FAILED,
100                 CONV_REQD,
101                 SSL_CACERT_BADFILE,
102                 REMOTE_FILE_NOT_FOUND,
103                 SSH,
104                 SSL_SHUTDOWN_FAILED,
105                 AGAIN,
106                 SSL_CRL_BADFILE,
107                 SSL_ISSUER_ERROR,
108                 [CCode (cname = "CURL_LAST")]
109                 LAST
110         }
111         [CCode (name = "CURLoption", cprefix = "CURLOPT_")]
112         public enum Option {
113                 FILE,
114                 URL,
115                 PORT,
116                 PROXY,
117                 USERPWD,
118                 PROXYUSERPWD,
119                 RANGE,
120                 INFILE,
121                 WRITEDATA,
122                 READDATA,
123                 ERRORBUFFER,
124                 WRITEFUNCTION,
125                 READFUNCTION,
126                 TIMEOUT,
127                 INFILESIZE,
128                 POSTFIELDS,
129                 REFERER,
130                 FTPPORT,
131                 USERAGENT,
132                 LOW_SPEED_LIMIT,
133                 LOW_SPEED_TIME,
134                 RESUME_FROM,
135                 COOKIE,
136                 HTTPHEADER,
137                 HTTPPOST,       // struct HTTPPost
138                 SSLCERT,
139                 KEYPASSWD,
140                 CRLF,
141                 QUOTE,
142                 WRITEHEADER,
143                 HEADERDATA,
144                 COOKIEFILE,
145                 SSLVERSION,
146                 TIMECONDITION,
147                 TIMEVALUE,
148                 CUSTOMREQUEST,
149                 STDERR,
150                 POSTQUOTE,
151                 WRITEINFO,
152                 VERBOSE,
153                 HEADER,
154                 NOPROGRESS,
155                 NOBODY,
156                 FAILONERROR,
157                 UPLOAD,
158                 POST,
159                 DIRLISTONLY,
160                 APPEND,
161                 NETRC,
162                 FOLLOWLOCATION,
163                 TRANSFERTEXT,
164                 PUT,
165                 PROGRESSFUNCTION,
166                 PROGRESSDATA,
167                 AUTOREFERER,
168                 PROXYPORT,
169                 POSTFIELDSIZE,
170                 HTTPPROXYTUNNEL,
171                 INTERFACE,
172                 KRBLEVEL,
173                 SSL_VERIFYPEER,
174                 CAINFO,
175                 MAXREDIRS,
176                 FILETIME,
177                 TELNETOPTIONS,
178                 MAXCONNECTS,
179                 CLOSEPOLICY,
180                 FRESH_CONNECT,
181                 FORBID_REUSE,
182                 RANDOM_FILE,
183                 EGDSOCKET,
184                 CONNECTTIMEOUT,
185                 HEADERFUNCTION,
186                 HTTPGET,
187                 SSL_VERIFYHOST,
188                 COOKIEJAR,
189                 SSL_CIPHER_LIST,
190                 HTTP_VERSION,
191                 FTP_USE_EPSV,
192                 SSLCERTTYPE,
193                 SSLKEY,
194                 SSLKEYTYPE,
195                 SSLENGINE,
196                 SSLENGINE_DEFAULT,
197                 DNS_USE_GLOBAL_CACHE,
198                 DNS_CACHE_TIMEOUT,
199                 PREQUOTE,
200                 DEBUGFUNCTION,
201                 DEBUGDATA,
202                 COOKIESESSION,
203                 CAPATH,
204                 BUFFERSIZE,
205                 NOSIGNAL,
206                 SHARE,
207                 PROXYTYPE ,
208                 ENCODING,
209                 PRIVATE,
210                 HTTP200ALIASES,
211                 UNRESTRICTED_AUTH,
212                 FTP_USE_EPRT,
213                 HTTPAUTH,
214                 SSL_CTX_FUNCTION,
215                 SSL_CTX_DATA,
216                 FTP_CREATE_MISSING_DIRS,
217                 PROXYAUTH,
218                 FTP_RESPONSE_TIMEOUT,
219                 IPRESOLVE,
220                 MAXFILESIZE,
221                 INFILESIZE_LARGE,
222                 RESUME_FROM_LARGE,
223                 MAXFILESIZE_LARGE,
224                 NETRC_FILE,
225                 USE_SSL,
226                 POSTFIELDSIZE_LARGE,
227                 TCP_NODELAY,
228                 FTPSSLAUTH,
229                 IOCTLFUNCTION,
230                 IOCTLDATA,
231                 FTP_ACCOUNT,
232                 COOKIELIST,
233                 IGNORE_CONTENT_LENGTH,
234                 FTP_SKIP_PASV_IP,
235                 FTP_FILEMETHOD,
236                 LOCALPORT,
237                 LOCALPORTRANGE,
238                 CONNECT_ONLY,
239                 CONV_FROM_NETWORK_FUNCTION,
240                 CONV_TO_NETWORK_FUNCTION,
241                 CONV_FROM_UTF8_FUNCTION,
242                 MAX_SEND_SPEED_LARGE,
243                 MAX_RECV_SPEED_LARGE,
244                 FTP_ALTERNATIVE_TO_USER,
245                 SOCKOPTFUNCTION,
246                 SOCKOPTDATA,
247                 SSL_SESSIONID_CACHE,
248                 SSH_AUTH_TYPES,
249                 SSH_PUBLIC_KEYFILE,
250                 SSH_PRIVATE_KEYFILE,
251                 FTP_SSL_CCC,
252                 TIMEOUT_MS,
253                 CONNECTTIMEOUT_MS,
254                 HTTP_TRANSFER_DECODING,
255                 HTTP_CONTENT_DECODING,
256                 NEW_FILE_PERMS,
257                 NEW_DIRECTORY_PERMS,
258                 POSTREDIR,
259                 SSH_HOST_PUBLIC_KEY_MD5,
260                 OPENSOCKETFUNCTION,
261                 OPENSOCKETDATA,
262                 COPYPOSTFIELDS,
263                 PROXY_TRANSFER_MODE,
264                 SEEKFUNCTION,
265                 SEEKDATA,
266                 CRLFILE,
267                 ISSUERCERT,
268                 ADDRESS_SCOPE,
269                 CERTINFO,
270                 USERNAME,
271                 PASSWORD,
272                 PROXYUSERNAME,
273                 PROXYPASSWORD,
274                 NOPROXY,
275                 TFTP_BLKSIZE,
276                 SOCKS5_GSSAPI_SERVICE,
277                 SOCKS5_GSSAPI_NEC,
278                 PROTOCOLS,
279                 REDIR_PROTOCOLS,
280                 SSH_KNOWNHOSTS,
281                 SSH_KEYFUNCTION,
282                 SSH_KEYDATA,
283                 LASTENTRY
284         }
285         [CCode (name = "CURLINFO", cprefix = "CURLINFO_")]
286         public enum Info {
287                 STRING,
288                 LONG,
289                 DOUBLE,
290                 SLIST,
291                 EFFECTIVE_URL,
292                 RESPONSE_CODE,
293                 TOTAL_TIME,
294                 NAMELOOKUP_TIME,
295                 CONNECT_TIME,
296                 PRETRANSFER_TIME,
297                 SIZE_UPLOAD,
298                 SIZE_DOWNLOAD,
299                 SPEED_DOWNLOAD,
300                 SPEED_UPLOAD,
301                 HEADER_SIZE,
302                 REQUEST_SIZE,
303                 SSL_VERIFYRESULT,
304                 FILETIME,
305                 CONTENT_LENGTH_DOWNLOAD,
306                 CONTENT_LENGTH_UPLOAD,
307                 STARTTRANSFER_TIME,
308                 CONTENT_TYPE,
309                 REDIRECT_TIME,
310                 REDIRECT_COUNT,
311                 PRIVATE,
312                 HTTP_CONNECTCODE,
313                 HTTPAUTH_AVAIL,
314                 PROXYAUTH_AVAIL,
315                 OS_ERRNO,
316                 NUM_CONNECTS,
317                 SSL_ENGINES,
318                 COOKIELIST,
319                 LASTSOCKET,
320                 FTP_ENTRY_PATH,
321                 REDIRECT_URL,
322                 PRIMARY_IP,
323                 APPCONNECT_TIME,
324                 CERTINFO,
325                 CONDITION_UNMET,
326                 LASTONE
327         }
328         [CCode (cname = "curl_progress_callback")]
329         public delegate int ProgressCallback (void* clientp, double dltotal, double dlnow, double ultotal, double ulnow);
330         [CCode (cname = "CURL_WRITEFUNC_PAUSE")]
331         public const size_t WRITEFUNC_PAUSE;
332         [CCode (cname = "curl_write_callback")]
333         public delegate size_t WriteCallback (char* buffer, size_t size, size_t nitems, void *outstream);
334         [CCode (cname = "CURL_SEEKFUNC_OK")]
335         public const int SEEKFUNC_OK;
336         [CCode (cname = "CURL_SEEKFUNC_FAIL")]
337         public const int SEEKFUNC_FAIL;
338         [CCode (cname = "CURL_SEEKFUNC_CANTSEEK")]
339         public const int SEEKFUNC_CANTSEEK;
340         [Ccode (cname = "curl_seek_callback")]
341         public delegate int SeekCallback (void* instream, Curl.Offset offset, int origin);
342         [CCode (cname = "CURL_READFUNC_ABORT")]
343         public const size_t READFUNC_ABORT;
344         [CCode (cname = "CURL_READFUNC_PAUSE")]
345         public const size_t READFUNC_PAUSE;
346         [CCode (cname = "curl_read_callback")]
347         public delegate size_t ReadCallback (char* buffer, size_t size, size_t nitems, void *instream);
348         [CCode (cname = "curlsocktype", cprefix = "CURLSOCKTYPE_")]
349         public enum SocketType {
350                 IPCXN,
351                 LAST
352         }
353         [CCode (cname = "curl_sockopt_callback")]
354         public delegate size_t SockoptCallback (void* clientp, Curl.Socket curlfd, Curl.SocketType purpose);
355         [CCode (cname = "curlioerr", cprefix = "CURLIOE_")]
356         public enum IOError {
357                 OK,
358                 UNKNOWNCMD,
359                 FAILRESTART,
360                 LAST
361         }
362         [CCode (cname = "curliocmd", cprefix = "CURLIOCMD_")]
363         public enum IOCmd {
364                 NOP,
365                 RESTARTREAD,
366                 LAST
367         }
368         [CCode (cname = "curl_ioctl_callback")]
369         public delegate Curl.IOError IoctlCallback (Curl.EasyHandle handle, int cmd, void* clientp);
370         [CCode (cname = "curl_malloc_callback")]
371         public delegate void* MallocCallback (size_t size);
372         [CCode (cname = "curl_free_callback")]
373         public delegate void FreeCallback (void* ptr);
374         [CCode (cname = "curl_realloc_callback")]
375         public delegate void* ReallocCallback (void* ptr, size_t size);
376         [CCode (cname = "curl_strdup_callback")]
377         public delegate string StrdupCallback (string str);
378         [CCode (cname = "curl_calloc_callback")]
379         public delegate void* CallocCallback (size_t nmemb, size_t size);
380         [CCode (cname = "curl_infotype", cprefix = "CURLINFO_")]
381         public enum InfoType {
382                 TEXT,
383                 HEADER_IN,
384                 HEADER_OUT,
385                 DATA_IN,
386                 DATA_OUT,
387                 SSL_DATA_IN,
388                 SSL_DATA_OUT
389         }
390         [CCode (cname = "curl_debug_callback")]
391         public delegate int DebugCallback (Curl.EasyHandle handle, Curl.InfoType type, [CCode (array_length_type = "size_t")] char[] data, void* userptr);
392         [CCode (cname = "curl_conv_callback")]
393         public delegate Curl.Code ConvCallback ([CCode (array_length_type = "size_t")] char[] buffer);
394         [CCode (cname = "curl_ssl_ctx_callback")]
395         public delegate Curl.Code SSLCtxCallback (Curl.EasyHandle curl, void* ssl_ctx, void* userptr);
396         [CCode (cname = "curl_proxytype", cprefix = "CURLPROXY_")]
397         public enum ProxyType {
398                 HTTP,
399                 HTTP_1_0,
400                 SOCKS4,
401                 SOCKS5,
402                 SOCKS4A,
403                 SOCKS5_HOSTNAME
404         }
405         namespace AuthType {
406                 [CCode (cname = "CURLAUTH_NONE")]
407                 public const int NONE;
408                 [CCode (cname = "CURLAUTH_BASIC")]
409                 public const int BASIC;
410                 [CCode (cname = "CURLAUTH_DIGEST")]
411                 public const int DIGEST;
412                 [CCode (cname = "CURLAUTH_GSSNEGOTIATE")]
413                 public const int GSSNEGOTIATE;
414                 [CCode (cname = "CURLAUTH_NTLM")]
415                 public const int NTLM;
416                 [CCode (cname = "CURLAUTH_DIGEST_IE")]
417                 public const int DIGEST_IE;
418                 [CCode (cname = "CURLAUTH_ANY")]
419                 public const int ANY;
420                 [CCode (cname = "CURLAUTH_ANYSAFE")]
421                 public const int ANYSAFE;
422         }
423         namespace SSHAuthType {
424                 [CCode (cname = "CURLSSH_AUTH_ANY")]
425                 public const int ANY;
426                 [CCode (cname = "CURLSSH_AUTH_NONE")]
427                 public const int NONE;
428                 [CCode (cname = "CURLSSH_AUTH_PUBLICKEY")]
429                 public const int PUBLICKEY;
430                 [CCode (cname = "CURLSSH_AUTH_PASSWORD")]
431                 public const int PASSWORD;
432                 [CCode (cname = "CURLSSH_AUTH_HOST")]
433                 public const int HOST;
434                 [CCode (cname = "CURLSSH_AUTH_KEYBOARD")]
435                 public const int KEYBOARD;
436                 [CCode (cname = "CURLSSH_AUTH_DEFAULT")]
437                 public const int DEFAULT;
438         }
439         public const int ERROR_SIZE;
440         [CCode (cname = "curl_usessl", cprefix = "CURLUSESSL_")]
441         public enum UseSSL {
442                 NONE,
443                 TRY,
444                 CONTROL,
445                 ALL
446         }
447         [CCode (cname = "curl_ftpccc", cprefix = "CURLFTPSSL_")]
448         enum FTPSSL {
449                 CCC_NONE,
450                 CCC_PASSIVE,
451                 CCC_ACTIVE
452         }
453         [CCode (cname = "curl_ftpauth", cprefix = "CURLFTPAUTH_")]
454         enum FTPAuthType {
455                 DEFAULT,
456                 SSL,
457                 TLS
458         }
459         [CCode (cname = "curl_ftpcreatedir", cprefix = "CURLFTP_CREATE_DIR_")]
460         enum FTPCreateDir {
461                 NONE,
462                 [CCode (cname = "CURLFTP_CREATE_DIR")]
463                 CREATE,
464                 RETRY
465         }
466         [CCode (cname = "curl_ftpmethod", cprefix = "CURLFTPMETHOD_")]
467         enum FTPMethod {
468                 DEFAULT,
469                 MULTICWD,
470                 NOCWD,
471                 SINGLECWD
472         }
473         namespace Proto {
474                 [CCode (cname = "CURLPROTO_HTTP")]
475                 public const int HTTP;
476                 [CCode (cname = "CURLPROTO_HTTPS")]
477                 public const int HTTPS;
478                 [CCode (cname = "CURLPROTO_FTP")]
479                 public const int FTP;
480                 [CCode (cname = "CURLPROTO_FTPS")]
481                 public const int FTPS;
482                 [CCode (cname = "CURLPROTO_SCP")]
483                 public const int SCP;
484                 [CCode (cname = "CURLPROTO_SFTP")]
485                 public const int SFTP;
486                 [CCode (cname = "CURLPROTO_TELNET")]
487                 public const int TELNET;
488                 [CCode (cname = "CURLPROTO_LDAP")]
489                 public const int LDAP;
490                 [CCode (cname = "CURLPROTO_LDAPS")]
491                 public const int LDAPS;
492                 [CCode (cname = "CURLPROTO_DICT")]
493                 public const int DICT;
494                 [CCode (cname = "CURLPROTO_FILE")]
495                 public const int FILE;
496                 [CCode (cname = "CURLPROTO_TFTP")]
497                 public const int TFTP;
498                 [CCode (cname = "CURLPROTO_ALL")]
499                 public const int ALL;
500         }
501         public const int IPRESOLVE_WHATEVER;
502         public const int IPRESOLVE_V4;
503         public const int IPRESOLVE_V6;
504         public const int REDIR_GET_ALL;
505         public const int REDIR_POST_301;
506         public const int REDIR_POST_302;
507         public const int REDIR_POST_ALL;
508         [CCode (cname = "curl_TimeCond", cprefix = "CURL_TIMECOND_")]
509         public enum TimeCond {
510                 NONE,
511                 IFMODSINCE,
512                 IFUNMODSINCE,
513                 LASTMOD
514         }
515         [CCode (cname = "CURLformoption", cprefix = "CURLFORM_")]
516         public enum FormOption {
517                 COPYNAME,
518                 PTRNAME,
519                 NAMELENGTH,
520                 COPYCONTENTS,
521                 PTRCONTENTS,
522                 CONTENTSLENGTH,
523                 FILECONTENT,
524                 ARRAY,
525                 OBSOLETE,
526                 FILE,
527                 BUFFER,
528                 BUFFERPTR,
529                 BUFFERLENGTH,
530                 CONTENTTYPE,
531                 CONTENTHEADER,
532                 FILENAME,
533                 END,
534                 OBSOLETE2,
535                 STREAM
536         }
537         [CCode (cname = "struct curl_forms")]
538         public struct Forms {
539                 public Curl.FormOption option;
540                 public string value;
541         }
542         [CCode (cname = "CURLFORMcode", cprefix = "CURL_FORMADD_")]
543         public enum FormCode {
544                 OK,
545                 MEMORY,
546                 OPTION_TWICE,
547                 NULL,
548                 UNKNOWN_OPTION,
549                 INCOMPLETE,
550                 ILLEGAL_ARRAY,
551                 DISABLED
552         }
553         public Curl.FormCode formadd (ref Curl.HTTPPost httppost, ref Curl.HTTPPost last_post, ...);
554         [CCode (cname = "curl_formget_callback")]
555         public delegate size_t FormgetCallback (void* arg, [CCode (array_size_type = "size_t")] char[] buf);
556         public int formget (Curl.HTTPPost form, void* arg, Curl.FormgetCallback append);
557         public unowned string version ();
558         public void free (void* p);
559         [Compact]
560         [CCode (cname = "struct curl_slist", cprefix = "curl_slist_", free_function = "curl_slist_free_all")]
561         public class SList {
562                 public char* data;
563                 public Curl.SList next;
564                 public SList append (string data);
565         }
566         [CCode (cname = "CURLMcode", cprefix = "CURLM_")]
567         public enum MultiCode {
568                 CALL_MULTI_PERFORM,
569                 CALL_MULTI_SOCKET,
570                 OK,
571                 BAD_HANDLE,
572                 BAD_EASY_HANDLE,
573                 OUT_OF_MEMORY,
574                 INTERNAL_ERROR,
575                 BAD_SOCKET,
576                 UNKNOWN_OPTION
577         }
578         [CCode (cname = "CURLMSG", cprefix = "CURLMSG_")]
579         public enum MessageType {
580                 NONE,
581                 DONE
582         }
583         [CCode (cname = "CURLMsg")]
584         public struct Message {
585                 public Curl.MessageType msg;
586                 public Curl.EasyHandle easy_handle;
587                 [CCode (cname = "data.whatever")]
588                 public void* whatever;
589                 [CCode (cname = "data.result")]
590                 public Curl.Code result;
591         }
592         [Compact]
593         [CCode (cname = "CURLM", cprefix = "curl_multi_", free_function = "curl_multi_cleanup")]
594         public class MultiHandle {
595                 [CCode (cname = "curl_multi_init")]
596                 public MultiHandle ();
597                 public Curl.MultiCode add_handle (Curl.EasyHandle curl_handle);
598                 public Curl.MultiCode remove_handle (Curl.EasyHandle curl_handle);
599                 public Curl.MultiCode fdset (Posix.fd_set? read_fd_set, Posix.fd_set? write_fd_set, Posix.fd_set? exc_fd_set, out int max_fd);
600                 public Curl.MultiCode perform (out int running_handles);
601                 public unowned Curl.Message info_read (out int msgs_in_queue);
602                 public unowned string strerror (Curl.MultiCode code);
603                 public Curl.MultiCode socket_action (Curl.Socket s, int ev_bitmask, out int running_handles);
604                 public Curl.MultiCode socket_all (out int running_handles);
605                 public Curl.MultiCode timeout (out long milliseconds);
606                 [Printf]
607                 public Curl.MultiCode setopt (Curl.MultiOption option, ...);
608                 public Curl.MultiCode assign (Curl.Socket sockfd, void* sockp);
609         }
610         [CCode (has_target = false)]
611         public delegate int TimerCallback (Curl.MultiHandle multi, long timeout_ms, void* userp);
612         [SimpleType]
613         [CCode (cname = "curl_socket_t")]
614         public struct Socket {
615         }
616         [SimpleType]
617         [CCode (cname = "curl_off_t")]
618         public struct Offset {
619         }
620         [CCode (cname = "CURL_SOCKET_BAD")]
621         public const Curl.Socket SOCKET_BAD;
622         [CCode (cname = "CURL_POLL_NONE")]
623         public const int POLL_NONE;
624         [CCode (cname = "CURL_POLL_IN")]
625         public const int POLL_IN;
626         [CCode (cname = "CURL_POLL_OUT")]
627         public const int POLL_OUT;
628         [CCode (cname = "CURL_POLL_INOUT")]
629         public const int POLL_INOUT;
630         [CCode (cname = "CURL_POLL_REMOVE")]
631         public const int POLL_REMOVE;
632         [CCode (cname = "CURL_SOCKET_TIMEOUT")]
633         public const int SOCKET_TIMEOUT;
634         [CCode (cname = "CURL_CSELECT_IN")]
635         public const int CSELECT_IN;
636         [CCode (cname = "CURL_CSELECT_OUT")]
637         public const int CSELECT_OUT;
638         [CCode (cname = "CURL_CSELECT_ERR")]
639         public const int CSELECT_ERR;
640         [CCode (cname = "CURLMoption")]
641         public enum MultiOption {
642                 SOCKETFUNCTION,
643                 SOCKETDATA,
644                 PIPELINING,
645                 TIMERFUNCTION,
646                 TIMERDATA,
647                 MAXCONNECTS
648         }
649         [Compact]
650         [CCode (cname = "curl_httppost", unref_function = "curl_formfree")]
651         public class HTTPPost {
652                 public Curl.HTTPPost next;
653                 [CCode (array_length_cname = "namelength", array_length_type = "long")]
654                 public weak char[] name;
655                 [CCode (array_length_cname = "contentslength", array_length_type = "long")]
656                 public weak char[] contents;
657                 [CCode (array_length_cname = "bufferlength", array_length_type = "long")]
658                 public weak char[] buffer;
659                 public string contenttype;
660                 public Curl.SList contentheader;
661                 public Curl.HTTPPost more;
662                 public long flags;
663                 public string showfilename;
664                 public void* userp;
665                 [CCode (cname = "HTTPPOST_FILENAME")]
666                 public const long FILENAME;
667                 [CCode (cname = "HTTPPOST_READFILE")]
668                 public const long READFILE;
669                 [CCode (cname = "HTTPPOST_PTRCONTENTS")]
670                 public const long PTRCONTENTS;
671                 [CCode (cname = "HTTPPOST_BUFFER")]
672                 public const long BUFFER;
673                 [CCode (cname = "HTTPPOST_PTRBUFFER")]
674                 public const long PTRBUFFER;
675                 [CCode (cname = "HTTPPOST_CALLBACK")]
676                 public const long CALLBACK;
677         }
678         [CCode (cname = "LIBCURL_COPYRIGHT")]
679         public const string COPYRIGHT;
680         [CCode (cname = "LIBCURL_VERSION")]
681         public const string VERSION;
682         [CCode (cname = "LIBCURL_VERSION_MAJOR")]
683         public const int VERSION_MAJOR;
684         [CCode (cname = "LIBCURL_VERSION_MINOR")]
685         public const int VERSION_MINOR;
686         [CCode (cname = "LIBCURL_VERSION_PATCH")]
687         public const int VERSION_PATCH;
688         [CCode (cname = "LIBCURL_VERSION_NUM")]
689         public const int VERSION_NUM;
690         [CCode (cname = "LIBCURL_TIMESTAMP")]
691         public const string TIMESTAMP;
692 }