]> git.saurik.com Git - apt.git/blob - apt-private/private-cmndline.h
FildFd: Introduce a Flush() function and call it from Close()
[apt.git] / apt-private / private-cmndline.h
1 #ifndef APT_PRIVATE_CMNDLINE_H
2 #define APT_PRIVATE_CMNDLINE_H
3
4 #include <apt-pkg/cmndline.h>
5 #include <apt-pkg/macros.h>
6
7 #include <vector>
8
9 class Configuration;
10 class pkgSystem;
11
12 enum class APT_CMD {
13 APT,
14 APT_GET,
15 APT_CACHE,
16 APT_CDROM,
17 APT_CONFIG,
18 APT_EXTRACTTEMPLATES,
19 APT_FTPARCHIVE,
20 APT_HELPER,
21 APT_INTERNAL_SOLVER,
22 APT_MARK,
23 APT_SORTPKG,
24 };
25 struct aptDispatchWithHelp
26 {
27 const char *Match;
28 bool (*Handler)(CommandLine &);
29 const char *Help;
30 };
31
32 APT_PUBLIC std::vector<CommandLine::Dispatch> ParseCommandLine(CommandLine &CmdL, APT_CMD const Binary,
33 Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char * argv[],
34 bool (*ShowHelp)(CommandLine &), std::vector<aptDispatchWithHelp> (*GetCommands)(void));
35 APT_PUBLIC unsigned short DispatchCommandLine(CommandLine &CmdL, std::vector<CommandLine::Dispatch> const &Cmds);
36
37 APT_PUBLIC std::vector<CommandLine::Args> getCommandArgs(APT_CMD const Program, char const * const Cmd);
38
39 #endif