diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-03-31 10:02:23 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-03-31 10:02:23 +0000 |
commit | a2314225e02ea2f3bd49dc8557f2452846e49b19 (patch) | |
tree | 585917416e7f6d7d7cc4efe849373a716a189a13 /include | |
parent | 1e482fe6a8dbc36a4e9ad19eb8fec98f240b5ed5 (diff) |
- Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
application to provide data for a multipart with the read callback. Note
that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
stream option is used. This feature is verified by the new test case
554. This feature was sponsored by Xponaut.
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index b4ed5d0f0..bd188cdd1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -211,10 +211,16 @@ struct curl_httppost { do not free in formfree */ #define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ #define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ +#define HTTPPOST_CALLBACK (1<<6) /* upload fiel contents by using the + regular read callback to get the data + and pass the given pointer as custom + pointer */ char *showfilename; /* The file name to show. If not set, the actual file name will be used (if this is a file part) */ + void *userp; /* custom pointer used for + HTTPPOST_CALLBACK posts */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -246,7 +252,7 @@ typedef size_t (*curl_write_callback)(char *buffer, #define CURL_READFUNC_PAUSE 0x10000001 typedef int (*curl_seek_callback)(void *instream, curl_off_t offset, - int origin); /* 'whence' */ + int origin); /* 'whence' */ typedef size_t (*curl_read_callback)(char *buffer, size_t size, @@ -1313,6 +1319,8 @@ typedef enum { CFINIT(END), CFINIT(OBSOLETE2), + CFINIT(STREAM), + CURLFORM_LASTENTRY /* the last unusued */ } CURLformoption; @@ -1796,7 +1804,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); !defined(__cplusplus) #include "typecheck-gcc.h" #else -#if defined(__STDC__) && (__STDC__ >= 1) +#if defined(__STDC__) && (__STDC__ >= 1) /* This preprocessor magic that replaces a call with the exact same call is only done to make sure application authors pass exactly three arguments to these functions. */ |