You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.1 KiB

  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: apt-extracttemplates.h,v 1.2 2001/02/27 04:26:03 jgg Exp $
  4. /* ######################################################################
  5. apt-extracttemplate - tool to extract template and config data
  6. ##################################################################### */
  7. /*}}}*/
  8. #ifndef _APTEXTRACTTEMPLATE_H_
  9. #define _APTEXTRACTTEMPLATE_H_
  10. #include <apt-pkg/fileutl.h>
  11. #include <apt-pkg/pkgcache.h>
  12. #include <apt-pkg/dirstream.h>
  13. class DebFile : public pkgDirStream
  14. {
  15. FileFd File;
  16. unsigned long Size;
  17. char *Control;
  18. unsigned long ControlLen;
  19. public:
  20. DebFile(const char *FileName);
  21. ~DebFile();
  22. bool DoItem(Item &I, int &fd);
  23. bool Process(pkgDirStream::Item &I, const unsigned char *data,
  24. unsigned long size, unsigned long pos);
  25. bool Go();
  26. bool ParseInfo();
  27. static string GetInstalledVer(const string &package);
  28. string Package;
  29. string Version;
  30. string DepVer, PreDepVer;
  31. unsigned int DepOp, PreDepOp;
  32. char *Config;
  33. char *Template;
  34. static pkgCache *Cache;
  35. enum { None, IsControl, IsConfig, IsTemplate } Which;
  36. };
  37. #endif