sources.h 590 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef SOURCES_H
  2. #define SOURCES_H
  3. #include <apt-pkg/tagfile.h>
  4. class DscExtract
  5. {
  6. public:
  7. //FIXME: do we really need to enforce a maximum size of the dsc file?
  8. static const int maxSize = 128*1024;
  9. char *Data;
  10. pkgTagSection Section;
  11. unsigned long Length;
  12. bool IsClearSigned;
  13. bool TakeDsc(const void *Data, unsigned long Size);
  14. bool Read(std::string FileName);
  15. DscExtract() : Data(0), Length(0) {
  16. Data = new char[maxSize];
  17. };
  18. ~DscExtract() {
  19. if(Data != NULL) {
  20. delete [] Data;
  21. Data = NULL;
  22. }
  23. };
  24. };
  25. #endif