128 KiB DSC files ought to be enough for everyone
[ntk/apt.git] / ftparchive / sources.h
dissimilarity index 70%
index 91e0b13..a125ec6 100644 (file)
@@ -1,32 +1,24 @@
-#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
+#ifndef SOURCES_H
+#define SOURCES_H
+
+#include <apt-pkg/tagfile.h>
+
+#include <string>
+
+class DscExtract
+{
+ public:
+   std::string Data;
+   pkgTagSection Section;
+   unsigned long long Length;
+   bool IsClearSigned;
+
+   bool TakeDsc(const void *Data, unsigned long long Size);
+   bool Read(std::string FileName);
+
+   DscExtract() : Length(0), IsClearSigned(false) {};
+   ~DscExtract() {};
+};
+
+
+#endif