diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-05-08 09:48:51 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-05-08 09:48:51 +0200 |
commit | 864a3375f7bf0b3772f4f2ae212b802f6cab5ff9 (patch) | |
tree | 1df83bd5badeea61a237ecf5c6aac884cd9ae0ee /ftparchive/sources.h | |
parent | 34de054cffeb8e64c09efd452a78271bb85d4831 (diff) | |
parent | c6e9cc582c7093b08c7c057c1f7885eb07e06959 (diff) |
Merge remote-tracking branch 'mvo/bugfix/update-progress-reporting' into debian/experimental
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 |