debfile.h 916 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _debfile_H
  2. #define _debfile_H
  3. #include <apt-pkg/fileutl.h>
  4. #include <apt-pkg/pkgcache.h>
  5. #include <apt-pkg/dirstream.h>
  6. class DebFile : public pkgDirStream
  7. {
  8. const char *ParseDepends(const char *Start,const char *Stop,
  9. char *&Package, char *&Ver,
  10. unsigned int &Op);
  11. char *CopyString(const char *start, unsigned int len);
  12. FileFd File;
  13. unsigned long Size;
  14. char *Control;
  15. unsigned long ControlLen;
  16. public:
  17. DebFile(const char *FileName);
  18. ~DebFile();
  19. bool DoItem(Item &I, int &fd);
  20. bool Process(pkgDirStream::Item &I, const unsigned char *data,
  21. unsigned long size, unsigned long pos);
  22. bool Go();
  23. bool ParseInfo();
  24. static char *GetInstalledVer(const char *package);
  25. char *Package;
  26. char *Version;
  27. char *DepVer, *PreDepVer;
  28. unsigned int DepOp, PreDepOp;
  29. char *Config;
  30. char *Template;
  31. static pkgCache *Cache;
  32. enum { None, IsControl, IsConfig, IsTemplate } Which;
  33. };
  34. #endif