4 /***************************************************************************
6 * Project ___| | | | _ \| |
8 * | (__| |_| | _ <| |___
9 * \___|\___/|_| \_\_____|
11 * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
13 * This software is licensed as described in the file COPYING, which
14 * you should have received as part of this distribution. The terms
15 * are also available at http://curl.haxx.se/docs/copyright.html.
17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18 * copies of the Software, and permit persons to whom the Software is
19 * furnished to do so, under the terms of the COPYING file.
21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22 * KIND, either express or implied.
24 * $Id: formdata.h,v 1.19 2004/03/12 14:22:16 bagder Exp $
25 ***************************************************************************/
26 /* plain and simple linked list with lines to send */
28 struct FormData *next;
34 struct FormData *data; /* current form line to send */
35 unsigned int sent; /* number of bytes of the current line that has already
36 been sent in a previous invoke */
39 /* used by FormAdd for temporary storage */
40 typedef struct FormInfo {
44 size_t contentslength;
47 char *buffer; /* pointer to existing buffer used for file upload */
49 char *showfilename; /* The file name to show. If not set, the actual
50 file name will be used */
51 struct curl_slist* contentheader;
52 struct FormInfo *more;
55 int Curl_FormInit(struct Form *form, struct FormData *formdata );
58 Curl_getFormData(struct FormData **,
59 struct curl_httppost *post,
62 /* fread() emulation */
63 size_t Curl_FormReader(char *buffer,
68 /* possible (old) fread() emulation that copies at most one line */
69 size_t Curl_FormReadOneLine(char *buffer,
74 char *Curl_FormBoundary(void);
76 void Curl_formclean(struct FormData *);