xref: /aosp_15_r20/external/curl/src/tool_help.h (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker #ifndef HEADER_CURL_TOOL_HELP_H
2*6236dae4SAndroid Build Coastguard Worker #define HEADER_CURL_TOOL_HELP_H
3*6236dae4SAndroid Build Coastguard Worker /***************************************************************************
4*6236dae4SAndroid Build Coastguard Worker  *                                  _   _ ____  _
5*6236dae4SAndroid Build Coastguard Worker  *  Project                     ___| | | |  _ \| |
6*6236dae4SAndroid Build Coastguard Worker  *                             / __| | | | |_) | |
7*6236dae4SAndroid Build Coastguard Worker  *                            | (__| |_| |  _ <| |___
8*6236dae4SAndroid Build Coastguard Worker  *                             \___|\___/|_| \_\_____|
9*6236dae4SAndroid Build Coastguard Worker  *
10*6236dae4SAndroid Build Coastguard Worker  * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
11*6236dae4SAndroid Build Coastguard Worker  *
12*6236dae4SAndroid Build Coastguard Worker  * This software is licensed as described in the file COPYING, which
13*6236dae4SAndroid Build Coastguard Worker  * you should have received as part of this distribution. The terms
14*6236dae4SAndroid Build Coastguard Worker  * are also available at https://curl.se/docs/copyright.html.
15*6236dae4SAndroid Build Coastguard Worker  *
16*6236dae4SAndroid Build Coastguard Worker  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17*6236dae4SAndroid Build Coastguard Worker  * copies of the Software, and permit persons to whom the Software is
18*6236dae4SAndroid Build Coastguard Worker  * furnished to do so, under the terms of the COPYING file.
19*6236dae4SAndroid Build Coastguard Worker  *
20*6236dae4SAndroid Build Coastguard Worker  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21*6236dae4SAndroid Build Coastguard Worker  * KIND, either express or implied.
22*6236dae4SAndroid Build Coastguard Worker  *
23*6236dae4SAndroid Build Coastguard Worker  * SPDX-License-Identifier: curl
24*6236dae4SAndroid Build Coastguard Worker  *
25*6236dae4SAndroid Build Coastguard Worker  ***************************************************************************/
26*6236dae4SAndroid Build Coastguard Worker #include "tool_setup.h"
27*6236dae4SAndroid Build Coastguard Worker 
28*6236dae4SAndroid Build Coastguard Worker void tool_help(char *category);
29*6236dae4SAndroid Build Coastguard Worker void tool_list_engines(void);
30*6236dae4SAndroid Build Coastguard Worker void tool_version_info(void);
31*6236dae4SAndroid Build Coastguard Worker struct scan_ctx {
32*6236dae4SAndroid Build Coastguard Worker   const char *trigger;
33*6236dae4SAndroid Build Coastguard Worker   size_t tlen;
34*6236dae4SAndroid Build Coastguard Worker   const char *arg;
35*6236dae4SAndroid Build Coastguard Worker   size_t flen;
36*6236dae4SAndroid Build Coastguard Worker   const char *endarg;
37*6236dae4SAndroid Build Coastguard Worker   size_t elen;
38*6236dae4SAndroid Build Coastguard Worker   size_t olen;
39*6236dae4SAndroid Build Coastguard Worker   char rbuf[40];
40*6236dae4SAndroid Build Coastguard Worker   char obuf[160];
41*6236dae4SAndroid Build Coastguard Worker   unsigned char show; /* start as at 0.
42*6236dae4SAndroid Build Coastguard Worker                          trigger match moves it to 1
43*6236dae4SAndroid Build Coastguard Worker                          arg match moves it to 2
44*6236dae4SAndroid Build Coastguard Worker                          endarg stops the search */
45*6236dae4SAndroid Build Coastguard Worker };
46*6236dae4SAndroid Build Coastguard Worker void inithelpscan(struct scan_ctx *ctx, const char *trigger,
47*6236dae4SAndroid Build Coastguard Worker                   const char *arg, const char *endarg);
48*6236dae4SAndroid Build Coastguard Worker bool helpscan(unsigned char *buf, size_t len, struct scan_ctx *ctx);
49*6236dae4SAndroid Build Coastguard Worker 
50*6236dae4SAndroid Build Coastguard Worker struct helptxt {
51*6236dae4SAndroid Build Coastguard Worker   const char *opt;
52*6236dae4SAndroid Build Coastguard Worker   const char *desc;
53*6236dae4SAndroid Build Coastguard Worker   unsigned int categories;
54*6236dae4SAndroid Build Coastguard Worker };
55*6236dae4SAndroid Build Coastguard Worker 
56*6236dae4SAndroid Build Coastguard Worker /*
57*6236dae4SAndroid Build Coastguard Worker  * The bitmask output is generated with the following command
58*6236dae4SAndroid Build Coastguard Worker  ------------------------------------------------------------
59*6236dae4SAndroid Build Coastguard Worker   make -C docs/cmdline-opts listcats
60*6236dae4SAndroid Build Coastguard Worker  */
61*6236dae4SAndroid Build Coastguard Worker 
62*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_AUTH       (1u << 0u)
63*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_CONNECTION (1u << 1u)
64*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_CURL       (1u << 2u)
65*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_DEPRECATED (1u << 3u)
66*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_DNS        (1u << 4u)
67*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_FILE       (1u << 5u)
68*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_FTP        (1u << 6u)
69*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_GLOBAL     (1u << 7u)
70*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_HTTP       (1u << 8u)
71*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_IMAP       (1u << 9u)
72*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_IMPORTANT  (1u << 10u)
73*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_LDAP       (1u << 11u)
74*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_OUTPUT     (1u << 12u)
75*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_POP3       (1u << 13u)
76*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_POST       (1u << 14u)
77*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_PROXY      (1u << 15u)
78*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_SCP        (1u << 16u)
79*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_SFTP       (1u << 17u)
80*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_SMTP       (1u << 18u)
81*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_SSH        (1u << 19u)
82*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_TELNET     (1u << 20u)
83*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_TFTP       (1u << 21u)
84*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_TIMEOUT    (1u << 22u)
85*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_TLS        (1u << 23u)
86*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_UPLOAD     (1u << 24u)
87*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_VERBOSE    (1u << 25u)
88*6236dae4SAndroid Build Coastguard Worker 
89*6236dae4SAndroid Build Coastguard Worker #define CURLHELP_ALL        (0xfffffffu)
90*6236dae4SAndroid Build Coastguard Worker 
91*6236dae4SAndroid Build Coastguard Worker extern const struct helptxt helptext[];
92*6236dae4SAndroid Build Coastguard Worker 
93*6236dae4SAndroid Build Coastguard Worker #endif /* HEADER_CURL_TOOL_HELP_H */
94