aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-03-31 10:02:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-03-31 10:02:23 +0000
commita2314225e02ea2f3bd49dc8557f2452846e49b19 (patch)
tree585917416e7f6d7d7cc4efe849373a716a189a13 /lib/formdata.h
parent1e482fe6a8dbc36a4e9ad19eb8fec98f240b5ed5 (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 'lib/formdata.h')
-rw-r--r--lib/formdata.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/formdata.h b/lib/formdata.h
index 4ca0f3c5c..04f139322 100644
--- a/lib/formdata.h
+++ b/lib/formdata.h
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -27,8 +27,10 @@
enum formtype {
FORM_DATA, /* form metadata (convert to network encoding if necessary) */
FORM_CONTENT, /* form content (never convert) */
- FORM_FILE /* 'line' points to a file name we should read from
- to create the form data (never convert) */
+ FORM_CALLBACK, /* 'line' points to the custom pointer we pass to the callback
+ */
+ FORM_FILE /* 'line' points to a file name we should read from
+ to create the form data (never convert) */
};
/* plain and simple linked list with lines to send */
@@ -44,6 +46,7 @@ struct Form {
size_t sent; /* number of bytes of the current line that has
already been sent in a previous invoke */
FILE *fp; /* file to read from */
+ curl_read_callback fread_func; /* fread callback pointer */
};
/* used by FormAdd for temporary storage */
@@ -62,6 +65,7 @@ typedef struct FormInfo {
char *showfilename; /* The file name to show. If not set, the actual
file name will be used */
bool showfilename_alloc;
+ char *userp; /* pointer for the read callback */
struct curl_slist* contentheader;
struct FormInfo *more;
} FormInfo;