edsp.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. Set of methods to help writing and reading everything needed for EDSP
  5. ##################################################################### */
  6. /*}}}*/
  7. #ifndef PKGLIB_EDSP_H
  8. #define PKGLIB_EDSP_H
  9. #include <apt-pkg/depcache.h>
  10. #include <string>
  11. class EDSP /*{{{*/
  12. {
  13. bool static ReadLine(int const input, std::string &line);
  14. public:
  15. bool static WriteRequest(pkgDepCache &Cache, FILE* output,
  16. bool const Upgrade = false,
  17. bool const DistUpgrade = false,
  18. bool const AutoRemove = false);
  19. bool static WriteScenario(pkgDepCache &Cache, FILE* output);
  20. bool static ReadResponse(FILE* input, pkgDepCache &Cache);
  21. // ReadScenario is provided by the listparser infrastructure
  22. bool static ReadRequest(int const input, std::list<std::string> &install,
  23. std::list<std::string> &remove);
  24. bool static ApplyRequest(std::list<std::string> const &install,
  25. std::list<std::string> const &remove,
  26. pkgDepCache &Cache);
  27. bool static WriteSolution(pkgDepCache &Cache, FILE* output);
  28. bool static WriteError(std::string const &message, FILE* output);
  29. };
  30. /*}}}*/
  31. #endif