3 * Copyright (c) 2020 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef QRCODETOOL_CMD_MANAGER_H
19 #define QRCODETOOL_CMD_MANAGER_H
21 #include "setup_payload_commands.h"
23 typedef int (*command_func)(int argc, char * const * argv);
25 typedef struct qrcodetool_command_t
27 const char * c_name; /* name of the command. */
28 command_func c_func; /* function to execute the command. */
29 const char * c_usage; /* usage string for command. */
30 const char * c_help; /* help string for (or description of) command. */
31 } qrcodetool_command_t;
33 qrcodetool_command_t commands[] = { { "generate-qr-code", setup_payload_operation_generate_qr_code,
34 " -f File path of payload.\n", "Generate qr code from payload in text file." },
36 { "generate-manual-code", setup_payload_operation_generate_manual_code,
38 " -f File path of payload.\n",
39 "Generate manual code from payload in text file." },