diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
commit | 636c7dc17286d93d788c741d15fd756aeda066d5 (patch) | |
tree | e7ae158cc54f591041a061b9865bcae51854f15c /apt-private/private-cmndline.h | |
parent | Initial commit. (diff) | |
download | apt-a2079028732f30f4b85b1e599887c566466d695d.tar.xz apt-a2079028732f30f4b85b1e599887c566466d695d.zip |
Adding upstream version 1.8.2.3.upstream/1.8.2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'apt-private/private-cmndline.h')
-rw-r--r-- | apt-private/private-cmndline.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/apt-private/private-cmndline.h b/apt-private/private-cmndline.h new file mode 100644 index 0000000..37fe2c9 --- /dev/null +++ b/apt-private/private-cmndline.h @@ -0,0 +1,41 @@ +#ifndef APT_PRIVATE_CMNDLINE_H +#define APT_PRIVATE_CMNDLINE_H + +#include <apt-pkg/cmndline.h> +#include <apt-pkg/macros.h> + +#include <vector> + +class Configuration; +class pkgSystem; + +enum class APT_CMD { + APT, + APT_GET, + APT_CACHE, + APT_CDROM, + APT_CONFIG, + APT_EXTRACTTEMPLATES, + APT_FTPARCHIVE, + APT_HELPER, + APT_INTERNAL_SOLVER, + APT_MARK, + APT_SORTPKG, + APT_DUMP_SOLVER, + APT_INTERNAL_PLANNER, +}; +struct aptDispatchWithHelp +{ + const char *Match; + bool (*Handler)(CommandLine &); + const char *Help; +}; + +APT_PUBLIC std::vector<CommandLine::Dispatch> ParseCommandLine(CommandLine &CmdL, APT_CMD const Binary, + Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char * argv[], + bool (*ShowHelp)(CommandLine &), std::vector<aptDispatchWithHelp> (*GetCommands)(void)); +APT_PUBLIC unsigned short DispatchCommandLine(CommandLine &CmdL, std::vector<CommandLine::Dispatch> const &Cmds); + +APT_PUBLIC std::vector<CommandLine::Args> getCommandArgs(APT_CMD const Program, char const * const Cmd); + +#endif |