]> git.saurik.com Git - apt.git/commitdiff
add the methods we will need to write to make working with EDSP possible
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 31 Mar 2011 12:56:10 +0000 (14:56 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 31 Mar 2011 12:56:10 +0000 (14:56 +0200)
apt-pkg/edsp/edspwriter.cc
apt-pkg/edsp/edspwriter.h

index 5c741c45d59a0b4a2c847948e9296a7a7fee23e1..2f6bde5a1b3f99f12b46640fb7f7529a8330b262 100644 (file)
@@ -17,7 +17,7 @@
 #include <stdio.h>
                                                                        /*}}}*/
 
 #include <stdio.h>
                                                                        /*}}}*/
 
-// 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ā€¦
 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;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
+bool edspWriter::ReadResponse(FILE* input, pkgDepCache &Cache) { return false; }
+
+bool edspWriter::ReadRequest(FILE* input, std::list<std::string> &install,
+                       std::list<std::string> &remove)
+{ return false; }
+bool edspWriter::ApplyRequest(std::list<std::string> const &install,
+                        std::list<std::string> const &remove,
+                        pkgDepCache &Cache)
+{ return false; }
 // edspWriter::WriteSolution - to the given file descriptor            /*{{{*/
 bool edspWriter::WriteSolution(pkgDepCache &Cache, FILE* output)
 {
 // 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;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
+bool edspWriter::WriteError(std::string const &message, FILE* output) { return false; }
index 2b417956ed460c398c2034b1593c13d46bddb6fc..c5eed788fe0ac6aaa77a944af17da8885681922b 100644 (file)
@@ -9,12 +9,24 @@
 
 #include <apt-pkg/depcache.h>
 
 
 #include <apt-pkg/depcache.h>
 
+#include <string>
+
 class edspWriter                                                               /*{{{*/
 {
 public:
 class edspWriter                                                               /*{{{*/
 {
 public:
-       bool static WriteScenario(pkgDepCache &Cache, FILE* output);
        bool static WriteRequest(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<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 WriteSolution(pkgDepCache &Cache, FILE* output);
+       bool static WriteError(std::string const &message, FILE* output);
+
 };
                                                                        /*}}}*/
 #endif
 };
                                                                        /*}}}*/
 #endif