private-cmndline.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. APT_DUMP_SOLVER,
  21. };
  22. struct aptDispatchWithHelp
  23. {
  24. const char *Match;
  25. bool (*Handler)(CommandLine &);
  26. const char *Help;
  27. };
  28. APT_PUBLIC std::vector<CommandLine::Dispatch> ParseCommandLine(CommandLine &CmdL, APT_CMD const Binary,
  29. Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char * argv[],
  30. bool (*ShowHelp)(CommandLine &), std::vector<aptDispatchWithHelp> (*GetCommands)(void));
  31. APT_PUBLIC unsigned short DispatchCommandLine(CommandLine &CmdL, std::vector<CommandLine::Dispatch> const &Cmds);
  32. APT_PUBLIC std::vector<CommandLine::Args> getCommandArgs(APT_CMD const Program, char const * const Cmd);
  33. #endif