~ubuntu-branches/debian/stretch/tclcurl/stretch

« back to all changes in this revision

Viewing changes to generic/tclcurl.h

  • Committer: Bazaar Package Importer
  • Author(s): Sven Hoexter
  • Date: 2009-08-05 21:30:47 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090805213047-jfz9ljcp5fzrxa5o
* New upstream release.
  + Refresh all patches.
  + Build-Depend at least on libcurl4 (>= 7.19.0).
* Update mail address of the upstream maintainer in debian/copyright.
* Bump Standards-Version to 3.8.2.
  + Add a debian/README.source file.
* Update debian/copyright with copyright information for Makefile.in
  and tclconfig/tcl.m4. Thanks to Ondrej Certik for the pointer in
  mysqltcl which has to applied here aswell.
* Add description header to all patches.
* Add patches/example-shebang. This patch adds a working shebang line
  to those example files that carry one (Thanks to Sergei).
* Set the permissions for the example files to 644, except for those
  with a working shebang line (Thanks to Sergei).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Header file for the TclCurl extension to enable Tcl interpreters
5
5
 * to access libcurl.
6
6
 *
7
 
 * Copyright (c) 2001-2007 Andr�s Garc�a Garc�a.
 
7
 * Copyright (c) 2001-2008 Andres Garcia Garcia.
8
8
 *
9
9
 * See the file "license.terms" for information on usage and redistribution
10
10
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
42
42
#define TCL_STORAGE_CLASS DLLEXPORT
43
43
#endif
44
44
 
45
 
#define TclCurlVersion "7.17.1"
 
45
#define TclCurlVersion "7.19.0"
46
46
 
