diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-31 15:10:13 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-31 15:10:13 +0200 |
commit | c3b851268e6e900be2bf0bd715435db9010fd591 (patch) | |
tree | 029c45c6faffa0de55923fda83f943be3b8f16c6 /apt-pkg/edsp.h | |
parent | 29099cb6855af2e465d26e888160e4f97bda4f0b (diff) |
rename edspwriter to straight edsp in toplevel as it does more than
just writing stuff… it also reads and can work for both:
- APT talking to an external solver
- an external solver (understanding EDSP) talking to APT
Diffstat (limited to 'apt-pkg/edsp.h')
-rw-r--r-- | apt-pkg/edsp.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h new file mode 100644 index 000000000..ef137b8f6 --- /dev/null +++ b/apt-pkg/edsp.h @@ -0,0 +1,32 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +/* ###################################################################### + Set of methods to help writing and reading everything needed for EDSP + ##################################################################### */ + /*}}}*/ +#ifndef PKGLIB_EDSP_H +#define PKGLIB_EDSP_H + +#include <apt-pkg/depcache.h> + +#include <string> + +class EDSP /*{{{*/ +{ +public: + bool static WriteRequest(pkgDepCache &Cache, FILE* output); + bool static WriteScenario(pkgDepCache &Cache, FILE* output); + bool static ReadResponse(FILE* input, pkgDepCache &Cache); + + // ReadScenario is provided by the listparser infrastructure + bool static ReadRequest(FILE* input, std::list<std::string> &install, + std::list<std::string> &remove); + bool static ApplyRequest(std::list<std::string> const &install, + std::list<std::string> const &remove, + pkgDepCache &Cache); + bool static WriteSolution(pkgDepCache &Cache, FILE* output); + bool static WriteError(std::string const &message, FILE* output); + +}; + /*}}}*/ +#endif |