]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexcopy.h
fix crash when P.Arch() was used but the cache got remapped
[apt.git] / apt-pkg / indexcopy.h
index 7778ae595a49d4f07c1a79d151884f728217f202..277fb561c0b3410efa34da2b87b5279a29e8d3d3 100644 (file)
@@ -22,8 +22,11 @@ class FileFd;
 class indexRecords;
 class pkgCdromStatus;
 
 class indexRecords;
 class pkgCdromStatus;
 
-class IndexCopy
+class IndexCopy                                                                /*{{{*/
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    protected:
    
    pkgTagSection *Section;
    protected:
    
    pkgTagSection *Section;
@@ -45,8 +48,8 @@ class IndexCopy
                     pkgCdromStatus *log);
    virtual ~IndexCopy() {};
 };
                     pkgCdromStatus *log);
    virtual ~IndexCopy() {};
 };
-
-class PackageCopy : public IndexCopy
+                                                                       /*}}}*/
+class PackageCopy : public IndexCopy                                   /*{{{*/
 {
    protected:
    
 {
    protected:
    
@@ -55,10 +58,9 @@ class PackageCopy : public IndexCopy
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *Type() {return "Package";};
    
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *Type() {return "Package";};
    
-   public:
 };
 };
-
-class SourceCopy : public IndexCopy
+                                                                       /*}}}*/
+class SourceCopy : public IndexCopy                                    /*{{{*/
 {
    protected:
    
 {
    protected:
    
@@ -67,10 +69,9 @@ class SourceCopy : public IndexCopy
    virtual const char *GetFileName() {return "Sources";};
    virtual const char *Type() {return "Source";};
    
    virtual const char *GetFileName() {return "Sources";};
    virtual const char *Type() {return "Source";};
    
-   public:
 };
 };
-
-class TranslationsCopy
+                                                                       /*}}}*/
+class TranslationsCopy                                                 /*{{{*/
 {
    protected:
    pkgTagSection *Section;
 {
    protected:
    pkgTagSection *Section;
@@ -79,10 +80,12 @@ class TranslationsCopy
    bool CopyTranslations(string CDROM,string Name,vector<string> &List,
                         pkgCdromStatus *log);
 };
    bool CopyTranslations(string CDROM,string Name,vector<string> &List,
                         pkgCdromStatus *log);
 };
-
-
-class SigVerify 
+                                                                       /*}}}*/
+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);
    bool Verify(string prefix,string file, indexRecords *records);
    bool CopyMetaIndex(string CDROM, string CDName, 
                      string prefix, string file);
@@ -90,8 +93,16 @@ class SigVerify
  public:
    bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
                      vector<string> PkgList,vector<string> SrcList);
  public:
    bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
                      vector<string> PkgList,vector<string> SrcList);
-};
-
 
 
+   /** \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);
+   };
+};
+                                                                       /*}}}*/
 
 #endif
 
 #endif