apt  0.9.11.2
gpgv.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 /* ######################################################################
4 
5  Helpers to deal with gpgv better and more easily
6 
7  ##################################################################### */
8  /*}}}*/
9 #ifndef CONTRIB_GPGV_H
10 #define CONTRIB_GPGV_H
11 
12 #include <string>
13 #include <vector>
14 
15 #include <apt-pkg/fileutl.h>
16 
17 #if __GNUC__ >= 4
18  #define APT_noreturn __attribute__ ((noreturn))
19 #else
20  #define APT_noreturn /* no support */
21 #endif
22 
42 void ExecGPGV(std::string const &File, std::string const &FileSig,
43  int const &statusfd, int fd[2]) APT_noreturn;
44 inline void ExecGPGV(std::string const &File, std::string const &FileSig,
45  int const &statusfd = -1) {
46  int fd[2];
47  ExecGPGV(File, FileSig, statusfd, fd);
48 };
49 
50 #undef APT_noreturn
51 
75 bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
76  std::vector<std::string> * const ContentHeader, FileFd * const SignatureFile);
77 
89 bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &MessageFile);
90 
91 #endif