cmake/Utilities/cmcurl/lib/formdata.h

60 lines
2.0 KiB
C
Raw Normal View History

2015-04-27 22:25:09 +02:00
#ifndef HEADER_CURL_FORMDATA_H
#define HEADER_CURL_FORMDATA_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
2023-07-02 19:51:09 +02:00
* Copyright (C) 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
2021-09-14 00:13:48 +02:00
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
2022-11-16 20:14:03 +01:00
* SPDX-License-Identifier: curl
*
***************************************************************************/
2019-11-11 23:01:05 +01:00
#include "curl_setup.h"
2023-12-07 09:12:54 +01:00
#ifndef CURL_DISABLE_FORM_API
2019-11-11 23:01:05 +01:00
/* used by FormAdd for temporary storage */
2020-08-30 11:54:41 +02:00
struct FormInfo {
char *name;
size_t namelength;
char *value;
2016-09-11 17:22:32 +02:00
curl_off_t contentslength;
char *contenttype;
long flags;
char *buffer; /* pointer to existing buffer used for file upload */
size_t bufferlength;
char *showfilename; /* The file name to show. If not set, the actual
file name will be used */
2015-04-27 22:25:09 +02:00
char *userp; /* pointer for the read callback */
2017-07-20 19:35:53 +02:00
struct curl_slist *contentheader;
struct FormInfo *more;
2021-09-14 00:13:48 +02:00
bool name_alloc;
bool value_alloc;
bool contenttype_alloc;
bool showfilename_alloc;
2020-08-30 11:54:41 +02:00
};
2016-09-11 17:22:32 +02:00
CURLcode Curl_getformdata(struct Curl_easy *data,
2018-01-26 17:06:56 +01:00
curl_mimepart *,
2015-04-27 22:25:09 +02:00
struct curl_httppost *post,
2018-01-26 17:06:56 +01:00
curl_read_callback fread_func);
2023-12-07 09:12:54 +01:00
#endif /* CURL_DISABLE_FORM_API */
2019-11-11 23:01:05 +01:00
2015-04-27 22:25:09 +02:00
#endif /* HEADER_CURL_FORMDATA_H */