47
47
/*
48
48
 * This struct will contain the data of a transfer if the user wants
114
114
 
115
115
#ifndef multi_h
116
116
 
117
 
static CONST char *commandTable[] = {
 
117
CONST static char *commandTable[] = {
118
118
    "setopt",
119
119
    "perform",
120
120
    "getinfo",
122
122
    "configure",
123
123
    "duphandle",
124
124
    "reset",
 
125
    "pause",
 
126
    "resume",
125
127
    (char *) NULL
126
128
};
127
129
 
128
 
static CONST char *optionTable[] = {
 
130
CONST static char *optionTable[] = {
129
131
    "CURLOPT_URL",           "CURLOPT_FILE",           "CURLOPT_INFILE",
130
132
    "CURLOPT_USERAGENT",     "CURLOPT_REFERER",        "CURLOPT_VERBOSE",
131
133
    "CURLOPT_HEADER",        "CURLOPT_NOBODY",         "CURLOPT_PROXY",
177
179
    "CURLOPT_NEW_FILE_PERMS",                          "CURLOPT_NEW_DIRECTORY_PERMS",
178
180
    "CURLOPT_KEYPASSWD",      "CURLOPT_APPEND",        "CURLOPT_DIRLISTONLY",
179
181
    "CURLOPT_USE_SSL",        "CURLOPT_POST301",       "CURLOPT_SSH_HOST_PUBLIC_KEY_MD5",
 
182
    "CURLOPT_PROXY_TRANSFER_MODE",                     "CURLOPT_CRLFILE",
 
183
    "CURLOPT_ISSUERCERT",     "CURLOPT_ADDRESS_SCOPE",
180
184
    (char *) NULL
181
185
};
182
186
 
183
 
static CONST char *configTable[] = {
 
187
CONST static char *configTable[] = {
184
188
    "-url",               "-file",               "-infile",
185
189
    "-useragent",         "-referer",            "-verbose",
186
190
    "-header",            "-nobody",             "-proxy",
230
234
    "-transferdecoding",  "-krblevel",           "-newfileperms",
231
235
    "-newdirectoryperms", "-keypasswd",          "-append",
232
236
    "-dirlistonly",       "-usessl",             "-post301",
233
 
    "-sshhostpublickeymd5",
 
237
    "-sshhostpublickeymd5",                      "-proxytransfermode",
 
238
    "-crlfile",           "-issuercert",         "-addressscope",
234
239
    (char *) NULL
235
240
};
236
241
 
237
 
static CONST char    *timeCond[] = {
 
242
CONST static char    *timeCond[] = {
238
243
    "ifmodsince", "ifunmodsince",
239
244
    (char *) NULL
240
245
};
241
246
 
242
 
static CONST char    *getInfoTable[]={
 
247
CONST static char    *getInfoTable[]={
243
248
    "effectiveurl",   "httpcode",       "responsecode",
244
249
    "filetime",       "totaltime",      "namelookuptime",
245
250
    "connecttime",    "pretransfertime","sizeupload",
250
255
    "redirecttime",   "redirectcount",  "httpauthavail",
251
256
    "proxyauthavail", "oserrno",        "numconnects",
252
257
    "sslengines",     "httpconnectcode","cookielist",
253
 
    "ftpentrypath",
 
258
    "ftpentrypath",   "redirecturl",    "primaryip",
 
259
    "appconnecttime",
254
260
    (char *) NULL
255
261
};
256
262
 
257
 
static CONST char   *curlFormTable[]={
 
263
CONST static char   *curlFormTable[]={
258
264
    "name",  "contents", "file", "contenttype", "contentheader", "filename",
259
265
    "bufferName", "buffer", "filecontent", (char *)NULL
260
266
};
261
267
 
262
 
static CONST char   *httpVersionTable[] = {
 
268
CONST static char   *httpVersionTable[] = {
263
269
    "none", "1.0", "1.1", (char *)NULL
264
270
};
265
271
 
266
 
static CONST char *netrcTable[] = {
 
272
CONST static char *netrcTable[] = {
267
273
    "optional", "ignored", "required", (char *)NULL
268
274
};
269
275
 
270
 
static CONST char *encodingTable[] = {
 
276
CONST static char *encodingTable[] = {
271
277
    "identity", "deflated", "all", (char *)NULL
272
278
};
273
279
 
274
 
static CONST char *versionInfoTable[] = {
 
280
CONST static char *versionInfoTable[] = {
275
281
    "-version",    "-versionnum",    "-host",         "-features",
276
282
    "-sslversion", "-sslversionnum", "-libzversion",
277
283
    "-protocols",  (char *)NULL
278
284
};
279
285
 
280
 
static CONST char *proxyTypeTable[] = {
281
 
    "http", "socks5", "socks4", (char *)NULL
 
286
CONST static char *proxyTypeTable[] = {
 
287
    "http", "socks4", "socks4a", "socks5", "socks5hostname", (char *)NULL
282
288
};
283
289
 
284
 
static CONST char *httpAuthMethods[] = {
 
290
CONST static char *httpAuthMethods[] = {
285
291
    "basic", "digest", "gssnegotiate", "ntlm", "any", "anysafe", (char *)NULL
286
292
};
287
293
 
288
 
static CONST char *ipresolve[] = {
 
294
CONST static char *ipresolve[] = {
289
295
    "whatever", "v4", "v6", (char *)NULL
290
296
};
291
297
 
292
 
static CONST char *ftpssl[] = {
 
298
CONST static char *ftpssl[] = {
293
299
    "nope", "try", "control", "all", (char *)NULL
294
300
};
295
301
 
296
 
static CONST char *shareCmd[] = {
 
302
CONST static char *shareCmd[] = {
297
303
    "share", "unshare", "cleanup", (char *)NULL
298
304
};
299
305
 
300
 
static CONST char *lockData[] = {
 
306
CONST static char *lockData[] = {
301
307
    "cookies", "dns", (char *)NULL
302
308
};
303
309
 
304
 
static CONST char *ftpsslauth[] = {
 
310
CONST static char *ftpsslauth[] = {
305
311
    "default", "ssl", "tls", (char *)NULL
306
312
};
307
313
 
308
 
static CONST char *ftpsslccc[] = {
 
314
CONST static char *ftpsslccc[] = {
309
315
    "none", "passive", "active", (char *)NULL
310
316
};
311
317
 
312
 
static CONST char *sslversion[] = {
 
318
CONST static char *sslversion[] = {
313
319
    "default", "tlsv1", "sslv2", "sslv3", (char *)NULL
314
320
};
315
321
 
316
 
static CONST char *ftpfilemethod[] = {
 
322
CONST static char *ftpfilemethod[] = {
317
323
    "default", "multicwd", "nocwd", "singlecwd", (char *)NULL
318
324
};
319
325
 
320
 
static CONST char *sshauthtypes[] = {
 
326
CONST static char *sshauthtypes[] = {
321
327
    "publickey", "password", "host", "keyboard", "any", (char *)NULL
322
328
};
323
329
 
324
 
static curlioerr curlioctl(CURL *handle, curliocmd cmd, void *userp);
 
330
static curlioerr curlseek(void *instream, curl_off_t offset, int origin);
325
331
 
326
332
int Tclcurl_MultiInit (Tcl_Interp *interp);
327
333
 
369
375
 
370
376
void curlFreeSpace(struct curlObjData *curlData);
371
377
 
372
 
void curlErrorSetOpt(Tcl_Interp *interp,CONST char **configTable, int option, CONST char *parPtr);
 
378
void curlErrorSetOpt(Tcl_Interp *interp,CONST char **configTable, int option,CONST char *parPtr);
373
379
 
374
380
size_t curlHeaderReader(void *ptr,size_t size,size_t nmemb,FILE *stream);
375
381