rhack 1.1.8 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +6 -14
  2. data/Rakefile +2 -1
  3. data/config/rhack.yml.template +1 -0
  4. data/ext/curb-original/curb.c +977 -977
  5. data/ext/curb-original/curb.h +52 -52
  6. data/ext/curb-original/curb_config.h +238 -238
  7. data/ext/curb-original/curb_easy.c +3404 -3404
  8. data/ext/curb-original/curb_easy.h +90 -90
  9. data/ext/curb-original/curb_errors.c +647 -647
  10. data/ext/curb-original/curb_errors.h +129 -129
  11. data/ext/curb-original/curb_macros.h +159 -159
  12. data/ext/curb-original/curb_multi.c +633 -633
  13. data/ext/curb-original/curb_multi.h +26 -26
  14. data/ext/curb-original/curb_postfield.c +523 -523
  15. data/ext/curb-original/curb_postfield.h +40 -40
  16. data/ext/curb-original/curb_upload.c +80 -80
  17. data/ext/curb-original/curb_upload.h +30 -30
  18. data/ext/curb/curb.c +977 -977
  19. data/ext/curb/curb.h +52 -52
  20. data/ext/curb/curb_config.h +270 -270
  21. data/ext/curb/curb_easy.c +3434 -3434
  22. data/ext/curb/curb_easy.h +94 -94
  23. data/ext/curb/curb_errors.c +647 -647
  24. data/ext/curb/curb_errors.h +129 -129
  25. data/ext/curb/curb_macros.h +162 -162
  26. data/ext/curb/curb_multi.c +702 -702
  27. data/ext/curb/curb_multi.h +26 -26
  28. data/ext/curb/curb_postfield.c +523 -523
  29. data/ext/curb/curb_postfield.h +40 -40
  30. data/ext/curb/curb_upload.c +80 -80
  31. data/ext/curb/curb_upload.h +30 -30
  32. data/lib/rhack.rb +4 -1
  33. data/lib/rhack/clients/oauth.rb +1 -1
  34. data/lib/rhack/js/browser/env.js +697 -697
  35. data/lib/rhack/js/browser/jquery.js +7180 -7180
  36. data/lib/rhack/js/browser/xmlsax.js +1564 -1564
  37. data/lib/rhack/js/browser/xmlw3cdom_1.js +1443 -1443
  38. data/lib/rhack/js/browser/xmlw3cdom_2.js +2744 -2744
  39. data/lib/rhack/page.rb +6 -2
  40. data/lib/rhack/storage.rb +1 -1
  41. data/lib/rhack/version.rb +1 -1
  42. data/rhack.gemspec +1 -1
  43. metadata +16 -16
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODEwYTk0NTdiOTg0MDRmMTA1YWU1NmYwNzNjMzBkNzk2ODYxY2FiMA==
5
- data.tar.gz: !binary |-
6
- YzJmODZmY2QxYWVkYjJkZWFiN2RhODY4Y2Q0OTcyNTg3NGE0MzAzNw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MjI3NTZhODg3MGUxMGVlNzJhNGYwNWIyNTVmZGJhNjVjNzJjMjNmYjIyZjc5
10
- ZTlhNjEwZjJkNGYxNDFhYjQ3ZGY0MjQ5MTcwMGFiNjcxZjYwOTI2NTIwNWIz
11
- MDJjZWI4NjQzZTkyMGFmNWM2N2RmOWFhN2Y5MjU0Mjk2NWVjZWQ=
12
- data.tar.gz: !binary |-
13
- MWNhNzJmZDI4OTRhYTgwZDJkNjQzODk2ZDYyNzQ4NTZlNTY4YjUyNTRiNGY0
14
- MGQ1NWUxOTQyNTNiODBhOTYyYjRjOWQwMWE3ZjY5MTI5YWUwYTk5NTJhMTdl
15
- YTIxNWQyZGJkMzhhNGJhMWU0MzMxMjE4ZjYxODZhYmI1YmU4NGQ=
2
+ SHA1:
3
+ metadata.gz: f28c3cb05c65018360d52ba98547da0bff2c3a66
4
+ data.tar.gz: 431e6835d84fecbaf1f6c236a7862da94dd02db7
5
+ SHA512:
6
+ metadata.gz: dfdd4a627e508816fb3df12b3fcbb088dddbd947e469bae035ca6a9a28370a0f5e37f8e13d164e7ec4dc8d70ed79283cfe9d0a682377b9e2d27a06ec7f15e67e
7
+ data.tar.gz: 6af36ff47a3acfdd9cc47ee979dcfbd4c8b1d4a5a993070198a6b6754db83dd2f50eaacb11d90f12cbdd1599b8e59971de56eb4ad562dc96a367b122e2c56438
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  #!/usr/bin/env ruby
2
3
  require "bundler/gem_tasks"
3
4
 
@@ -6,7 +7,7 @@ namespace :redis do
6
7
 
7
8
  task :config do
8
9
  mask = '{config/,}{redis,rhack}.yml'
9
- src = FileList[mask].first
10
+ src = '/home/shinku/redis.yml'#FileList[mask].first
10
11
  unless src
11
12
  puts "Source yml file is not found, searched mask: #{mask}"
12
13
  exit
@@ -29,6 +29,7 @@ db:
29
29
  redis:
30
30
  configfilename: config/redis.conf
31
31
  socket: tmp/sockets/redis.socket
32
+ pidfile: tmp/pids/redis.pid
32
33
  port: 0
33
34
  hostname: localhost
34
35
  dbfilename: db/redis-dump.rdb
