edspsystem.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: debsystem.h,v 1.4 2003/01/11 07:16:33 jgg Exp $
  4. /* ######################################################################
  5. System - Debian version of the System Class
  6. ##################################################################### */
  7. /*}}}*/
  8. #ifndef PKGLIB_EDSPSYSTEM_H
  9. #define PKGLIB_EDSPSYSTEM_H
  10. #include <apt-pkg/pkgsystem.h>
  11. #include <apt-pkg/cacheiterators.h>
  12. #include <apt-pkg/pkgcache.h>
  13. #include <memory>
  14. #include <vector>
  15. #include <apt-pkg/macros.h>
  16. class Configuration;
  17. class pkgDepCache;
  18. class pkgIndexFile;
  19. class pkgPackageManager;
  20. class APT_HIDDEN edspLikeSystem : public pkgSystem
  21. {
  22. protected:
  23. std::unique_ptr<pkgIndexFile> StatusFile;
  24. public:
  25. virtual bool Lock() APT_OVERRIDE APT_CONST;
  26. virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE APT_CONST;
  27. virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE APT_CONST;
  28. virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
  29. virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE APT_CONST;
  30. virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
  31. virtual bool FindIndex(pkgCache::PkgFileIterator File,
  32. pkgIndexFile *&Found) const APT_OVERRIDE;
  33. edspLikeSystem(char const * const Label);
  34. virtual ~edspLikeSystem();
  35. };
  36. class APT_HIDDEN edspSystem : public edspLikeSystem
  37. {
  38. std::string tempDir;
  39. std::string tempStatesFile;
  40. std::string tempPrefsFile;
  41. public:
  42. virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
  43. virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
  44. edspSystem();
  45. virtual ~edspSystem();
  46. };
  47. class APT_HIDDEN eippSystem : public edspLikeSystem
  48. {
  49. public:
  50. virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
  51. eippSystem();
  52. virtual ~eippSystem();
  53. };
  54. #endif