]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexcopy.h
enable APT in unpack/configure ordering to handle loops as well
[apt.git] / apt-pkg / indexcopy.h
index 9e5ad4e43f1cf7243361a433fc19dea819b804d2..60c90dd4a2d9fdc1eb1de72f0476fbd517e93ad0 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;
@@ -34,7 +37,7 @@ class IndexCopy                                                               /*{{{*/
    bool ReconstructChop(unsigned long &Chop,string Dir,string File);
    void ConvertToSourceList(string CD,string &Path);
    bool GrabFirst(string Path,string &To,unsigned int Depth);
-   virtual bool GetFile(string &Filename,unsigned long &Size) = 0;
+   virtual bool GetFile(string &Filename,unsigned long long &Size) = 0;
    virtual bool RewriteEntry(FILE *Target,string File) = 0;
    virtual const char *GetFileName() = 0;
    virtual const char *Type() = 0;
@@ -50,24 +53,22 @@ class PackageCopy : public IndexCopy                                        /*{{{*/
 {
    protected:
    
-   virtual bool GetFile(string &Filename,unsigned long &Size);
+   virtual bool GetFile(string &Filename,unsigned long long &Size);
    virtual bool RewriteEntry(FILE *Target,string File);
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *Type() {return "Package";};
    
-   public:
 };
                                                                        /*}}}*/
 class SourceCopy : public IndexCopy                                    /*{{{*/
 {
    protected:
    
-   virtual bool GetFile(string &Filename,unsigned long &Size);
+   virtual bool GetFile(string &Filename,unsigned long long &Size);
    virtual bool RewriteEntry(FILE *Target,string File);
    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);
@@ -89,6 +93,15 @@ class SigVerify                                                              /*{{{*/
  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);
+   };
 };
                                                                        /*}}}*/