@@ -1,977 +1,977 @@
1
- /* Curb - Libcurl(3) bindings for Ruby.
2
- * Copyright (c)2006 Ross Bamford.
3
- * Licensed under the Ruby License. See LICENSE for details.
4
- *
5
- * $Id: curb.c 35 2006-12-23 15:22:19Z roscopeco $
6
- */
7
-
8
- #include "curb.h"
9
- #include "curb_upload.h"
10
-
11
- VALUE mCurl;
12
-
13
- /* ================== VER QUERY FUNCS ==============*/
14
-
15
- /*
16
- * call-seq:
17
- * Curl.ipv6? => true or false
18
- *
19
- * Returns true if the installed libcurl supports IPv6.
20
- */
21
- static VALUE ruby_curl_ipv6_q(VALUE mod) {
22
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
23
- return((ver->features & CURL_VERSION_IPV6) ? Qtrue : Qfalse);
24
- }
25
-
26
- /*
27
- * call-seq:
28
- * Curl.kerberos4? => true or false
29
- *
30
- * Returns true if the installed libcurl supports Kerberos4 authentication
31
- * with FTP connections.
32
- */
33
- static VALUE ruby_curl_kerberos4_q(VALUE mod) {
34
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
35
- return((ver->features & CURL_VERSION_KERBEROS4) ? Qtrue : Qfalse);
36
- }
37
-
38
- /*
39
- * call-seq:
40
- * Curl.ssl? => true or false
41
- *
42
- * Returns true if the installed libcurl supports SSL connections.
43
- * For libcurl versions < 7.10, always returns false.
44
- */
45
- static VALUE ruby_curl_ssl_q(VALUE mod) {
46
- #ifdef HAVE_CURL_VERSION_SSL
47
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
48
- return((ver->features & CURL_VERSION_SSL) ? Qtrue : Qfalse);
49
- #else
50
- return Qfalse;
51
- #endif
52
- }
53
-
54
- /*
55
- * call-seq:
56
- * Curl.libz? => true or false
57
- *
58
- * Returns true if the installed libcurl supports HTTP deflate
59
- * using libz. For libcurl versions < 7.10, always returns false.
60
- */
61
- static VALUE ruby_curl_libz_q(VALUE mod) {
62
- #ifdef HAVE_CURL_VERSION_LIBZ
63
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
64
- return((ver->features & CURL_VERSION_LIBZ) ? Qtrue : Qfalse);
65
- #else
66
- return Qfalse;
67
- #endif
68
- }
69
-
70
- /*
71
- * call-seq:
72
- * Curl.ntlm? => true or false
73
- *
74
- * Returns true if the installed libcurl supports HTTP NTLM.
75
- * For libcurl versions < 7.10.6, always returns false.
76
- */
77
- static VALUE ruby_curl_ntlm_q(VALUE mod) {
78
- #ifdef HAVE_CURL_VERSION_NTLM
79
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
80
- return((ver->features & CURL_VERSION_NTLM) ? Qtrue : Qfalse);
81
- #else
82
- return Qfalse;
83
- #endif
84
- }
85
-
86
- /*
87
- * call-seq:
88
- * Curl.gssnegotiate? => true or false
89
- *
90
- * Returns true if the installed libcurl supports HTTP GSS-Negotiate.
91
- * For libcurl versions < 7.10.6, always returns false.
92
- */
93
- static VALUE ruby_curl_gssnegotiate_q(VALUE mod) {
94
- #ifdef HAVE_CURL_VERSION_GSSNEGOTIATE
95
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
96
- return((ver->features & CURL_VERSION_GSSNEGOTIATE) ? Qtrue : Qfalse);
97
- #else
98
- return Qfalse;
99
- #endif
100
- }
101
-
102
- /*
103
- * call-seq:
104
- * Curl.debug? => true or false
105
- *
106
- * Returns true if the installed libcurl was built with extra debug
107
- * capabilities built-in. For libcurl versions < 7.10.6, always returns
108
- * false.
109
- */
110
- static VALUE ruby_curl_debug_q(VALUE mod) {
111
- #ifdef HAVE_CURL_VERSION_DEBUG
112
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
113
- return((ver->features & CURL_VERSION_DEBUG) ? Qtrue : Qfalse);
114
- #else
115
- return Qfalse;
116
- #endif
117
- }
118
-
119
- /*
120
- * call-seq:
121
- * Curl.asyncdns? => true or false
122
- *
123
- * Returns true if the installed libcurl was built with support for
124
- * asynchronous name lookups, which allows more exact timeouts (even
125
- * on Windows) and less blocking when using the multi interface.
126
- * For libcurl versions < 7.10.7, always returns false.
127
- */
128
- static VALUE ruby_curl_asyncdns_q(VALUE mod) {
129
- #ifdef HAVE_CURL_VERSION_ASYNCHDNS
130
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
131
- return((ver->features & CURL_VERSION_ASYNCHDNS) ? Qtrue : Qfalse);
132
- #else
133
- return Qfalse;
134
- #endif
135
- }
136
-
137
- /*
138
- * call-seq:
139
- * Curl.spnego? => true or false
140
- *
141
- * Returns true if the installed libcurl was built with support for SPNEGO
142
- * authentication (Simple and Protected GSS-API Negotiation Mechanism, defined
143
- * in RFC 2478). For libcurl versions < 7.10.8, always returns false.
144
- */
145
- static VALUE ruby_curl_spnego_q(VALUE mod) {
146
- #ifdef HAVE_CURL_VERSION_SPNEGO
147
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
148
- return((ver->features & CURL_VERSION_SPNEGO) ? Qtrue : Qfalse);
149
- #else
150
- return Qfalse;
151
- #endif
152
- }
153
-
154
- /*
155
- * call-seq:
156
- * Curl.largefile? => true or false
157
- *
158
- * Returns true if the installed libcurl was built with support for large
159
- * files. For libcurl versions < 7.11.1, always returns false.
160
- */
161
- static VALUE ruby_curl_largefile_q(VALUE mod) {
162
- #ifdef HAVE_CURL_VERSION_LARGEFILE
163
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
164
- return((ver->features & CURL_VERSION_LARGEFILE) ? Qtrue : Qfalse);
165
- #else
166
- return Qfalse;
167
- #endif
168
- }
169
-
170
- /*
171
- * call-seq:
172
- * Curl.idn? => true or false
173
- *
174
- * Returns true if the installed libcurl was built with support for IDNA,
175
- * domain names with international letters. For libcurl versions < 7.12.0,
176
- * always returns false.
177
- */
178
- static VALUE ruby_curl_idn_q(VALUE mod) {
179
- #ifdef HAVE_CURL_VERSION_IDN
180
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
181
- return((ver->features & CURL_VERSION_IDN) ? Qtrue : Qfalse);
182
- #else
183
- return Qfalse;
184
- #endif
185
- }
186
-
187
- /*
188
- * call-seq:
189
- * Curl.sspi? => true or false
190
- *
191
- * Returns true if the installed libcurl was built with support for SSPI.
192
- * This is only available on Windows and makes libcurl use Windows-provided
193
- * functions for NTLM authentication. It also allows libcurl to use the current
194
- * user and the current user's password without the app having to pass them on.
195
- * For libcurl versions < 7.13.2, always returns false.
196
- */
197
- static VALUE ruby_curl_sspi_q(VALUE mod) {
198
- #ifdef HAVE_CURL_VERSION_SSPI
199
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
200
- return((ver->features & CURL_VERSION_SSPI) ? Qtrue : Qfalse);
201
- #else
202
- return Qfalse;
203
- #endif
204
- }
205
-
206
- /*
207
- * call-seq:
208
- * Curl.conv? => true or false
209
- *
210
- * Returns true if the installed libcurl was built with support for character
211
- * conversions. For libcurl versions < 7.15.4, always returns false.
212
- */
213
- static VALUE ruby_curl_conv_q(VALUE mod) {
214
- #ifdef HAVE_CURL_VERSION_CONV
215
- curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
216
- return((ver->features & CURL_VERSION_CONV) ? Qtrue : Qfalse);
217
- #else
218
- return Qfalse;
219
- #endif
220
- }
221
-
222
- void Init_curb_core() {
223
- // TODO we need to call curl_global_cleanup at exit!
224
- curl_version_info_data *ver;
225
- VALUE curlver, curllongver, curlvernum;
226
-
227
- curl_global_init(CURL_GLOBAL_ALL);
228
- ver = curl_version_info(CURLVERSION_NOW);
229
-
230
- mCurl = rb_define_module("Curl");
231
-
232
- curlver = rb_str_new2(ver->version);
233
- curllongver = rb_str_new2(curl_version());
234
- curlvernum = LONG2NUM(LIBCURL_VERSION_NUM);
235
-
236
- rb_define_const(mCurl, "CURB_VERSION", rb_str_new2(CURB_VERSION));
237
- rb_define_const(mCurl, "VERSION", curlver);
238
- rb_define_const(mCurl, "CURL_VERSION", curlver);
239
- rb_define_const(mCurl, "VERNUM", curlvernum);
240
- rb_define_const(mCurl, "CURL_VERNUM", curlvernum);
241
- rb_define_const(mCurl, "LONG_VERSION", curllongver);
242
- rb_define_const(mCurl, "CURL_LONG_VERSION", curllongver);
243
-
244
- /* Passed to on_debug handler to indicate that the data is informational text. */
245
- rb_define_const(mCurl, "CURLINFO_TEXT", INT2FIX(CURLINFO_TEXT));
246
-
247
- /* Passed to on_debug handler to indicate that the data is header (or header-like) data received from the peer. */
248
- rb_define_const(mCurl, "CURLINFO_HEADER_IN", INT2FIX(CURLINFO_HEADER_IN));
249
-
250
- /* Passed to on_debug handler to indicate that the data is header (or header-like) data sent to the peer. */
251
- rb_define_const(mCurl, "CURLINFO_HEADER_OUT", INT2FIX(CURLINFO_HEADER_OUT));
252
-
253
- /* Passed to on_debug handler to indicate that the data is protocol data received from the peer. */
254
- rb_define_const(mCurl, "CURLINFO_DATA_IN", INT2FIX(CURLINFO_DATA_IN));
255
-
256
- /* Passed to on_debug handler to indicate that the data is protocol data sent to the peer. */
257
- rb_define_const(mCurl, "CURLINFO_DATA_OUT", INT2FIX(CURLINFO_DATA_OUT));
258
-
259
- #ifdef HAVE_CURLFTPMETHOD_MULTICWD
260
- rb_define_const(mCurl, "CURL_MULTICWD", INT2FIX(CURLFTPMETHOD_MULTICWD));
261
- #endif
262
-
263
- #ifdef HAVE_CURLFTPMETHOD_NOCWD
264
- rb_define_const(mCurl, "CURL_NOCWD", INT2FIX(CURLFTPMETHOD_NOCWD));
265
- #endif
266
-
267
- #ifdef HAVE_CURLFTPMETHOD_SINGLECWD
268
- rb_define_const(mCurl, "CURL_SINGLECWD", INT2FIX(CURLFTPMETHOD_SINGLECWD));
269
- #endif
270
-
271
- /* When passed to Curl::Easy#proxy_type , indicates that the proxy is an HTTP proxy. (libcurl >= 7.10) */
272
- #ifdef HAVE_CURLPROXY_HTTP
273
- rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(CURLPROXY_HTTP));
274
- #else
275
- rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(-1));
276
- #endif
277
-
278
- #ifdef CURL_VERSION_SSL
279
- rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(CURL_SSLVERSION_DEFAULT));
280
- rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(CURL_SSLVERSION_TLSv1));
281
- rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(CURL_SSLVERSION_SSLv2));
282
- rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(CURL_SSLVERSION_SSLv3));
283
-
284
- rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(CURB_FTPSSL_CONTROL));
285
- rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(CURB_FTPSSL_NONE));
286
- rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(CURB_FTPSSL_TRY));
287
- rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(CURB_FTPSSL_ALL));
288
- #else
289
- rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(-1));
290
- rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(-1));
291
- rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(-1));
292
- rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(-1));
293
-
294
- rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(-1));
295
- rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(-1));
296
- rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(-1));
297
- rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(-1));
298
- #endif
299
-
300
- /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4 proxy. (libcurl >= 7.15.2) */
301
- #ifdef HAVE_CURLPROXY_SOCKS4
302
- rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(CURLPROXY_SOCKS4));
303
- #else
304
- rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(-2));
305
- #endif
306
-
307
- /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS5 proxy. (libcurl >= 7.10) */
308
- #ifdef HAVE_CURLPROXY_SOCKS5
309
- rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(CURLPROXY_SOCKS5));
310
- #else
311
- rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(-2));
312
- #endif
313
-
314
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Basic authentication. */
315
- #ifdef HAVE_CURLAUTH_BASIC
316
- rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(CURLAUTH_BASIC));
317
- #else
318
- rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(0));
319
- #endif
320
-
321
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Digest authentication. */
322
- #ifdef HAVE_CURLAUTH_DIGEST
323
- rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(CURLAUTH_DIGEST));
324
- #else
325
- rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(0));
326
- #endif
327
-
328
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use GSS Negotiate authentication. Requires a suitable GSS-API library. */
329
- #ifdef HAVE_CURLAUTH_GSSNEGOTIATE
330
- rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(CURLAUTH_GSSNEGOTIATE));
331
- #else
332
- rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(0));
333
- #endif
334
-
335
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use HTTP NTLM authentication. Requires MS Windows or OpenSSL support. */
336
- #ifdef HAVE_CURLAUTH_NTLM
337
- rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(CURLAUTH_NTLM));
338
- #else
339
- rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(0));
340
- #endif
341
-
342
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method except basic. */
343
- #ifdef HAVE_CURLAUTH_ANYSAFE
344
- rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(CURLAUTH_ANYSAFE));
345
- #else
346
- rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(0));
347
- #endif
348
-
349
- /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method. */
350
- #ifdef HAVE_CURLAUTH_ANY
351
- rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(CURLAUTH_ANY));
352
- #else
353
- rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(0));
354
- #endif
355
-
356
- CURB_DEFINE(CURLOPT_VERBOSE);
357
- CURB_DEFINE(CURLOPT_HEADER);
358
- CURB_DEFINE(CURLOPT_NOPROGRESS);
359
- CURB_DEFINE(CURLOPT_NOSIGNAL);
360
- CURB_DEFINE(CURLOPT_WRITEFUNCTION);
361
- CURB_DEFINE(CURLOPT_WRITEDATA);
362
- CURB_DEFINE(CURLOPT_READFUNCTION);
363
- CURB_DEFINE(CURLOPT_READDATA);
364
- CURB_DEFINE(CURLOPT_IOCTLFUNCTION);
365
- CURB_DEFINE(CURLOPT_IOCTLDATA);
366
- #if HAVE_CURLOPT_SEEKFUNCTION
367
- CURB_DEFINE(CURLOPT_SEEKFUNCTION);
368
- #endif
369
- #if HAVE_CURLOPT_SEEKDATA
370
- CURB_DEFINE(CURLOPT_SEEKDATA);
371
- #endif
372
- #if HAVE_CURLOPT_SOCKOPTFUNCTION
373
- CURB_DEFINE(CURLOPT_SOCKOPTFUNCTION);
374
- #endif
375
- #if HAVE_CURLOPT_SOCKOPTDATA
376
- CURB_DEFINE(CURLOPT_SOCKOPTDATA);
377
- #endif
378
- #if HAVE_CURLOPT_OPENSOCKETFUNCTION
379
- CURB_DEFINE(CURLOPT_OPENSOCKETFUNCTION);
380
- #endif
381
- #if HAVE_CURLOPT_OPENSOCKETDATA
382
- CURB_DEFINE(CURLOPT_OPENSOCKETDATA);
383
- #endif
384
- CURB_DEFINE(CURLOPT_PROGRESSFUNCTION);
385
- CURB_DEFINE(CURLOPT_PROGRESSDATA);
386
- CURB_DEFINE(CURLOPT_HEADERFUNCTION);
387
- CURB_DEFINE(CURLOPT_WRITEHEADER);
388
- CURB_DEFINE(CURLOPT_DEBUGFUNCTION);
389
- CURB_DEFINE(CURLOPT_DEBUGDATA);
390
- CURB_DEFINE(CURLOPT_SSL_CTX_FUNCTION);
391
- CURB_DEFINE(CURLOPT_SSL_CTX_DATA);
392
- CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION);
393
- CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION);
394
- CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION);
395
-
396
- #if HAVE_CURLOPT_INTERLEAVEFUNCTION
397
- CURB_DEFINE(CURLOPT_INTERLEAVEFUNCTION);
398
- #endif
399
- #if HAVE_CURLOPT_INTERLEAVEDATA
400
- CURB_DEFINE(CURLOPT_INTERLEAVEDATA);
401
- #endif
402
- #if HAVE_CURLOPT_CHUNK_BGN_FUNCTION
403
- CURB_DEFINE(CURLOPT_CHUNK_BGN_FUNCTION);
404
- #endif
405
- #if HAVE_CURLOPT_CHUNK_END_FUNCTION
406
- CURB_DEFINE(CURLOPT_CHUNK_END_FUNCTION);
407
- #endif
408
- #if HAVE_CURLOPT_CHUNK_DATA
409
- CURB_DEFINE(CURLOPT_CHUNK_DATA);
410
- #endif
411
- #if HAVE_CURLOPT_FNMATCH_FUNCTION
412
- CURB_DEFINE(CURLOPT_FNMATCH_FUNCTION);
413
- #endif
414
- #if HAVE_CURLOPT_FNMATCH_DATA
415
- CURB_DEFINE(CURLOPT_FNMATCH_DATA);
416
- #endif
417
- #if HAVE_CURLOPT_ERRORBUFFER
418
- CURB_DEFINE(CURLOPT_ERRORBUFFER);
419
- #endif
420
- #if HAVE_CURLOPT_STDERR
421
- CURB_DEFINE(CURLOPT_STDERR);
422
- #endif
423
- #if HAVE_CURLOPT_FAILONERROR
424
- CURB_DEFINE(CURLOPT_FAILONERROR);
425
- #endif
426
- CURB_DEFINE(CURLOPT_URL);
427
- #if HAVE_CURLOPT_PROTOCOLS
428
- CURB_DEFINE(CURLOPT_PROTOCOLS);
429
- #endif
430
- #if HAVE_CURLOPT_REDIR_PROTOCOLS
431
- CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS);
432
- #endif
433
- CURB_DEFINE(CURLOPT_PROXY);
434
- CURB_DEFINE(CURLOPT_PROXYPORT);
435
- #if HAVE_CURLOPT_PROXYTYPE
436
- CURB_DEFINE(CURLOPT_PROXYTYPE);
437
- #endif
438
- #if HAVE_CURLOPT_NOPROXY
439
- CURB_DEFINE(CURLOPT_NOPROXY);
440
- #endif
441
- CURB_DEFINE(CURLOPT_HTTPPROXYTUNNEL);
442
- #if HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
443
- CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE);
444
- #endif
445
- #if HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
446
- CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_NEC);
447
- #endif
448
- CURB_DEFINE(CURLOPT_INTERFACE);
449
- #if HAVE_CURLOPT_LOCALPORT
450
- CURB_DEFINE(CURLOPT_LOCALPORT);
451
- #endif
452
- CURB_DEFINE(CURLOPT_DNS_CACHE_TIMEOUT);
453
- CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE);
454
- CURB_DEFINE(CURLOPT_BUFFERSIZE);
455
- CURB_DEFINE(CURLOPT_PORT);
456
- CURB_DEFINE(CURLOPT_TCP_NODELAY);
457
- #if HAVE_CURLOPT_ADDRESS_SCOPE
458
- CURB_DEFINE(CURLOPT_ADDRESS_SCOPE);
459
- #endif
460
- CURB_DEFINE(CURLOPT_NETRC);
461
- CURB_DEFINE(CURL_NETRC_OPTIONAL);
462
- CURB_DEFINE(CURL_NETRC_IGNORED);
463
- CURB_DEFINE(CURL_NETRC_REQUIRED);
464
- #if HAVE_CURLOPT_NETRC_FILE
465
- CURB_DEFINE(CURLOPT_NETRC_FILE);
466
- #endif
467
- CURB_DEFINE(CURLOPT_USERPWD);
468
- CURB_DEFINE(CURLOPT_PROXYUSERPWD);
469
- #if HAVE_CURLOPT_USERNAME
470
- CURB_DEFINE(CURLOPT_USERNAME);
471
- #endif
472
- #if HAVE_CURLOPT_PASSWORD
473
- CURB_DEFINE(CURLOPT_PASSWORD);
474
- #endif
475
- #if HAVE_CURLOPT_PROXYUSERNAME
476
- CURB_DEFINE(CURLOPT_PASSWORD);
477
- #endif
478
- #if HAVE_CURLOPT_PROXYPASSWORD
479
- CURB_DEFINE(CURLOPT_PASSWORD);
480
- #endif
481
-
482
- #if HAVE_CURLOPT_HTTPAUTH
483
- CURB_DEFINE(CURLOPT_HTTPAUTH);
484
- #endif
485
- #if HAVE_CURLAUTH_DIGEST_IE
486
- CURB_DEFINE(CURLAUTH_DIGEST_IE);
487
- #endif
488
- #if HAVE_CURLAUTH_ONLY
489
- CURB_DEFINE(CURLAUTH_ONLY);
490
- #endif
491
- #if HAVE_CURLOPT_TLSAUTH_TYPE
492
- CURB_DEFINE(CURLOPT_TLSAUTH_TYPE);
493
- #endif
494
- #if HAVE_CURLOPT_TLSAUTH_SRP
495
- CURB_DEFINE(CURLOPT_TLSAUTH_SRP);
496
- #endif
497
- #if HAVE_CURLOPT_TLSAUTH_USERNAME
498
- CURB_DEFINE(CURLOPT_TLSAUTH_USERNAME);
499
- #endif
500
- #if HAVE_CURLOPT_TLSAUTH_PASSWORD
501
- CURB_DEFINE(CURLOPT_TLSAUTH_PASSWORD);
502
- #endif
503
- #if HAVE_CURLOPT_PROXYAUTH
504
- CURB_DEFINE(CURLOPT_PROXYAUTH);
505
- #endif
506
- #if HAVE_CURLOPT_AUTOREFERER
507
- CURB_DEFINE(CURLOPT_AUTOREFERER);
508
- #endif
509
- #if HAVE_CURLOPT_ENCODING
510
- CURB_DEFINE(CURLOPT_ENCODING);
511
- #endif
512
- #if HAVE_CURLOPT_FOLLOWLOCATION
513
- CURB_DEFINE(CURLOPT_FOLLOWLOCATION);
514
- #endif
515
- #if HAVE_CURLOPT_UNRESTRICTED_AUTH
516
- CURB_DEFINE(CURLOPT_UNRESTRICTED_AUTH);
517
- #endif
518
- #if HAVE_CURLOPT_MAXREDIRS
519
- CURB_DEFINE(CURLOPT_MAXREDIRS);
520
- #endif
521
- #if HAVE_CURLOPT_POSTREDIR
522
- CURB_DEFINE(CURLOPT_POSTREDIR);
523
- #endif
524
- #if HAVE_CURLOPT_PUT
525
- CURB_DEFINE(CURLOPT_PUT);
526
- #endif
527
- #if HAVE_CURLOPT_POST
528
- CURB_DEFINE(CURLOPT_POST);
529
- #endif
530
- CURB_DEFINE(CURLOPT_POSTFIELDS);
531
- CURB_DEFINE(CURLOPT_POSTFIELDSIZE);
532
- #if HAVE_CURLOPT_POSTFIELDSIZE_LARGE
533
- CURB_DEFINE(CURLOPT_POSTFIELDSIZE_LARGE);
534
- #endif
535
- #if HAVE_CURLOPT_COPYPOSTFIELDS
536
- CURB_DEFINE(CURLOPT_COPYPOSTFIELDS);
537
- #endif
538
- #if HAVE_CURLOPT_HTTPPOST
539
- CURB_DEFINE(CURLOPT_HTTPPOST);
540
- #endif
541
- CURB_DEFINE(CURLOPT_REFERER);
542
- CURB_DEFINE(CURLOPT_USERAGENT);
543
- CURB_DEFINE(CURLOPT_HTTPHEADER);
544
- #if HAVE_CURLOPT_HTTP200ALIASES
545
- CURB_DEFINE(CURLOPT_HTTP200ALIASES);
546
- #endif
547
-
548
- CURB_DEFINE(CURLOPT_COOKIE);
549
- CURB_DEFINE(CURLOPT_COOKIEFILE);
550
- CURB_DEFINE(CURLOPT_COOKIEJAR);
551
-
552
- #if HAVE_CURLOPT_COOKIESESSION
553
- CURB_DEFINE(CURLOPT_COOKIESESSION);
554
- #endif
555
- #if HAVE_CURLOPT_COOKIELIST
556
- CURB_DEFINE(CURLOPT_COOKIELIST);
557
- #endif
558
- #if HAVE_CURLOPT_HTTPGET
559
- CURB_DEFINE(CURLOPT_HTTPGET);
560
- #endif
561
- CURB_DEFINE(CURLOPT_HTTP_VERSION);
562
- CURB_DEFINE(CURL_HTTP_VERSION_NONE);
563
- CURB_DEFINE(CURL_HTTP_VERSION_1_0);
564
- CURB_DEFINE(CURL_HTTP_VERSION_1_1);
565
- #if HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
566
- CURB_DEFINE(CURLOPT_IGNORE_CONTENT_LENGTH);
567
- #endif
568
- #if HAVE_CURLOPT_HTTP_CONTENT_DECODING
569
- CURB_DEFINE(CURLOPT_HTTP_CONTENT_DECODING);
570
- #endif
571
- #if HAVE_CURLOPT_HTTP_TRANSFER_DECODING
572
- CURB_DEFINE(CURLOPT_HTTP_TRANSFER_DECODING);
573
- #endif
574
- #if HAVE_CURLOPT_MAIL_FROM
575
- CURB_DEFINE(CURLOPT_MAIL_FROM);
576
- #endif
577
- #if HAVE_CURLOPT_MAIL_RCPT
578
- CURB_DEFINE(CURLOPT_MAIL_RCPT);
579
- #endif
580
- #if HAVE_CURLOPT_TFTP_BLKSIZE
581
- CURB_DEFINE(CURLOPT_TFTP_BLKSIZE);
582
- #endif
583
- #if HAVE_CURLOPT_FTPPORT
584
- CURB_DEFINE(CURLOPT_FTPPORT);
585
- #endif
586
- #if HAVE_CURLOPT_QUOTE
587
- CURB_DEFINE(CURLOPT_QUOTE);
588
- #endif
589
- #if HAVE_CURLOPT_POSTQUOTE
590
- CURB_DEFINE(CURLOPT_POSTQUOTE);
591
- #endif
592
- #if HAVE_CURLOPT_PREQUOTE
593
- CURB_DEFINE(CURLOPT_PREQUOTE);
594
- #endif
595
- #if HAVE_CURLOPT_DIRLISTONLY
596
- CURB_DEFINE(CURLOPT_DIRLISTONLY);
597
- #endif
598
- #if HAVE_CURLOPT_APPEND
599
- CURB_DEFINE(CURLOPT_APPEND);
600
- #endif
601
- #if HAVE_CURLOPT_FTP_USE_EPRT
602
- CURB_DEFINE(CURLOPT_FTP_USE_EPRT);
603
- #endif
604
- #if HAVE_CURLOPT_FTP_USE_EPSV
605
- CURB_DEFINE(CURLOPT_FTP_USE_EPSV);
606
- #endif
607
- #if HAVE_CURLOPT_FTP_USE_PRET
608
- CURB_DEFINE(CURLOPT_FTP_USE_PRET);
609
- #endif
610
- #if HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
611
- CURB_DEFINE(CURLOPT_FTP_CREATE_MISSING_DIRS);
612
- #endif
613
- #if HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
614
- CURB_DEFINE(CURLOPT_FTP_RESPONSE_TIMEOUT);
615
- #endif
616
- #if HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
617
- CURB_DEFINE(CURLOPT_FTP_ALTERNATIVE_TO_USER);
618
- #endif
619
- #if HAVE_CURLOPT_FTP_SKIP_PASV_IP
620
- CURB_DEFINE(CURLOPT_FTP_SKIP_PASV_IP);
621
- #endif
622
- #if HAVE_CURLOPT_FTPSSLAUTH
623
- CURB_DEFINE(CURLOPT_FTPSSLAUTH);
624
- #endif
625
- #if HAVE_CURLFTPAUTH_DEFAULT
626
- CURB_DEFINE(CURLFTPAUTH_DEFAULT);
627
- #endif
628
- #if HAVE_CURLFTPAUTH_SSL
629
- CURB_DEFINE(CURLFTPAUTH_SSL);
630
- #endif
631
- #if HAVE_CURLFTPAUTH_TLS
632
- CURB_DEFINE(CURLFTPAUTH_TLS);
633
- #endif
634
- #if HAVE_CURLOPT_FTP_SSL_CCC
635
- CURB_DEFINE(CURLOPT_FTP_SSL_CCC);
636
- #endif
637
- #if HAVE_CURLFTPSSL_CCC_NONE
638
- CURB_DEFINE(CURLFTPSSL_CCC_NONE);
639
- #endif
640
- #if HAVE_CURLFTPSSL_CCC_PASSIVE
641
- CURB_DEFINE(CURLFTPSSL_CCC_PASSIVE);
642
- #endif
643
- #if HAVE_CURLFTPSSL_CCC_ACTIVE
644
- CURB_DEFINE(CURLFTPSSL_CCC_ACTIVE);
645
- #endif
646
- #if HAVE_CURLOPT_FTP_ACCOUNT
647
- CURB_DEFINE(CURLOPT_FTP_ACCOUNT);
648
- #endif
649
- #if HAVE_CURLOPT_FTP_FILEMETHOD
650
- CURB_DEFINE(CURLOPT_FTP_FILEMETHOD);
651
- #endif
652
- #if HAVE_CURLFTPMETHOD_MULTICWD
653
- CURB_DEFINE(CURLFTPMETHOD_MULTICWD);
654
- #endif
655
- #if HAVE_CURLFTPMETHOD_NOCWD
656
- CURB_DEFINE(CURLFTPMETHOD_NOCWD);
657
- #endif
658
- #if HAVE_CURLFTPMETHOD_SINGLECWD
659
- CURB_DEFINE(CURLFTPMETHOD_SINGLECWD);
660
- #endif
661
- #if HAVE_CURLOPT_RTSP_REQUEST
662
- CURB_DEFINE(CURLOPT_RTSP_REQUEST);
663
- #endif
664
- #if HAVE_CURL_RTSPREQ_OPTIONS
665
- CURB_DEFINE(CURL_RTSPREQ_OPTIONS);
666
- #endif
667
- #if HAVE_CURL_RTSPREQ_DESCRIBE
668
- CURB_DEFINE(CURL_RTSPREQ_DESCRIBE);
669
- #endif
670
- #if HAVE_CURL_RTSPREQ_ANNOUNCE
671
- CURB_DEFINE(CURL_RTSPREQ_ANNOUNCE);
672
- #endif
673
- #if HAVE_CURL_RTSPREQ_SETUP
674
- CURB_DEFINE(CURL_RTSPREQ_SETUP);
675
- #endif
676
- #if HAVE_CURL_RTSPREQ_PLAY
677
- CURB_DEFINE(CURL_RTSPREQ_PLAY);
678
- #endif
679
- #if HAVE_CURL_RTSPREQ_PAUSE
680
- CURB_DEFINE(CURL_RTSPREQ_PAUSE);
681
- #endif
682
- #if HAVE_CURL_RTSPREQ_TEARDOWN
683
- CURB_DEFINE(CURL_RTSPREQ_TEARDOWN);
684
- #endif
685
- #if HAVE_CURL_RTSPREQ_GET_PARAMETER
686
- CURB_DEFINE(CURL_RTSPREQ_GET_PARAMETER);
687
- #endif
688
- #if HAVE_CURL_RTSPREQ_SET_PARAMETER
689
- CURB_DEFINE(CURL_RTSPREQ_SET_PARAMETER);
690
- #endif
691
- #if HAVE_CURL_RTSPREQ_RECORD
692
- CURB_DEFINE(CURL_RTSPREQ_RECORD);
693
- #endif
694
- #if HAVE_CURL_RTSPREQ_RECEIVE
695
- CURB_DEFINE(CURL_RTSPREQ_RECEIVE);
696
- #endif
697
- #if HAVE_CURLOPT_RTSP_SESSION_ID
698
- CURB_DEFINE(CURLOPT_RTSP_SESSION_ID);
699
- #endif
700
- #if HAVE_CURLOPT_RTSP_STREAM_URI
701
- CURB_DEFINE(CURLOPT_RTSP_STREAM_URI);
702
- #endif
703
- #if HAVE_CURLOPT_RTSP_TRANSPORT
704
- CURB_DEFINE(CURLOPT_RTSP_TRANSPORT);
705
- #endif
706
- #if HAVE_CURLOPT_RTSP_HEADER
707
- CURB_DEFINE(CURLOPT_RTSP_HEADER);
708
- #endif
709
- #if HAVE_CURLOPT_RTSP_CLIENT_CSEQ
710
- CURB_DEFINE(CURLOPT_RTSP_CLIENT_CSEQ);
711
- #endif
712
- #if HAVE_CURLOPT_RTSP_SERVER_CSEQ
713
- CURB_DEFINE(CURLOPT_RTSP_SERVER_CSEQ);
714
- #endif
715
-
716
- CURB_DEFINE(CURLOPT_TRANSFERTEXT);
717
- #if HAVE_CURLOPT_PROXY_TRANSFER_MODE
718
- CURB_DEFINE(CURLOPT_PROXY_TRANSFER_MODE);
719
- #endif
720
- #if HAVE_CURLOPT_CRLF
721
- CURB_DEFINE(CURLOPT_CRLF);
722
- #endif
723
- #if HAVE_CURLOPT_RANGE
724
- CURB_DEFINE(CURLOPT_RANGE);
725
- #endif
726
- #if HAVE_CURLOPT_RESUME_FROM
727
- CURB_DEFINE(CURLOPT_RESUME_FROM);
728
- #endif
729
- #if HAVE_CURLOPT_RESUME_FROM_LARGE
730
- CURB_DEFINE(CURLOPT_RESUME_FROM_LARGE);
731
- #endif
732
- #if HAVE_CURLOPT_CUSTOMREQUEST
733
- CURB_DEFINE(CURLOPT_CUSTOMREQUEST);
734
- #endif
735
- #if HAVE_CURLOPT_FILETIME
736
- CURB_DEFINE(CURLOPT_FILETIME);
737
- #endif
738
- #if HAVE_CURLOPT_NOBODY
739
- CURB_DEFINE(CURLOPT_NOBODY);
740
- #endif
741
- #if HAVE_CURLOPT_INFILESIZE
742
- CURB_DEFINE(CURLOPT_INFILESIZE);
743
- #endif
744
- #if HAVE_CURLOPT_INFILESIZE_LARGE
745
- CURB_DEFINE(CURLOPT_INFILESIZE_LARGE);
746
- #endif
747
- #if HAVE_CURLOPT_UPLOAD
748
- CURB_DEFINE(CURLOPT_UPLOAD);
749
- #endif
750
- #if HAVE_CURLOPT_MAXFILESIZE
751
- CURB_DEFINE(CURLOPT_MAXFILESIZE);
752
- #endif
753
- #if HAVE_CURLOPT_MAXFILESIZE_LARGE
754
- CURB_DEFINE(CURLOPT_MAXFILESIZE_LARGE);
755
- #endif
756
- #if HAVE_CURLOPT_TIMECONDITION
757
- CURB_DEFINE(CURLOPT_TIMECONDITION);
758
- #endif
759
- #if HAVE_CURLOPT_TIMEVALUE
760
- CURB_DEFINE(CURLOPT_TIMEVALUE);
761
- #endif
762
-
763
- #if HAVE_CURLOPT_TIMEOUT
764
- CURB_DEFINE(CURLOPT_TIMEOUT);
765
- #endif
766
- #if HAVE_CURLOPT_TIMEOUT_MS
767
- CURB_DEFINE(CURLOPT_TIMEOUT_MS);
768
- #endif
769
- #if HAVE_CURLOPT_LOW_SPEED_LIMIT
770
- CURB_DEFINE(CURLOPT_LOW_SPEED_LIMIT);
771
- #endif
772
- #if HAVE_CURLOPT_LOW_SPEED_TIME
773
- CURB_DEFINE(CURLOPT_LOW_SPEED_TIME);
774
- #endif
775
- #if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
776
- CURB_DEFINE(CURLOPT_MAX_SEND_SPEED_LARGE);
777
- #endif
778
- #if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
779
- CURB_DEFINE(CURLOPT_MAX_RECV_SPEED_LARGE);
780
- #endif
781
- #if HAVE_CURLOPT_MAXCONNECTS
782
- CURB_DEFINE(CURLOPT_MAXCONNECTS);
783
- #endif
784
- #if HAVE_CURLOPT_CLOSEPOLICY
785
- CURB_DEFINE(CURLOPT_CLOSEPOLICY);
786
- #endif
787
- #if HAVE_CURLOPT_FRESH_CONNECT
788
- CURB_DEFINE(CURLOPT_FRESH_CONNECT);
789
- #endif
790
- #if HAVE_CURLOPT_FORBID_REUSE
791
- CURB_DEFINE(CURLOPT_FORBID_REUSE);
792
- #endif
793
- #if HAVE_CURLOPT_CONNECTTIMEOUT
794
- CURB_DEFINE(CURLOPT_CONNECTTIMEOUT);
795
- #endif
796
- #if HAVE_CURLOPT_CONNECTTIMEOUT_MS
797
- CURB_DEFINE(CURLOPT_CONNECTTIMEOUT_MS);
798
- #endif
799
- #if HAVE_CURLOPT_IPRESOLVE
800
- CURB_DEFINE(CURLOPT_IPRESOLVE);
801
- #endif
802
- #if HAVE_CURL_IPRESOLVE_WHATEVER
803
- CURB_DEFINE(CURL_IPRESOLVE_WHATEVER);
804
- #endif
805
- #if HAVE_CURL_IPRESOLVE_V4
806
- CURB_DEFINE(CURL_IPRESOLVE_V4);
807
- #endif
808
- #if HAVE_CURL_IPRESOLVE_V6
809
- CURB_DEFINE(CURL_IPRESOLVE_V6);
810
- #endif
811
- #if HAVE_CURLOPT_CONNECT_ONLY
812
- CURB_DEFINE(CURLOPT_CONNECT_ONLY);
813
- #endif
814
- #if HAVE_CURLOPT_USE_SSL
815
- CURB_DEFINE(CURLOPT_USE_SSL);
816
- #endif
817
- #if HAVE_CURLUSESSL_NONE
818
- CURB_DEFINE(CURLUSESSL_NONE);
819
- #endif
820
- #if HAVE_CURLUSESSL_TRY
821
- CURB_DEFINE(CURLUSESSL_TRY);
822
- #endif
823
- #if HAVE_CURLUSESSL_CONTROL
824
- CURB_DEFINE(CURLUSESSL_CONTROL);
825
- #endif
826
- #if HAVE_CURLUSESSL_ALL
827
- CURB_DEFINE(CURLUSESSL_ALL);
828
- #endif
829
- #if HAVE_CURLOPT_RESOLVE
830
- CURB_DEFINE(CURLOPT_RESOLVE);
831
- #endif
832
-
833
- #if HAVE_CURLOPT_SSLCERT
834
- CURB_DEFINE(CURLOPT_SSLCERT);
835
- #endif
836
- #if HAVE_CURLOPT_SSLCERTTYPE
837
- CURB_DEFINE(CURLOPT_SSLCERTTYPE);
838
- #endif
839
- #if HAVE_CURLOPT_SSLKEY
840
- CURB_DEFINE(CURLOPT_SSLKEY);
841
- #endif
842
- #if HAVE_CURLOPT_SSLKEYTYPE
843
- CURB_DEFINE(CURLOPT_SSLKEYTYPE);
844
- #endif
845
- #if HAVE_CURLOPT_KEYPASSWD
846
- CURB_DEFINE(CURLOPT_KEYPASSWD);
847
- #endif
848
- #if HAVE_CURLOPT_SSLENGINE
849
- CURB_DEFINE(CURLOPT_SSLENGINE);
850
- #endif
851
- #if HAVE_CURLOPT_SSLENGINE_DEFAULT
852
- CURB_DEFINE(CURLOPT_SSLENGINE_DEFAULT);
853
- #endif
854
- #if HAVE_CURLOPT_SSLVERSION
855
- CURB_DEFINE(CURLOPT_SSLVERSION);
856
- #endif
857
- #if HAVE_CURL_SSLVERSION_TLSv1
858
- CURB_DEFINE(CURL_SSLVERSION_TLSv1);
859
- #endif
860
- #if HAVE_CURL_SSLVERSION_SSLv2
861
- CURB_DEFINE(CURL_SSLVERSION_SSLv2);
862
- #endif
863
- #if HAVE_CURL_SSLVERSION_SSLv3
864
- CURB_DEFINE(CURL_SSLVERSION_SSLv3);
865
- #endif
866
- #if HAVE_CURLOPT_SSL_VERIFYPEER
867
- CURB_DEFINE(CURLOPT_SSL_VERIFYPEER);
868
- #endif
869
- #if HAVE_CURLOPT_CAINFO
870
- CURB_DEFINE(CURLOPT_CAINFO);
871
- #endif
872
- #if HAVE_CURLOPT_ISSUERCERT
873
- CURB_DEFINE(CURLOPT_ISSUERCERT);
874
- #endif
875
- #if HAVE_CURLOPT_CAPATH
876
- CURB_DEFINE(CURLOPT_CAPATH);
877
- #endif
878
- #if HAVE_CURLOPT_CRLFILE
879
- CURB_DEFINE(CURLOPT_CRLFILE);
880
- #endif
881
- #if HAVE_CURLOPT_SSL_VERIFYHOST
882
- CURB_DEFINE(CURLOPT_SSL_VERIFYHOST);
883
- #endif
884
- #if HAVE_CURLOPT_CERTINFO
885
- CURB_DEFINE(CURLOPT_CERTINFO);
886
- #endif
887
- #if HAVE_CURLOPT_RANDOM_FILE
888
- CURB_DEFINE(CURLOPT_RANDOM_FILE);
889
- #endif
890
- #if HAVE_CURLOPT_EGDSOCKET
891
- CURB_DEFINE(CURLOPT_EGDSOCKET);
892
- #endif
893
- #if HAVE_CURLOPT_SSL_CIPHER_LIST
894
- CURB_DEFINE(CURLOPT_SSL_CIPHER_LIST);
895
- #endif
896
- #if HAVE_CURLOPT_SSL_SESSIONID_CACHE
897
- CURB_DEFINE(CURLOPT_SSL_SESSIONID_CACHE);
898
- #endif
899
- #if HAVE_CURLOPT_KRBLEVEL
900
- CURB_DEFINE(CURLOPT_KRBLEVEL);
901
- #endif
902
-
903
- #if HAVE_CURLOPT_SSH_AUTH_TYPES
904
- CURB_DEFINE(CURLOPT_SSH_AUTH_TYPES);
905
- #endif
906
- #if HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
907
- CURB_DEFINE(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
908
- #endif
909
- #if HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
910
- CURB_DEFINE(CURLOPT_SSH_PUBLIC_KEYFILE);
911
- #endif
912
- #if HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
913
- CURB_DEFINE(CURLOPT_SSH_PRIVATE_KEYFILE);
914
- #endif
915
- #if HAVE_CURLOPT_SSH_KNOWNHOSTS
916
- CURB_DEFINE(CURLOPT_SSH_KNOWNHOSTS);
917
- #endif
918
- #if HAVE_CURLOPT_SSH_KEYFUNCTION
919
- CURB_DEFINE(CURLOPT_SSH_KEYFUNCTION);
920
- #endif
921
- #if HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
922
- CURB_DEFINE(CURLKHSTAT_FINE_ADD_TO_FILE);
923
- #endif
924
- #if HAVE_CURLKHSTAT_FINE
925
- CURB_DEFINE(CURLKHSTAT_FINE);
926
- #endif
927
- #if HAVE_CURLKHSTAT_REJECT
928
- CURB_DEFINE(CURLKHSTAT_REJECT);
929
- #endif
930
- #if HAVE_CURLKHSTAT_DEFER
931
- CURB_DEFINE(CURLKHSTAT_DEFER);
932
- #endif
933
- #if HAVE_CURLOPT_SSH_KEYDATA
934
- CURB_DEFINE(CURLOPT_SSH_KEYDATA);
935
- #endif
936
-
937
- #if HAVE_CURLOPT_PRIVATE
938
- CURB_DEFINE(CURLOPT_PRIVATE);
939
- #endif
940
- #if HAVE_CURLOPT_SHARE
941
- CURB_DEFINE(CURLOPT_SHARE);
942
- #endif
943
- #if HAVE_CURLOPT_NEW_FILE_PERMS
944
- CURB_DEFINE(CURLOPT_NEW_FILE_PERMS);
945
- #endif
946
- #if HAVE_CURLOPT_NEW_DIRECTORY_PERMS
947
- CURB_DEFINE(CURLOPT_NEW_DIRECTORY_PERMS);
948
- #endif
949
-
950
- #if HAVE_CURLOPT_TELNETOPTIONS
951
- CURB_DEFINE(CURLOPT_TELNETOPTIONS);
952
- #endif
953
-
954
- rb_define_const(mCurl, "HTTP_1_1", LONG2NUM(CURL_HTTP_VERSION_1_1));
955
- rb_define_const(mCurl, "HTTP_1_0", LONG2NUM(CURL_HTTP_VERSION_1_0));
956
- rb_define_const(mCurl, "HTTP_NONE", LONG2NUM(CURL_HTTP_VERSION_NONE));
957
-
958
- rb_define_singleton_method(mCurl, "ipv6?", ruby_curl_ipv6_q, 0);
959
- rb_define_singleton_method(mCurl, "kerberos4?", ruby_curl_kerberos4_q, 0);
960
- rb_define_singleton_method(mCurl, "ssl?", ruby_curl_ssl_q, 0);
961
- rb_define_singleton_method(mCurl, "libz?", ruby_curl_libz_q, 0);
962
- rb_define_singleton_method(mCurl, "ntlm?", ruby_curl_ntlm_q, 0);
963
- rb_define_singleton_method(mCurl, "gssnegotiate?", ruby_curl_gssnegotiate_q, 0);
964
- rb_define_singleton_method(mCurl, "debug?", ruby_curl_debug_q, 0);
965
- rb_define_singleton_method(mCurl, "asyncdns?", ruby_curl_asyncdns_q, 0);
966
- rb_define_singleton_method(mCurl, "spnego?", ruby_curl_spnego_q, 0);
967
- rb_define_singleton_method(mCurl, "largefile?", ruby_curl_largefile_q, 0);
968
- rb_define_singleton_method(mCurl, "idn?", ruby_curl_idn_q, 0);
969
- rb_define_singleton_method(mCurl, "sspi?", ruby_curl_sspi_q, 0);
970
- rb_define_singleton_method(mCurl, "conv?", ruby_curl_conv_q, 0);
971
-
972
- init_curb_errors();
973
- init_curb_easy();
974
- init_curb_postfield();
975
- init_curb_multi();
976
- init_curb_upload();
977
- }
1
+ /* Curb - Libcurl(3) bindings for Ruby.
2
+ * Copyright (c)2006 Ross Bamford.
3
+ * Licensed under the Ruby License. See LICENSE for details.
4
+ *
5
+ * $Id: curb.c 35 2006-12-23 15:22:19Z roscopeco $
6
+ */
7
+
8
+ #include "curb.h"
9
+ #include "curb_upload.h"
10
+
11
+ VALUE mCurl;
12
+
13
+ /* ================== VER QUERY FUNCS ==============*/
14
+
15
+ /*
16
+ * call-seq:
17
+ * Curl.ipv6? => true or false
18
+ *
19
+ * Returns true if the installed libcurl supports IPv6.
20
+ */
21
+ static VALUE ruby_curl_ipv6_q(VALUE mod) {
22
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
23
+ return((ver->features & CURL_VERSION_IPV6) ? Qtrue : Qfalse);
24
+ }
25
+
26
+ /*
27
+ * call-seq:
28
+ * Curl.kerberos4? => true or false
29
+ *
30
+ * Returns true if the installed libcurl supports Kerberos4 authentication
31
+ * with FTP connections.
32
+ */
33
+ static VALUE ruby_curl_kerberos4_q(VALUE mod) {
34
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
35
+ return((ver->features & CURL_VERSION_KERBEROS4) ? Qtrue : Qfalse);
36
+ }
37
+
38
+ /*
39
+ * call-seq:
40
+ * Curl.ssl? => true or false
41
+ *
42
+ * Returns true if the installed libcurl supports SSL connections.
43
+ * For libcurl versions < 7.10, always returns false.
44
+ */
45
+ static VALUE ruby_curl_ssl_q(VALUE mod) {
46
+ #ifdef HAVE_CURL_VERSION_SSL
47
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
48
+ return((ver->features & CURL_VERSION_SSL) ? Qtrue : Qfalse);
49
+ #else
50
+ return Qfalse;
51
+ #endif
52
+ }
53
+
54
+ /*
55
+ * call-seq:
56
+ * Curl.libz? => true or false
57
+ *
58
+ * Returns true if the installed libcurl supports HTTP deflate
59
+ * using libz. For libcurl versions < 7.10, always returns false.
60
+ */
61
+ static VALUE ruby_curl_libz_q(VALUE mod) {
62
+ #ifdef HAVE_CURL_VERSION_LIBZ
63
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
64
+ return((ver->features & CURL_VERSION_LIBZ) ? Qtrue : Qfalse);
65
+ #else
66
+ return Qfalse;
67
+ #endif
68
+ }
69
+
70
+ /*
71
+ * call-seq:
72
+ * Curl.ntlm? => true or false
73
+ *
74
+ * Returns true if the installed libcurl supports HTTP NTLM.
75
+ * For libcurl versions < 7.10.6, always returns false.
76
+ */
77
+ static VALUE ruby_curl_ntlm_q(VALUE mod) {
78
+ #ifdef HAVE_CURL_VERSION_NTLM
79
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
80
+ return((ver->features & CURL_VERSION_NTLM) ? Qtrue : Qfalse);
81
+ #else
82
+ return Qfalse;
83
+ #endif
84
+ }
85
+
86
+ /*
87
+ * call-seq:
88
+ * Curl.gssnegotiate? => true or false
89
+ *
90
+ * Returns true if the installed libcurl supports HTTP GSS-Negotiate.
91
+ * For libcurl versions < 7.10.6, always returns false.
92
+ */
93
+ static VALUE ruby_curl_gssnegotiate_q(VALUE mod) {
94
+ #ifdef HAVE_CURL_VERSION_GSSNEGOTIATE
95
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
96
+ return((ver->features & CURL_VERSION_GSSNEGOTIATE) ? Qtrue : Qfalse);
97
+ #else
98
+ return Qfalse;
99
+ #endif
100
+ }
101
+
102
+ /*
103
+ * call-seq:
104
+ * Curl.debug? => true or false
105
+ *
106
+ * Returns true if the installed libcurl was built with extra debug
107
+ * capabilities built-in. For libcurl versions < 7.10.6, always returns
108
+ * false.
109
+ */
110
+ static VALUE ruby_curl_debug_q(VALUE mod) {
111
+ #ifdef HAVE_CURL_VERSION_DEBUG
112
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
113
+ return((ver->features & CURL_VERSION_DEBUG) ? Qtrue : Qfalse);
114
+ #else
115
+ return Qfalse;
116
+ #endif
117
+ }
118
+
119
+ /*
120
+ * call-seq:
121
+ * Curl.asyncdns? => true or false
122
+ *
123
+ * Returns true if the installed libcurl was built with support for
124
+ * asynchronous name lookups, which allows more exact timeouts (even
125
+ * on Windows) and less blocking when using the multi interface.
126
+ * For libcurl versions < 7.10.7, always returns false.
127
+ */
128
+ static VALUE ruby_curl_asyncdns_q(VALUE mod) {
129
+ #ifdef HAVE_CURL_VERSION_ASYNCHDNS
130
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
131
+ return((ver->features & CURL_VERSION_ASYNCHDNS) ? Qtrue : Qfalse);
132
+ #else
133
+ return Qfalse;
134
+ #endif
135
+ }
136
+
137
+ /*
138
+ * call-seq:
139
+ * Curl.spnego? => true or false
140
+ *
141
+ * Returns true if the installed libcurl was built with support for SPNEGO
142
+ * authentication (Simple and Protected GSS-API Negotiation Mechanism, defined
143
+ * in RFC 2478). For libcurl versions < 7.10.8, always returns false.
144
+ */
145
+ static VALUE ruby_curl_spnego_q(VALUE mod) {
146
+ #ifdef HAVE_CURL_VERSION_SPNEGO
147
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
148
+ return((ver->features & CURL_VERSION_SPNEGO) ? Qtrue : Qfalse);
149
+ #else
150
+ return Qfalse;
151
+ #endif
152
+ }
153
+
154
+ /*
155
+ * call-seq:
156
+ * Curl.largefile? => true or false
157
+ *
158
+ * Returns true if the installed libcurl was built with support for large
159
+ * files. For libcurl versions < 7.11.1, always returns false.
160
+ */
161
+ static VALUE ruby_curl_largefile_q(VALUE mod) {
162
+ #ifdef HAVE_CURL_VERSION_LARGEFILE
163
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
164
+ return((ver->features & CURL_VERSION_LARGEFILE) ? Qtrue : Qfalse);
165
+ #else
166
+ return Qfalse;
167
+ #endif
168
+ }
169
+
170
+ /*
171
+ * call-seq:
172
+ * Curl.idn? => true or false
173
+ *
174
+ * Returns true if the installed libcurl was built with support for IDNA,
175
+ * domain names with international letters. For libcurl versions < 7.12.0,
176
+ * always returns false.
177
+ */
178
+ static VALUE ruby_curl_idn_q(VALUE mod) {
179
+ #ifdef HAVE_CURL_VERSION_IDN
180
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
181
+ return((ver->features & CURL_VERSION_IDN) ? Qtrue : Qfalse);
182
+ #else
183
+ return Qfalse;
184
+ #endif
185
+ }
186
+
187
+ /*
188
+ * call-seq:
189
+ * Curl.sspi? => true or false
190
+ *
191
+ * Returns true if the installed libcurl was built with support for SSPI.
192
+ * This is only available on Windows and makes libcurl use Windows-provided
193
+ * functions for NTLM authentication. It also allows libcurl to use the current
194
+ * user and the current user's password without the app having to pass them on.
195
+ * For libcurl versions < 7.13.2, always returns false.
196
+ */
197
+ static VALUE ruby_curl_sspi_q(VALUE mod) {
198
+ #ifdef HAVE_CURL_VERSION_SSPI
199
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
200
+ return((ver->features & CURL_VERSION_SSPI) ? Qtrue : Qfalse);
201
+ #else
202
+ return Qfalse;
203
+ #endif
204
+ }
205
+
206
+ /*
207
+ * call-seq:
208
+ * Curl.conv? => true or false
209
+ *
210
+ * Returns true if the installed libcurl was built with support for character
211
+ * conversions. For libcurl versions < 7.15.4, always returns false.
212
+ */
213
+ static VALUE ruby_curl_conv_q(VALUE mod) {
214
+ #ifdef HAVE_CURL_VERSION_CONV
215
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
216
+ return((ver->features & CURL_VERSION_CONV) ? Qtrue : Qfalse);
217
+ #else
218
+ return Qfalse;
219
+ #endif
220
+ }
221
+
222
+ void Init_curb_core() {
223
+ // TODO we need to call curl_global_cleanup at exit!
224
+ curl_version_info_data *ver;
225
+ VALUE curlver, curllongver, curlvernum;
226
+
227
+ curl_global_init(CURL_GLOBAL_ALL);
228
+ ver = curl_version_info(CURLVERSION_NOW);
229
+
230
+ mCurl = rb_define_module("Curl");
231
+
232
+ curlver = rb_str_new2(ver->version);
233
+ curllongver = rb_str_new2(curl_version());
234
+ curlvernum = LONG2NUM(LIBCURL_VERSION_NUM);
235
+
236
+ rb_define_const(mCurl, "CURB_VERSION", rb_str_new2(CURB_VERSION));
237
+ rb_define_const(mCurl, "VERSION", curlver);
238
+ rb_define_const(mCurl, "CURL_VERSION", curlver);
239
+ rb_define_const(mCurl, "VERNUM", curlvernum);
240
+ rb_define_const(mCurl, "CURL_VERNUM", curlvernum);
241
+ rb_define_const(mCurl, "LONG_VERSION", curllongver);
242
+ rb_define_const(mCurl, "CURL_LONG_VERSION", curllongver);
243
+
244
+ /* Passed to on_debug handler to indicate that the data is informational text. */
245
+ rb_define_const(mCurl, "CURLINFO_TEXT", INT2FIX(CURLINFO_TEXT));
246
+
247
+ /* Passed to on_debug handler to indicate that the data is header (or header-like) data received from the peer. */
248
+ rb_define_const(mCurl, "CURLINFO_HEADER_IN", INT2FIX(CURLINFO_HEADER_IN));
249
+
250
+ /* Passed to on_debug handler to indicate that the data is header (or header-like) data sent to the peer. */
251
+ rb_define_const(mCurl, "CURLINFO_HEADER_OUT", INT2FIX(CURLINFO_HEADER_OUT));
252
+
253
+ /* Passed to on_debug handler to indicate that the data is protocol data received from the peer. */
254
+ rb_define_const(mCurl, "CURLINFO_DATA_IN", INT2FIX(CURLINFO_DATA_IN));
255
+
256
+ /* Passed to on_debug handler to indicate that the data is protocol data sent to the peer. */
257
+ rb_define_const(mCurl, "CURLINFO_DATA_OUT", INT2FIX(CURLINFO_DATA_OUT));
258
+
259
+ #ifdef HAVE_CURLFTPMETHOD_MULTICWD
260
+ rb_define_const(mCurl, "CURL_MULTICWD", INT2FIX(CURLFTPMETHOD_MULTICWD));
261
+ #endif
262
+
263
+ #ifdef HAVE_CURLFTPMETHOD_NOCWD
264
+ rb_define_const(mCurl, "CURL_NOCWD", INT2FIX(CURLFTPMETHOD_NOCWD));
265
+ #endif
266
+
267
+ #ifdef HAVE_CURLFTPMETHOD_SINGLECWD
268
+ rb_define_const(mCurl, "CURL_SINGLECWD", INT2FIX(CURLFTPMETHOD_SINGLECWD));
269
+ #endif
270
+
271
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is an HTTP proxy. (libcurl >= 7.10) */
272
+ #ifdef HAVE_CURLPROXY_HTTP
273
+ rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(CURLPROXY_HTTP));
274
+ #else
275
+ rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(-1));
276
+ #endif
277
+
278
+ #ifdef CURL_VERSION_SSL
279
+ rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(CURL_SSLVERSION_DEFAULT));
280
+ rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(CURL_SSLVERSION_TLSv1));
281
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(CURL_SSLVERSION_SSLv2));
282
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(CURL_SSLVERSION_SSLv3));
283
+
284
+ rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(CURB_FTPSSL_CONTROL));
285
+ rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(CURB_FTPSSL_NONE));
286
+ rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(CURB_FTPSSL_TRY));
287
+ rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(CURB_FTPSSL_ALL));
288
+ #else
289
+ rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(-1));
290
+ rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(-1));
291
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(-1));
292
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(-1));
293
+
294
+ rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(-1));
295
+ rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(-1));
296
+ rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(-1));
297
+ rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(-1));
298
+ #endif
299
+
300
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4 proxy. (libcurl >= 7.15.2) */
301
+ #ifdef HAVE_CURLPROXY_SOCKS4
302
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(CURLPROXY_SOCKS4));
303
+ #else
304
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(-2));
305
+ #endif
306
+
307
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS5 proxy. (libcurl >= 7.10) */
308
+ #ifdef HAVE_CURLPROXY_SOCKS5
309
+ rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(CURLPROXY_SOCKS5));
310
+ #else
311
+ rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(-2));
312
+ #endif
313
+
314
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Basic authentication. */
315
+ #ifdef HAVE_CURLAUTH_BASIC
316
+ rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(CURLAUTH_BASIC));
317
+ #else
318
+ rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(0));
319
+ #endif
320
+
321
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Digest authentication. */
322
+ #ifdef HAVE_CURLAUTH_DIGEST
323
+ rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(CURLAUTH_DIGEST));
324
+ #else
325
+ rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(0));
326
+ #endif
327
+
328
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use GSS Negotiate authentication. Requires a suitable GSS-API library. */
329
+ #ifdef HAVE_CURLAUTH_GSSNEGOTIATE
330
+ rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(CURLAUTH_GSSNEGOTIATE));
331
+ #else
332
+ rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(0));
333
+ #endif
334
+
335
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use HTTP NTLM authentication. Requires MS Windows or OpenSSL support. */
336
+ #ifdef HAVE_CURLAUTH_NTLM
337
+ rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(CURLAUTH_NTLM));
338
+ #else
339
+ rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(0));
340
+ #endif
341
+
342
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method except basic. */
343
+ #ifdef HAVE_CURLAUTH_ANYSAFE
344
+ rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(CURLAUTH_ANYSAFE));
345
+ #else
346
+ rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(0));
347
+ #endif
348
+
349
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method. */
350
+ #ifdef HAVE_CURLAUTH_ANY
351
+ rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(CURLAUTH_ANY));
352
+ #else
353
+ rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(0));
354
+ #endif
355
+
356
+ CURB_DEFINE(CURLOPT_VERBOSE);
357
+ CURB_DEFINE(CURLOPT_HEADER);
358
+ CURB_DEFINE(CURLOPT_NOPROGRESS);
359
+ CURB_DEFINE(CURLOPT_NOSIGNAL);
360
+ CURB_DEFINE(CURLOPT_WRITEFUNCTION);
361
+ CURB_DEFINE(CURLOPT_WRITEDATA);
362
+ CURB_DEFINE(CURLOPT_READFUNCTION);
363
+ CURB_DEFINE(CURLOPT_READDATA);
364
+ CURB_DEFINE(CURLOPT_IOCTLFUNCTION);
365
+ CURB_DEFINE(CURLOPT_IOCTLDATA);
366
+ #if HAVE_CURLOPT_SEEKFUNCTION
367
+ CURB_DEFINE(CURLOPT_SEEKFUNCTION);
368
+ #endif
369
+ #if HAVE_CURLOPT_SEEKDATA
370
+ CURB_DEFINE(CURLOPT_SEEKDATA);
371
+ #endif
372
+ #if HAVE_CURLOPT_SOCKOPTFUNCTION
373
+ CURB_DEFINE(CURLOPT_SOCKOPTFUNCTION);
374
+ #endif
375
+ #if HAVE_CURLOPT_SOCKOPTDATA
376
+ CURB_DEFINE(CURLOPT_SOCKOPTDATA);
377
+ #endif
378
+ #if HAVE_CURLOPT_OPENSOCKETFUNCTION
379
+ CURB_DEFINE(CURLOPT_OPENSOCKETFUNCTION);
380
+ #endif
381
+ #if HAVE_CURLOPT_OPENSOCKETDATA
382
+ CURB_DEFINE(CURLOPT_OPENSOCKETDATA);
383
+ #endif
384
+ CURB_DEFINE(CURLOPT_PROGRESSFUNCTION);
385
+ CURB_DEFINE(CURLOPT_PROGRESSDATA);
386
+ CURB_DEFINE(CURLOPT_HEADERFUNCTION);
387
+ CURB_DEFINE(CURLOPT_WRITEHEADER);
388
+ CURB_DEFINE(CURLOPT_DEBUGFUNCTION);
389
+ CURB_DEFINE(CURLOPT_DEBUGDATA);
390
+ CURB_DEFINE(CURLOPT_SSL_CTX_FUNCTION);
391
+ CURB_DEFINE(CURLOPT_SSL_CTX_DATA);
392
+ CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION);
393
+ CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION);
394
+ CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION);
395
+
396
+ #if HAVE_CURLOPT_INTERLEAVEFUNCTION
397
+ CURB_DEFINE(CURLOPT_INTERLEAVEFUNCTION);
398
+ #endif
399
+ #if HAVE_CURLOPT_INTERLEAVEDATA
400
+ CURB_DEFINE(CURLOPT_INTERLEAVEDATA);
401
+ #endif
402
+ #if HAVE_CURLOPT_CHUNK_BGN_FUNCTION
403
+ CURB_DEFINE(CURLOPT_CHUNK_BGN_FUNCTION);
404
+ #endif
405
+ #if HAVE_CURLOPT_CHUNK_END_FUNCTION
406
+ CURB_DEFINE(CURLOPT_CHUNK_END_FUNCTION);
407
+ #endif
408
+ #if HAVE_CURLOPT_CHUNK_DATA
409
+ CURB_DEFINE(CURLOPT_CHUNK_DATA);
410
+ #endif
411
+ #if HAVE_CURLOPT_FNMATCH_FUNCTION
412
+ CURB_DEFINE(CURLOPT_FNMATCH_FUNCTION);
413
+ #endif
414
+ #if HAVE_CURLOPT_FNMATCH_DATA
415
+ CURB_DEFINE(CURLOPT_FNMATCH_DATA);
416
+ #endif
417
+ #if HAVE_CURLOPT_ERRORBUFFER
418
+ CURB_DEFINE(CURLOPT_ERRORBUFFER);
419
+ #endif
420
+ #if HAVE_CURLOPT_STDERR
421
+ CURB_DEFINE(CURLOPT_STDERR);
422
+ #endif
423
+ #if HAVE_CURLOPT_FAILONERROR
424
+ CURB_DEFINE(CURLOPT_FAILONERROR);
425
+ #endif
426
+ CURB_DEFINE(CURLOPT_URL);
427
+ #if HAVE_CURLOPT_PROTOCOLS
428
+ CURB_DEFINE(CURLOPT_PROTOCOLS);
429
+ #endif
430
+ #if HAVE_CURLOPT_REDIR_PROTOCOLS
431
+ CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS);
432
+ #endif
433
+ CURB_DEFINE(CURLOPT_PROXY);
434
+ CURB_DEFINE(CURLOPT_PROXYPORT);
435
+ #if HAVE_CURLOPT_PROXYTYPE
436
+ CURB_DEFINE(CURLOPT_PROXYTYPE);
437
+ #endif
438
+ #if HAVE_CURLOPT_NOPROXY
439
+ CURB_DEFINE(CURLOPT_NOPROXY);
440
+ #endif
441
+ CURB_DEFINE(CURLOPT_HTTPPROXYTUNNEL);
442
+ #if HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
443
+ CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE);
444
+ #endif
445
+ #if HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
446
+ CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_NEC);
447
+ #endif
448
+ CURB_DEFINE(CURLOPT_INTERFACE);
449
+ #if HAVE_CURLOPT_LOCALPORT
450
+ CURB_DEFINE(CURLOPT_LOCALPORT);
451
+ #endif
452
+ CURB_DEFINE(CURLOPT_DNS_CACHE_TIMEOUT);
453
+ CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE);
454
+ CURB_DEFINE(CURLOPT_BUFFERSIZE);
455
+ CURB_DEFINE(CURLOPT_PORT);
456
+ CURB_DEFINE(CURLOPT_TCP_NODELAY);
457
+ #if HAVE_CURLOPT_ADDRESS_SCOPE
458
+ CURB_DEFINE(CURLOPT_ADDRESS_SCOPE);
459
+ #endif
460
+ CURB_DEFINE(CURLOPT_NETRC);
461
+ CURB_DEFINE(CURL_NETRC_OPTIONAL);
462
+ CURB_DEFINE(CURL_NETRC_IGNORED);
463
+ CURB_DEFINE(CURL_NETRC_REQUIRED);
464
+ #if HAVE_CURLOPT_NETRC_FILE
465
+ CURB_DEFINE(CURLOPT_NETRC_FILE);
466
+ #endif
467
+ CURB_DEFINE(CURLOPT_USERPWD);
468
+ CURB_DEFINE(CURLOPT_PROXYUSERPWD);
469
+ #if HAVE_CURLOPT_USERNAME
470
+ CURB_DEFINE(CURLOPT_USERNAME);
471
+ #endif
472
+ #if HAVE_CURLOPT_PASSWORD
473
+ CURB_DEFINE(CURLOPT_PASSWORD);
474
+ #endif
475
+ #if HAVE_CURLOPT_PROXYUSERNAME
476
+ CURB_DEFINE(CURLOPT_PASSWORD);
477
+ #endif
478
+ #if HAVE_CURLOPT_PROXYPASSWORD
479
+ CURB_DEFINE(CURLOPT_PASSWORD);
480
+ #endif
481
+
482
+ #if HAVE_CURLOPT_HTTPAUTH
483
+ CURB_DEFINE(CURLOPT_HTTPAUTH);
484
+ #endif
485
+ #if HAVE_CURLAUTH_DIGEST_IE
486
+ CURB_DEFINE(CURLAUTH_DIGEST_IE);
487
+ #endif
488
+ #if HAVE_CURLAUTH_ONLY
489
+ CURB_DEFINE(CURLAUTH_ONLY);
490
+ #endif
491
+ #if HAVE_CURLOPT_TLSAUTH_TYPE
492
+ CURB_DEFINE(CURLOPT_TLSAUTH_TYPE);
493
+ #endif
494
+ #if HAVE_CURLOPT_TLSAUTH_SRP
495
+ CURB_DEFINE(CURLOPT_TLSAUTH_SRP);
496
+ #endif
497
+ #if HAVE_CURLOPT_TLSAUTH_USERNAME
498
+ CURB_DEFINE(CURLOPT_TLSAUTH_USERNAME);
499
+ #endif
500
+ #if HAVE_CURLOPT_TLSAUTH_PASSWORD
501
+ CURB_DEFINE(CURLOPT_TLSAUTH_PASSWORD);
502
+ #endif
503
+ #if HAVE_CURLOPT_PROXYAUTH
504
+ CURB_DEFINE(CURLOPT_PROXYAUTH);
505
+ #endif
506
+ #if HAVE_CURLOPT_AUTOREFERER
507
+ CURB_DEFINE(CURLOPT_AUTOREFERER);
508
+ #endif
509
+ #if HAVE_CURLOPT_ENCODING
510
+ CURB_DEFINE(CURLOPT_ENCODING);
511
+ #endif
512
+ #if HAVE_CURLOPT_FOLLOWLOCATION
513
+ CURB_DEFINE(CURLOPT_FOLLOWLOCATION);
514
+ #endif
515
+ #if HAVE_CURLOPT_UNRESTRICTED_AUTH
516
+ CURB_DEFINE(CURLOPT_UNRESTRICTED_AUTH);
517
+ #endif
518
+ #if HAVE_CURLOPT_MAXREDIRS
519
+ CURB_DEFINE(CURLOPT_MAXREDIRS);
520
+ #endif
521
+ #if HAVE_CURLOPT_POSTREDIR
522
+ CURB_DEFINE(CURLOPT_POSTREDIR);
523
+ #endif
524
+ #if HAVE_CURLOPT_PUT
525
+ CURB_DEFINE(CURLOPT_PUT);
526
+ #endif
527
+ #if HAVE_CURLOPT_POST
528
+ CURB_DEFINE(CURLOPT_POST);
529
+ #endif
530
+ CURB_DEFINE(CURLOPT_POSTFIELDS);
531
+ CURB_DEFINE(CURLOPT_POSTFIELDSIZE);
532
+ #if HAVE_CURLOPT_POSTFIELDSIZE_LARGE
533
+ CURB_DEFINE(CURLOPT_POSTFIELDSIZE_LARGE);
534
+ #endif
535
+ #if HAVE_CURLOPT_COPYPOSTFIELDS
536
+ CURB_DEFINE(CURLOPT_COPYPOSTFIELDS);
537
+ #endif
538
+ #if HAVE_CURLOPT_HTTPPOST
539
+ CURB_DEFINE(CURLOPT_HTTPPOST);
540
+ #endif
541
+ CURB_DEFINE(CURLOPT_REFERER);
542
+ CURB_DEFINE(CURLOPT_USERAGENT);
543
+ CURB_DEFINE(CURLOPT_HTTPHEADER);
544
+ #if HAVE_CURLOPT_HTTP200ALIASES
545
+ CURB_DEFINE(CURLOPT_HTTP200ALIASES);
546
+ #endif
547
+
548
+ CURB_DEFINE(CURLOPT_COOKIE);
549
+ CURB_DEFINE(CURLOPT_COOKIEFILE);
550
+ CURB_DEFINE(CURLOPT_COOKIEJAR);
551
+
552
+ #if HAVE_CURLOPT_COOKIESESSION
553
+ CURB_DEFINE(CURLOPT_COOKIESESSION);
554
+ #endif
555
+ #if HAVE_CURLOPT_COOKIELIST
556
+ CURB_DEFINE(CURLOPT_COOKIELIST);
557
+ #endif
558
+ #if HAVE_CURLOPT_HTTPGET
559
+ CURB_DEFINE(CURLOPT_HTTPGET);
560
+ #endif
561
+ CURB_DEFINE(CURLOPT_HTTP_VERSION);
562
+ CURB_DEFINE(CURL_HTTP_VERSION_NONE);
563
+ CURB_DEFINE(CURL_HTTP_VERSION_1_0);
564
+ CURB_DEFINE(CURL_HTTP_VERSION_1_1);
565
+ #if HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
566
+ CURB_DEFINE(CURLOPT_IGNORE_CONTENT_LENGTH);
567
+ #endif
568
+ #if HAVE_CURLOPT_HTTP_CONTENT_DECODING
569
+ CURB_DEFINE(CURLOPT_HTTP_CONTENT_DECODING);
570
+ #endif
571
+ #if HAVE_CURLOPT_HTTP_TRANSFER_DECODING
572
+ CURB_DEFINE(CURLOPT_HTTP_TRANSFER_DECODING);
573
+ #endif
574
+ #if HAVE_CURLOPT_MAIL_FROM
575
+ CURB_DEFINE(CURLOPT_MAIL_FROM);
576
+ #endif
577
+ #if HAVE_CURLOPT_MAIL_RCPT
578
+ CURB_DEFINE(CURLOPT_MAIL_RCPT);
579
+ #endif
580
+ #if HAVE_CURLOPT_TFTP_BLKSIZE
581
+ CURB_DEFINE(CURLOPT_TFTP_BLKSIZE);
582
+ #endif
583
+ #if HAVE_CURLOPT_FTPPORT
584
+ CURB_DEFINE(CURLOPT_FTPPORT);
585
+ #endif
586
+ #if HAVE_CURLOPT_QUOTE
587
+ CURB_DEFINE(CURLOPT_QUOTE);
588
+ #endif
589
+ #if HAVE_CURLOPT_POSTQUOTE
590
+ CURB_DEFINE(CURLOPT_POSTQUOTE);
591
+ #endif
592
+ #if HAVE_CURLOPT_PREQUOTE
593
+ CURB_DEFINE(CURLOPT_PREQUOTE);
594
+ #endif
595
+ #if HAVE_CURLOPT_DIRLISTONLY
596
+ CURB_DEFINE(CURLOPT_DIRLISTONLY);
597
+ #endif
598
+ #if HAVE_CURLOPT_APPEND
599
+ CURB_DEFINE(CURLOPT_APPEND);
600
+ #endif
601
+ #if HAVE_CURLOPT_FTP_USE_EPRT
602
+ CURB_DEFINE(CURLOPT_FTP_USE_EPRT);
603
+ #endif
604
+ #if HAVE_CURLOPT_FTP_USE_EPSV
605
+ CURB_DEFINE(CURLOPT_FTP_USE_EPSV);
606
+ #endif
607
+ #if HAVE_CURLOPT_FTP_USE_PRET
608
+ CURB_DEFINE(CURLOPT_FTP_USE_PRET);
609
+ #endif
610
+ #if HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
611
+ CURB_DEFINE(CURLOPT_FTP_CREATE_MISSING_DIRS);
612
+ #endif
613
+ #if HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
614
+ CURB_DEFINE(CURLOPT_FTP_RESPONSE_TIMEOUT);
615
+ #endif
616
+ #if HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
617
+ CURB_DEFINE(CURLOPT_FTP_ALTERNATIVE_TO_USER);
618
+ #endif
619
+ #if HAVE_CURLOPT_FTP_SKIP_PASV_IP
620
+ CURB_DEFINE(CURLOPT_FTP_SKIP_PASV_IP);
621
+ #endif
622
+ #if HAVE_CURLOPT_FTPSSLAUTH
623
+ CURB_DEFINE(CURLOPT_FTPSSLAUTH);
624
+ #endif
625
+ #if HAVE_CURLFTPAUTH_DEFAULT
626
+ CURB_DEFINE(CURLFTPAUTH_DEFAULT);
627
+ #endif
628
+ #if HAVE_CURLFTPAUTH_SSL
629
+ CURB_DEFINE(CURLFTPAUTH_SSL);
630
+ #endif
631
+ #if HAVE_CURLFTPAUTH_TLS
632
+ CURB_DEFINE(CURLFTPAUTH_TLS);
633
+ #endif
634
+ #if HAVE_CURLOPT_FTP_SSL_CCC
635
+ CURB_DEFINE(CURLOPT_FTP_SSL_CCC);
636
+ #endif
637
+ #if HAVE_CURLFTPSSL_CCC_NONE
638
+ CURB_DEFINE(CURLFTPSSL_CCC_NONE);
639
+ #endif
640
+ #if HAVE_CURLFTPSSL_CCC_PASSIVE
641
+ CURB_DEFINE(CURLFTPSSL_CCC_PASSIVE);
642
+ #endif
643
+ #if HAVE_CURLFTPSSL_CCC_ACTIVE
644
+ CURB_DEFINE(CURLFTPSSL_CCC_ACTIVE);
645
+ #endif
646
+ #if HAVE_CURLOPT_FTP_ACCOUNT
647
+ CURB_DEFINE(CURLOPT_FTP_ACCOUNT);
648
+ #endif
649
+ #if HAVE_CURLOPT_FTP_FILEMETHOD
650
+ CURB_DEFINE(CURLOPT_FTP_FILEMETHOD);
651
+ #endif
652
+ #if HAVE_CURLFTPMETHOD_MULTICWD
653
+ CURB_DEFINE(CURLFTPMETHOD_MULTICWD);
654
+ #endif
655
+ #if HAVE_CURLFTPMETHOD_NOCWD
656
+ CURB_DEFINE(CURLFTPMETHOD_NOCWD);
657
+ #endif
658
+ #if HAVE_CURLFTPMETHOD_SINGLECWD
659
+ CURB_DEFINE(CURLFTPMETHOD_SINGLECWD);
660
+ #endif
661
+ #if HAVE_CURLOPT_RTSP_REQUEST
662
+ CURB_DEFINE(CURLOPT_RTSP_REQUEST);
663
+ #endif
664
+ #if HAVE_CURL_RTSPREQ_OPTIONS
665
+ CURB_DEFINE(CURL_RTSPREQ_OPTIONS);
666
+ #endif
667
+ #if HAVE_CURL_RTSPREQ_DESCRIBE
668
+ CURB_DEFINE(CURL_RTSPREQ_DESCRIBE);
669
+ #endif
670
+ #if HAVE_CURL_RTSPREQ_ANNOUNCE
671
+ CURB_DEFINE(CURL_RTSPREQ_ANNOUNCE);
672
+ #endif
673
+ #if HAVE_CURL_RTSPREQ_SETUP
674
+ CURB_DEFINE(CURL_RTSPREQ_SETUP);
675
+ #endif
676
+ #if HAVE_CURL_RTSPREQ_PLAY
677
+ CURB_DEFINE(CURL_RTSPREQ_PLAY);
678
+ #endif
679
+ #if HAVE_CURL_RTSPREQ_PAUSE
680
+ CURB_DEFINE(CURL_RTSPREQ_PAUSE);
681
+ #endif
682
+ #if HAVE_CURL_RTSPREQ_TEARDOWN
683
+ CURB_DEFINE(CURL_RTSPREQ_TEARDOWN);
684
+ #endif
685
+ #if HAVE_CURL_RTSPREQ_GET_PARAMETER
686
+ CURB_DEFINE(CURL_RTSPREQ_GET_PARAMETER);
687
+ #endif
688
+ #if HAVE_CURL_RTSPREQ_SET_PARAMETER
689
+ CURB_DEFINE(CURL_RTSPREQ_SET_PARAMETER);
690
+ #endif
691
+ #if HAVE_CURL_RTSPREQ_RECORD
692
+ CURB_DEFINE(CURL_RTSPREQ_RECORD);
693
+ #endif
694
+ #if HAVE_CURL_RTSPREQ_RECEIVE
695
+ CURB_DEFINE(CURL_RTSPREQ_RECEIVE);
696
+ #endif
697
+ #if HAVE_CURLOPT_RTSP_SESSION_ID
698
+ CURB_DEFINE(CURLOPT_RTSP_SESSION_ID);
699
+ #endif
700
+ #if HAVE_CURLOPT_RTSP_STREAM_URI
701
+ CURB_DEFINE(CURLOPT_RTSP_STREAM_URI);
702
+ #endif
703
+ #if HAVE_CURLOPT_RTSP_TRANSPORT
704
+ CURB_DEFINE(CURLOPT_RTSP_TRANSPORT);
705
+ #endif
706
+ #if HAVE_CURLOPT_RTSP_HEADER
707
+ CURB_DEFINE(CURLOPT_RTSP_HEADER);
708
+ #endif
709
+ #if HAVE_CURLOPT_RTSP_CLIENT_CSEQ
710
+ CURB_DEFINE(CURLOPT_RTSP_CLIENT_CSEQ);
711
+ #endif
712
+ #if HAVE_CURLOPT_RTSP_SERVER_CSEQ
713
+ CURB_DEFINE(CURLOPT_RTSP_SERVER_CSEQ);
714
+ #endif
715
+
716
+ CURB_DEFINE(CURLOPT_TRANSFERTEXT);
717
+ #if HAVE_CURLOPT_PROXY_TRANSFER_MODE
718
+ CURB_DEFINE(CURLOPT_PROXY_TRANSFER_MODE);
719
+ #endif
720
+ #if HAVE_CURLOPT_CRLF
721
+ CURB_DEFINE(CURLOPT_CRLF);
722
+ #endif
723
+ #if HAVE_CURLOPT_RANGE
724
+ CURB_DEFINE(CURLOPT_RANGE);
725
+ #endif
726
+ #if HAVE_CURLOPT_RESUME_FROM
727
+ CURB_DEFINE(CURLOPT_RESUME_FROM);
728
+ #endif
729
+ #if HAVE_CURLOPT_RESUME_FROM_LARGE
730
+ CURB_DEFINE(CURLOPT_RESUME_FROM_LARGE);
731
+ #endif
732
+ #if HAVE_CURLOPT_CUSTOMREQUEST
733
+ CURB_DEFINE(CURLOPT_CUSTOMREQUEST);
734
+ #endif
735
+ #if HAVE_CURLOPT_FILETIME
736
+ CURB_DEFINE(CURLOPT_FILETIME);
737
+ #endif
738
+ #if HAVE_CURLOPT_NOBODY
739
+ CURB_DEFINE(CURLOPT_NOBODY);
740
+ #endif
741
+ #if HAVE_CURLOPT_INFILESIZE
742
+ CURB_DEFINE(CURLOPT_INFILESIZE);
743
+ #endif
744
+ #if HAVE_CURLOPT_INFILESIZE_LARGE
745
+ CURB_DEFINE(CURLOPT_INFILESIZE_LARGE);
746
+ #endif
747
+ #if HAVE_CURLOPT_UPLOAD
748
+ CURB_DEFINE(CURLOPT_UPLOAD);
749
+ #endif
750
+ #if HAVE_CURLOPT_MAXFILESIZE
751
+ CURB_DEFINE(CURLOPT_MAXFILESIZE);
752
+ #endif
753
+ #if HAVE_CURLOPT_MAXFILESIZE_LARGE
754
+ CURB_DEFINE(CURLOPT_MAXFILESIZE_LARGE);
755
+ #endif
756
+ #if HAVE_CURLOPT_TIMECONDITION
757
+ CURB_DEFINE(CURLOPT_TIMECONDITION);
758
+ #endif
759
+ #if HAVE_CURLOPT_TIMEVALUE
760
+ CURB_DEFINE(CURLOPT_TIMEVALUE);
761
+ #endif
762
+
763
+ #if HAVE_CURLOPT_TIMEOUT
764
+ CURB_DEFINE(CURLOPT_TIMEOUT);
765
+ #endif
766
+ #if HAVE_CURLOPT_TIMEOUT_MS
767
+ CURB_DEFINE(CURLOPT_TIMEOUT_MS);
768
+ #endif
769
+ #if HAVE_CURLOPT_LOW_SPEED_LIMIT
770
+ CURB_DEFINE(CURLOPT_LOW_SPEED_LIMIT);
771
+ #endif
772
+ #if HAVE_CURLOPT_LOW_SPEED_TIME
773
+ CURB_DEFINE(CURLOPT_LOW_SPEED_TIME);
774
+ #endif
775
+ #if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
776
+ CURB_DEFINE(CURLOPT_MAX_SEND_SPEED_LARGE);
777
+ #endif
778
+ #if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
779
+ CURB_DEFINE(CURLOPT_MAX_RECV_SPEED_LARGE);
780
+ #endif
781
+ #if HAVE_CURLOPT_MAXCONNECTS
782
+ CURB_DEFINE(CURLOPT_MAXCONNECTS);
783
+ #endif
784
+ #if HAVE_CURLOPT_CLOSEPOLICY
785
+ CURB_DEFINE(CURLOPT_CLOSEPOLICY);
786
+ #endif
787
+ #if HAVE_CURLOPT_FRESH_CONNECT
788
+ CURB_DEFINE(CURLOPT_FRESH_CONNECT);
789
+ #endif
790
+ #if HAVE_CURLOPT_FORBID_REUSE
791
+ CURB_DEFINE(CURLOPT_FORBID_REUSE);
792
+ #endif
793
+ #if HAVE_CURLOPT_CONNECTTIMEOUT
794
+ CURB_DEFINE(CURLOPT_CONNECTTIMEOUT);
795
+ #endif
796
+ #if HAVE_CURLOPT_CONNECTTIMEOUT_MS
797
+ CURB_DEFINE(CURLOPT_CONNECTTIMEOUT_MS);
798
+ #endif
799
+ #if HAVE_CURLOPT_IPRESOLVE
800
+ CURB_DEFINE(CURLOPT_IPRESOLVE);
801
+ #endif
802
+ #if HAVE_CURL_IPRESOLVE_WHATEVER
803
+ CURB_DEFINE(CURL_IPRESOLVE_WHATEVER);
804
+ #endif
805
+ #if HAVE_CURL_IPRESOLVE_V4
806
+ CURB_DEFINE(CURL_IPRESOLVE_V4);
807
+ #endif
808
+ #if HAVE_CURL_IPRESOLVE_V6
809
+ CURB_DEFINE(CURL_IPRESOLVE_V6);
810
+ #endif
811
+ #if HAVE_CURLOPT_CONNECT_ONLY
812
+ CURB_DEFINE(CURLOPT_CONNECT_ONLY);
813
+ #endif
814
+ #if HAVE_CURLOPT_USE_SSL
815
+ CURB_DEFINE(CURLOPT_USE_SSL);
816
+ #endif
817
+ #if HAVE_CURLUSESSL_NONE
818
+ CURB_DEFINE(CURLUSESSL_NONE);
819
+ #endif
820
+ #if HAVE_CURLUSESSL_TRY
821
+ CURB_DEFINE(CURLUSESSL_TRY);
822
+ #endif
823
+ #if HAVE_CURLUSESSL_CONTROL
824
+ CURB_DEFINE(CURLUSESSL_CONTROL);
825
+ #endif
826
+ #if HAVE_CURLUSESSL_ALL
827
+ CURB_DEFINE(CURLUSESSL_ALL);
828
+ #endif
829
+ #if HAVE_CURLOPT_RESOLVE
830
+ CURB_DEFINE(CURLOPT_RESOLVE);
831
+ #endif
832
+
833
+ #if HAVE_CURLOPT_SSLCERT
834
+ CURB_DEFINE(CURLOPT_SSLCERT);
835
+ #endif
836
+ #if HAVE_CURLOPT_SSLCERTTYPE
837
+ CURB_DEFINE(CURLOPT_SSLCERTTYPE);
838
+ #endif
839
+ #if HAVE_CURLOPT_SSLKEY
840
+ CURB_DEFINE(CURLOPT_SSLKEY);
841
+ #endif
842
+ #if HAVE_CURLOPT_SSLKEYTYPE
843
+ CURB_DEFINE(CURLOPT_SSLKEYTYPE);
844
+ #endif
845
+ #if HAVE_CURLOPT_KEYPASSWD
846
+ CURB_DEFINE(CURLOPT_KEYPASSWD);
847
+ #endif
848
+ #if HAVE_CURLOPT_SSLENGINE
849
+ CURB_DEFINE(CURLOPT_SSLENGINE);
850
+ #endif
851
+ #if HAVE_CURLOPT_SSLENGINE_DEFAULT
852
+ CURB_DEFINE(CURLOPT_SSLENGINE_DEFAULT);
853
+ #endif
854
+ #if HAVE_CURLOPT_SSLVERSION
855
+ CURB_DEFINE(CURLOPT_SSLVERSION);
856
+ #endif
857
+ #if HAVE_CURL_SSLVERSION_TLSv1
858
+ CURB_DEFINE(CURL_SSLVERSION_TLSv1);
859
+ #endif
860
+ #if HAVE_CURL_SSLVERSION_SSLv2
861
+ CURB_DEFINE(CURL_SSLVERSION_SSLv2);
862
+ #endif
863
+ #if HAVE_CURL_SSLVERSION_SSLv3
864
+ CURB_DEFINE(CURL_SSLVERSION_SSLv3);
865
+ #endif
866
+ #if HAVE_CURLOPT_SSL_VERIFYPEER
867
+ CURB_DEFINE(CURLOPT_SSL_VERIFYPEER);
868
+ #endif
869
+ #if HAVE_CURLOPT_CAINFO
870
+ CURB_DEFINE(CURLOPT_CAINFO);
871
+ #endif
872
+ #if HAVE_CURLOPT_ISSUERCERT
873
+ CURB_DEFINE(CURLOPT_ISSUERCERT);
874
+ #endif
875
+ #if HAVE_CURLOPT_CAPATH
876
+ CURB_DEFINE(CURLOPT_CAPATH);
877
+ #endif
878
+ #if HAVE_CURLOPT_CRLFILE
879
+ CURB_DEFINE(CURLOPT_CRLFILE);
880
+ #endif
881
+ #if HAVE_CURLOPT_SSL_VERIFYHOST
882
+ CURB_DEFINE(CURLOPT_SSL_VERIFYHOST);
883
+ #endif
884
+ #if HAVE_CURLOPT_CERTINFO
885
+ CURB_DEFINE(CURLOPT_CERTINFO);
886
+ #endif
887
+ #if HAVE_CURLOPT_RANDOM_FILE
888
+ CURB_DEFINE(CURLOPT_RANDOM_FILE);
889
+ #endif
890
+ #if HAVE_CURLOPT_EGDSOCKET
891
+ CURB_DEFINE(CURLOPT_EGDSOCKET);
892
+ #endif
893
+ #if HAVE_CURLOPT_SSL_CIPHER_LIST
894
+ CURB_DEFINE(CURLOPT_SSL_CIPHER_LIST);
895
+ #endif
896
+ #if HAVE_CURLOPT_SSL_SESSIONID_CACHE
897
+ CURB_DEFINE(CURLOPT_SSL_SESSIONID_CACHE);
898
+ #endif
899
+ #if HAVE_CURLOPT_KRBLEVEL
900
+ CURB_DEFINE(CURLOPT_KRBLEVEL);
901
+ #endif
902
+
903
+ #if HAVE_CURLOPT_SSH_AUTH_TYPES
904
+ CURB_DEFINE(CURLOPT_SSH_AUTH_TYPES);
905
+ #endif
906
+ #if HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
907
+ CURB_DEFINE(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
908
+ #endif
909
+ #if HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
910
+ CURB_DEFINE(CURLOPT_SSH_PUBLIC_KEYFILE);
911
+ #endif
912
+ #if HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
913
+ CURB_DEFINE(CURLOPT_SSH_PRIVATE_KEYFILE);
914
+ #endif
915
+ #if HAVE_CURLOPT_SSH_KNOWNHOSTS
916
+ CURB_DEFINE(CURLOPT_SSH_KNOWNHOSTS);
917
+ #endif
918
+ #if HAVE_CURLOPT_SSH_KEYFUNCTION
919
+ CURB_DEFINE(CURLOPT_SSH_KEYFUNCTION);
920
+ #endif
921
+ #if HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
922
+ CURB_DEFINE(CURLKHSTAT_FINE_ADD_TO_FILE);
923
+ #endif
924
+ #if HAVE_CURLKHSTAT_FINE
925
+ CURB_DEFINE(CURLKHSTAT_FINE);
926
+ #endif
927
+ #if HAVE_CURLKHSTAT_REJECT
928
+ CURB_DEFINE(CURLKHSTAT_REJECT);
929
+ #endif
930
+ #if HAVE_CURLKHSTAT_DEFER
931
+ CURB_DEFINE(CURLKHSTAT_DEFER);
932
+ #endif
933
+ #if HAVE_CURLOPT_SSH_KEYDATA
934
+ CURB_DEFINE(CURLOPT_SSH_KEYDATA);
935
+ #endif
936
+
937
+ #if HAVE_CURLOPT_PRIVATE
938
+ CURB_DEFINE(CURLOPT_PRIVATE);
939
+ #endif
940
+ #if HAVE_CURLOPT_SHARE
941
+ CURB_DEFINE(CURLOPT_SHARE);
942
+ #endif
943
+ #if HAVE_CURLOPT_NEW_FILE_PERMS
944
+ CURB_DEFINE(CURLOPT_NEW_FILE_PERMS);
945
+ #endif
946
+ #if HAVE_CURLOPT_NEW_DIRECTORY_PERMS
947
+ CURB_DEFINE(CURLOPT_NEW_DIRECTORY_PERMS);
948
+ #endif
949
+
950
+ #if HAVE_CURLOPT_TELNETOPTIONS
951
+ CURB_DEFINE(CURLOPT_TELNETOPTIONS);
952
+ #endif
953
+
954
+ rb_define_const(mCurl, "HTTP_1_1", LONG2NUM(CURL_HTTP_VERSION_1_1));
955
+ rb_define_const(mCurl, "HTTP_1_0", LONG2NUM(CURL_HTTP_VERSION_1_0));
956
+ rb_define_const(mCurl, "HTTP_NONE", LONG2NUM(CURL_HTTP_VERSION_NONE));
957
+
958
+ rb_define_singleton_method(mCurl, "ipv6?", ruby_curl_ipv6_q, 0);
959
+ rb_define_singleton_method(mCurl, "kerberos4?", ruby_curl_kerberos4_q, 0);
960
+ rb_define_singleton_method(mCurl, "ssl?", ruby_curl_ssl_q, 0);
961
+ rb_define_singleton_method(mCurl, "libz?", ruby_curl_libz_q, 0);
962
+ rb_define_singleton_method(mCurl, "ntlm?", ruby_curl_ntlm_q, 0);
963
+ rb_define_singleton_method(mCurl, "gssnegotiate?", ruby_curl_gssnegotiate_q, 0);
964
+ rb_define_singleton_method(mCurl, "debug?", ruby_curl_debug_q, 0);
965
+ rb_define_singleton_method(mCurl, "asyncdns?", ruby_curl_asyncdns_q, 0);
966
+ rb_define_singleton_method(mCurl, "spnego?", ruby_curl_spnego_q, 0);
967
+ rb_define_singleton_method(mCurl, "largefile?", ruby_curl_largefile_q, 0);
968
+ rb_define_singleton_method(mCurl, "idn?", ruby_curl_idn_q, 0);
969
+ rb_define_singleton_method(mCurl, "sspi?", ruby_curl_sspi_q, 0);
970
+ rb_define_singleton_method(mCurl, "conv?", ruby_curl_conv_q, 0);
971
+
972
+ init_curb_errors();
973
+ init_curb_easy();
974
+ init_curb_postfield();
975
+ init_curb_multi();
976
+ init_curb_upload();
977
+ }