2011-10-06 11:39:00 -04:00
|
|
|
#ifndef HEADER_CURL_TOOL_WRITEOUT_H
|
|
|
|
#define HEADER_CURL_TOOL_WRITEOUT_H
|
2002-09-03 07:52:59 -04:00
|
|
|
/***************************************************************************
|
2010-02-14 14:40:18 -05:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
2000-10-02 02:30:40 -04:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2021-02-19 08:57:19 -05:00
|
|
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2000-10-02 02:30:40 -04:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 08:02:01 -05:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2010-02-14 14:40:18 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* 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
|
2002-09-03 07:52:59 -04:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
2000-10-02 02:30:40 -04:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
2000-10-02 02:30:40 -04:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
***************************************************************************/
|
2012-04-06 17:35:15 -04:00
|
|
|
#include "tool_setup.h"
|
2020-09-09 11:05:49 -04:00
|
|
|
#include "tool_operate.h"
|
2000-10-02 02:30:40 -04:00
|
|
|
|
2020-02-01 12:55:24 -05:00
|
|
|
typedef enum {
|
|
|
|
VAR_NONE, /* must be the first */
|
|
|
|
VAR_APPCONNECT_TIME,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_CONNECT_TIME,
|
|
|
|
VAR_CONTENT_TYPE,
|
|
|
|
VAR_EFFECTIVE_FILENAME,
|
2020-07-13 03:58:29 -04:00
|
|
|
VAR_EFFECTIVE_METHOD,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_EFFECTIVE_URL,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_ERRORMSG,
|
|
|
|
VAR_EXITCODE,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_FTP_ENTRY_PATH,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_HEADER_SIZE,
|
|
|
|
VAR_HTTP_CODE,
|
|
|
|
VAR_HTTP_CODE_PROXY,
|
|
|
|
VAR_HTTP_VERSION,
|
|
|
|
VAR_INPUT_URL,
|
|
|
|
VAR_JSON,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_LOCAL_IP,
|
|
|
|
VAR_LOCAL_PORT,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_NAMELOOKUP_TIME,
|
|
|
|
VAR_NUM_CONNECTS,
|
|
|
|
VAR_NUM_HEADERS,
|
|
|
|
VAR_ONERROR,
|
|
|
|
VAR_PRETRANSFER_TIME,
|
|
|
|
VAR_PRIMARY_IP,
|
|
|
|
VAR_PRIMARY_PORT,
|
|
|
|
VAR_PROXY_SSL_VERIFY_RESULT,
|
|
|
|
VAR_REDIRECT_COUNT,
|
|
|
|
VAR_REDIRECT_TIME,
|
|
|
|
VAR_REDIRECT_URL,
|
2021-02-19 08:57:19 -05:00
|
|
|
VAR_REFERER,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_REQUEST_SIZE,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_SCHEME,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_SIZE_DOWNLOAD,
|
|
|
|
VAR_SIZE_UPLOAD,
|
|
|
|
VAR_SPEED_DOWNLOAD,
|
|
|
|
VAR_SPEED_UPLOAD,
|
|
|
|
VAR_SSL_VERIFY_RESULT,
|
|
|
|
VAR_STARTTRANSFER_TIME,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_STDERR,
|
2020-12-14 04:09:51 -05:00
|
|
|
VAR_STDOUT,
|
|
|
|
VAR_TOTAL_TIME,
|
|
|
|
VAR_URLNUM,
|
2020-02-01 12:55:24 -05:00
|
|
|
VAR_NUM_OF_VARS /* must be the last */
|
|
|
|
} writeoutid;
|
|
|
|
|
|
|
|
struct writeoutvar {
|
|
|
|
const char *name;
|
|
|
|
writeoutid id;
|
2021-01-28 18:56:50 -05:00
|
|
|
CURLINFO ci;
|
|
|
|
int (*writefunc)(FILE *stream, const struct writeoutvar *wovar,
|
|
|
|
struct per_transfer *per, CURLcode per_result,
|
|
|
|
bool use_json);
|
2020-02-01 12:55:24 -05:00
|
|
|
};
|
|
|
|
|
2021-01-28 18:56:50 -05:00
|
|
|
void ourWriteOut(const char *writeinfo, struct per_transfer *per,
|
|
|
|
CURLcode per_result);
|
2000-10-02 02:30:40 -04:00
|
|
|
|
2011-10-06 11:39:00 -04:00
|
|
|
#endif /* HEADER_CURL_TOOL_WRITEOUT_H */
|