X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1b5a62221cc034658354692be6ba4dfb7ef152e7..5efbd59693fbdb87496bb4aa78d7957c1ebea7d4:/apt-pkg/indexcopy.h?ds=inline diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index fa8e9c156..277fb561c 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -22,8 +22,11 @@ class FileFd; class indexRecords; class pkgCdromStatus; -class IndexCopy +class IndexCopy /*{{{*/ { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + protected: pkgTagSection *Section; @@ -43,9 +46,10 @@ class IndexCopy bool CopyPackages(string CDROM,string Name,vector &List, pkgCdromStatus *log); + virtual ~IndexCopy() {}; }; - -class PackageCopy : public IndexCopy + /*}}}*/ +class PackageCopy : public IndexCopy /*{{{*/ { protected: @@ -54,10 +58,9 @@ class PackageCopy : public IndexCopy virtual const char *GetFileName() {return "Packages";}; virtual const char *Type() {return "Package";}; - public: }; - -class SourceCopy : public IndexCopy + /*}}}*/ +class SourceCopy : public IndexCopy /*{{{*/ { protected: @@ -66,11 +69,23 @@ class SourceCopy : public IndexCopy virtual const char *GetFileName() {return "Sources";}; virtual const char *Type() {return "Source";}; - public: }; + /*}}}*/ +class TranslationsCopy /*{{{*/ +{ + protected: + pkgTagSection *Section; -class SigVerify + public: + bool CopyTranslations(string CDROM,string Name,vector &List, + pkgCdromStatus *log); +}; + /*}}}*/ +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); @@ -78,6 +93,16 @@ class SigVerify public: bool CopyAndVerify(string CDROM,string Name,vector &SigList, vector PkgList,vector 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