Go to the documentation of this file.00001 #ifndef HEADER_CURL_FORMDATA_H
00002 #define HEADER_CURL_FORMDATA_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 enum formtype {
00026 FORM_DATAMEM,
00027 FORM_DATA,
00028 FORM_CONTENT,
00029 FORM_CALLBACK,
00030
00031 FORM_FILE
00032
00033 };
00034
00035
00036 struct FormData {
00037 struct FormData *next;
00038 enum formtype type;
00039 char *line;
00040 size_t length;
00041 };
00042
00043 struct Form {
00044 struct FormData *data;
00045 size_t sent;
00046
00047 FILE *fp;
00048 curl_read_callback fread_func;
00049 };
00050
00051
00052 typedef struct FormInfo {
00053 char *name;
00054 bool name_alloc;
00055 size_t namelength;
00056 char *value;
00057 bool value_alloc;
00058 curl_off_t contentslength;
00059 char *contenttype;
00060 bool contenttype_alloc;
00061 long flags;
00062 char *buffer;
00063 size_t bufferlength;
00064 char *showfilename;
00065
00066 bool showfilename_alloc;
00067 char *userp;
00068 struct curl_slist *contentheader;
00069 struct FormInfo *more;
00070 } FormInfo;
00071
00072 int Curl_FormInit(struct Form *form, struct FormData *formdata);
00073
00074 CURLcode Curl_getformdata(struct Curl_easy *data,
00075 struct FormData **,
00076 struct curl_httppost *post,
00077 const char *custom_contenttype,
00078 curl_off_t *size);
00079
00080
00081 size_t Curl_FormReader(char *buffer,
00082 size_t size,
00083 size_t nitems,
00084 FILE *mydata);
00085
00086
00087
00088
00089
00090
00091 char *Curl_formpostheader(void *formp, size_t *len);
00092
00093 char *Curl_FormBoundary(void);
00094
00095 void Curl_formclean(struct FormData **);
00096
00097 CURLcode Curl_formconvert(struct Curl_easy *, struct FormData *);
00098
00099 #endif