summaryrefslogtreecommitdiff
path: root/ftparchive/sources.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-07 18:10:01 +0200
committerMichael Vogt <mvo@debian.org>2014-05-07 18:10:01 +0200
commit41a658f873a36e2f8507a84fb40f0632e2a62b15 (patch)
tree1acf5649b42fe6142a2b436ef6a89429659f05e6 /ftparchive/sources.h
parent48127e85281e3e75d9aa60abca97f7c5c2c92fad (diff)
parentcf6bbca0a93b21ab7d3378f26dd9b57951a1d987 (diff)
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into debian/sid
Diffstat (limited to 'ftparchive/sources.h')
-rw-r--r--ftparchive/sources.h32
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