diff options
author | Michael Vogt <mvo@debian.org> | 2014-06-12 08:44:13 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-06-12 08:44:13 +0200 |
commit | 826c5fa7b541e93928791470e5df9342cb7db5ed (patch) | |
tree | 80dbc4356344653e80beeb03e51a6b5eb6e50e01 /ftparchive/sources.h | |
parent | b2cde5777fd9ab41d1b9fe5ce91196c0d3e8227d (diff) | |
parent | acea28d0a3a55c4df1390c42288043002610fbc9 (diff) |
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ubuntu/trusty
Diffstat (limited to 'ftparchive/sources.h')
-rw-r--r-- | ftparchive/sources.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ftparchive/sources.h b/ftparchive/sources.h new file mode 100644 index 000000000..91e0b1376 --- /dev/null +++ b/ftparchive/sources.h @@ -0,0 +1,32 @@ +#ifndef SOURCES_H +#define SOURCES_H + +#include <apt-pkg/tagfile.h> + +class DscExtract +{ + public: + //FIXME: do we really need to enforce a maximum size of the dsc file? + static const int maxSize = 128*1024; + + char *Data; + pkgTagSection Section; + unsigned long Length; + bool IsClearSigned; + + bool TakeDsc(const void *Data, unsigned long Size); + bool Read(std::string FileName); + + DscExtract() : Data(0), Length(0) { + Data = new char[maxSize]; + }; + ~DscExtract() { + if(Data != NULL) { + delete [] Data; + Data = NULL; + } + }; +}; + + +#endif |