merge lp:~mvo/apt/abi-break
[ntk/apt.git] / apt-pkg / indexcopy.h
index ee6557a..277fb56 100644 (file)
@@ -24,6 +24,9 @@ class pkgCdromStatus;
 
 class IndexCopy                                                                /*{{{*/
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    protected:
    
    pkgTagSection *Section;
@@ -55,7 +58,6 @@ class PackageCopy : public IndexCopy                                  /*{{{*/
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *Type() {return "Package";};
    
-   public:
 };
                                                                        /*}}}*/
 class SourceCopy : public IndexCopy                                    /*{{{*/
@@ -67,7 +69,6 @@ class SourceCopy : public IndexCopy                                   /*{{{*/
    virtual const char *GetFileName() {return "Sources";};
    virtual const char *Type() {return "Source";};
    
-   public:
 };
                                                                        /*}}}*/
 class TranslationsCopy                                                 /*{{{*/
@@ -82,6 +83,9 @@ class TranslationsCopy                                                        /*{{{*/
                                                                        /*}}}*/
 class SigVerify                                                                /*{{{*/
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    bool Verify(string prefix,string file, indexRecords *records);
    bool CopyMetaIndex(string CDROM, string CDName, 
                      string prefix, string file);
@@ -90,8 +94,14 @@ class SigVerify                                                              /*{{{*/
    bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
                      vector<string> PkgList,vector<string> SrcList);
 
-   /** \brief generates the command to verify a file with gpgv */
-   static std::vector<const char *> GetGPGVCommandLine();
+   /** \brief generates and run the command to verify a file with gpgv */
+   static bool RunGPGV(std::string const &File, std::string const &FileOut,
+                      int const &statusfd, int fd[2]);
+   inline static bool RunGPGV(std::string const &File, std::string const &FileOut,
+                             int const &statusfd = -1) {
+      int fd[2];
+      return RunGPGV(File, FileOut, statusfd, fd);
+   };
 };
                                                                        /*}}}*/