diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:20:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:20:26 +0000 |
commit | 044203039cebe3c05161f8f104a039d4744ca6d0 (patch) | |
tree | 1073c2308492e6aea4c66cb7436ee92db2abfd42 /tools/lint/cmd.h | |
parent | Initial commit. (diff) | |
download | libyang2-044203039cebe3c05161f8f104a039d4744ca6d0.tar.xz libyang2-044203039cebe3c05161f8f104a039d4744ca6d0.zip |
Adding upstream version 2.1.30.upstream/2.1.30
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/lint/cmd.h')
-rw-r--r-- | tools/lint/cmd.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/tools/lint/cmd.h b/tools/lint/cmd.h new file mode 100644 index 0000000..9f6f88d --- /dev/null +++ b/tools/lint/cmd.h @@ -0,0 +1,69 @@ +/** + * @file cmd.h + * @author Michal Vasko <mvasko@cesnet.cz> + * @author Radek Krejci <rkrejci@cesnet.cz> + * @brief libyang's yanglint tool commands header + * + * Copyright (c) 2015-2020 CESNET, z.s.p.o. + * + * This source code is licensed under BSD 3-Clause License (the "License"). + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://opensource.org/licenses/BSD-3-Clause + */ + +#ifndef COMMANDS_H_ +#define COMMANDS_H_ + +#include "libyang.h" + +/** + * @brief command information + */ +typedef struct { + char *name; /* User printable name of the function. */ + + void (*func)(struct ly_ctx **ctx, const char *); /* Function to call to do the command. */ + void (*help_func)(void); /* Display command help. */ + char *helpstring; /* Documentation for this function. */ +} COMMAND; + +/** + * @brief The list of available commands. + */ +extern COMMAND commands[]; + +/* cmd_add.c */ +void cmd_add(struct ly_ctx **ctx, const char *cmdline); +void cmd_add_help(void); + +/* cmd_clear.c */ +void cmd_clear(struct ly_ctx **ctx, const char *cmdline); +void cmd_clear_help(void); + +/* cmd_data.c */ +void cmd_data(struct ly_ctx **ctx, const char *cmdline); +void cmd_data_help(void); + +/* cmd_list.c */ +void cmd_list(struct ly_ctx **ctx, const char *cmdline); +void cmd_list_help(void); + +/* cmd_feature.c */ +void cmd_feature(struct ly_ctx **ctx, const char *cmdline); +void cmd_feature_help(void); + +/* cmd_load.c */ +void cmd_load(struct ly_ctx **ctx, const char *cmdline); +void cmd_load_help(void); + +/* cmd_print.c */ +void cmd_print(struct ly_ctx **ctx, const char *cmdline); +void cmd_print_help(void); + +/* cmd_searchpath.c */ +void cmd_searchpath(struct ly_ctx **ctx, const char *cmdline); +void cmd_searchpath_help(void); + +#endif /* COMMANDS_H_ */ |