private-cmndline.h 1019 B

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