From 29099cb6855af2e465d26e888160e4f97bda4f0b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 31 Mar 2011 14:56:10 +0200 Subject: add the methods we will need to write to make working with EDSP possible --- apt-pkg/edsp/edspwriter.cc | 12 +++++++++++- apt-pkg/edsp/edspwriter.h | 14 +++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'apt-pkg/edsp') diff --git a/apt-pkg/edsp/edspwriter.cc b/apt-pkg/edsp/edspwriter.cc index 5c741c45d..2f6bde5a1 100644 --- a/apt-pkg/edsp/edspwriter.cc +++ b/apt-pkg/edsp/edspwriter.cc @@ -17,7 +17,7 @@ #include /*}}}*/ -// edspWriter::WriteUniverse - to the given file descriptor /*{{{*/ +// edspWriter::WriteScenario - to the given file descriptor /*{{{*/ bool edspWriter::WriteScenario(pkgDepCache &Cache, FILE* output) { // we could use pkgCache::DepType and ::Priority, but these would be lokalized stringsā€¦ @@ -128,6 +128,15 @@ bool edspWriter::WriteRequest(pkgDepCache &Cache, FILE* output) return true; } /*}}}*/ +bool edspWriter::ReadResponse(FILE* input, pkgDepCache &Cache) { return false; } + +bool edspWriter::ReadRequest(FILE* input, std::list &install, + std::list &remove) +{ return false; } +bool edspWriter::ApplyRequest(std::list const &install, + std::list const &remove, + pkgDepCache &Cache) +{ return false; } // edspWriter::WriteSolution - to the given file descriptor /*{{{*/ bool edspWriter::WriteSolution(pkgDepCache &Cache, FILE* output) { @@ -148,3 +157,4 @@ bool edspWriter::WriteSolution(pkgDepCache &Cache, FILE* output) return true; } /*}}}*/ +bool edspWriter::WriteError(std::string const &message, FILE* output) { return false; } diff --git a/apt-pkg/edsp/edspwriter.h b/apt-pkg/edsp/edspwriter.h index 2b417956e..c5eed788f 100644 --- a/apt-pkg/edsp/edspwriter.h +++ b/apt-pkg/edsp/edspwriter.h @@ -9,12 +9,24 @@ #include +#include + class edspWriter /*{{{*/ { public: - bool static WriteScenario(pkgDepCache &Cache, FILE* output); 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 &install, + std::list &remove); + bool static ApplyRequest(std::list const &install, + std::list const &remove, + pkgDepCache &Cache); bool static WriteSolution(pkgDepCache &Cache, FILE* output); + bool static WriteError(std::string const &message, FILE* output); + }; /*}}}*/ #endif -- cgit v1.2.3