private-cmndline.h 1.0 KB

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