new
[libcurl.git] / lib / formdata.h
blob2e283530949ec30f6c418bfe4df0285fa4ba7c46
1 #ifndef __FORMDATA_H
2 #define __FORMDATA_H
4 /*****************************************************************************
5 * _ _ ____ _
6 * Project ___| | | | _ \| |
7 * / __| | | | |_) | |
8 * | (__| |_| | _ <| |___
9 * \___|\___/|_| \_\_____|
11 * The contents of this file are subject to the Mozilla Public License
12 * Version 1.0 (the "License"); you may not use this file except in
13 * compliance with the License. You may obtain a copy of the License at
14 * http://www.mozilla.org/MPL/
16 * Software distributed under the License is distributed on an "AS IS"
17 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 * License for the specific language governing rights and limitations
19 * under the License.
21 * The Original Code is Curl.
23 * The Initial Developer of the Original Code is Daniel Stenberg.
25 * Portions created by the Initial Developer are Copyright (C) 1998.
26 * All Rights Reserved.
28 * Contributor(s):
29 * Rafael Sagula <sagula@inf.ufrgs.br>
30 * Sampo Kellomaki <sampo@iki.fi>
31 * Linas Vepstas <linas@linas.org>
32 * Bjorn Reese <breese@imada.ou.dk>
33 * Johan Anderson <johan@homemail.com>
34 * Kjell Ericson <Kjell.Ericson@haxx.nu>
35 * Troy Engel <tengel@palladium.net>
36 * Ryan Nelson <ryan@inch.com>
37 * Bjorn Stenberg <Bjorn.Stenberg@haxx.nu>
38 * Angus Mackay <amackay@gus.ml.org>
40 * ------------------------------------------------------------
41 * Main author:
42 * - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
44 * http://curl.haxx.nu
46 * $Source: /cvsroot/curl/curl/lib/formdata.h,v $
47 * $Revision: 1.1.1.1 $
48 * $Date: 1999-12-29 14:21:22 $
49 * $Author: bagder $
50 * $State: Exp $
51 * $Locker: $
53 * ------------------------------------------------------------
54 * $Log: formdata.h,v $
55 * Revision 1.1.1.1 1999-12-29 14:21:22 bagder
56 * new
58 * Revision 1.4 1999/09/06 06:59:40 dast
59 * Changed email info
61 * Revision 1.3 1999/08/13 07:34:47 dast
62 * Changed the URL in the header
64 * Revision 1.2 1999/07/30 12:59:47 dast
65 * FormFree() was added to properly cleanup after a form was posted.
67 * Revision 1.1.1.1 1999/03/11 22:23:34 dast
68 * Imported sources
70 ****************************************************************************/
71 /* plain and simple linked list with lines to send */
72 struct FormData {
73 struct FormData *next;
74 char *line;
75 long length;
78 struct Form {
79 struct FormData *data; /* current form line to send */
80 int sent; /* number of bytes of the current line that has already
81 been sent in a previous invoke */
84 int FormParse(char *string,
85 struct HttpPost **httppost,
86 struct HttpPost **last_post);
88 int FormInit(struct Form *form, struct FormData *formdata );
90 struct FormData *getFormData(struct HttpPost *post,
91 int *size);
93 /* fread() emulation */
94 int FormReader(char *buffer,
95 size_t size,
96 size_t nitems,
97 FILE *mydata);
99 char *MakeFormBoundary(void);
101 void FormFree(struct FormData *);
103 #endif