summaryrefslogtreecommitdiff
path: root/ftparchive/sources.h
blob: 91e0b137631479ef486ea8a1621c9f21945efdfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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