edsp.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. public:
  14. bool static WriteRequest(pkgDepCache &Cache, FILE* output);
  15. bool static WriteScenario(pkgDepCache &Cache, FILE* output);
  16. bool static ReadResponse(FILE* input, pkgDepCache &Cache);
  17. // ReadScenario is provided by the listparser infrastructure
  18. bool static ReadRequest(FILE* input, std::list<std::string> &install,
  19. std::list<std::string> &remove);
  20. bool static ApplyRequest(std::list<std::string> const &install,
  21. std::list<std::string> const &remove,
  22. pkgDepCache &Cache);
  23. bool static WriteSolution(pkgDepCache &Cache, FILE* output);
  24. bool static WriteError(std::string const &message, FILE* output);
  25. };
  26. /*}}}*/
  27. #endif