debsystem.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_DEBSYSTEM_H
  9. #define PKGLIB_DEBSYSTEM_H
  10. #include <apt-pkg/pkgsystem.h>
  11. #include <apt-pkg/pkgcache.h>
  12. #include <apt-pkg/cacheiterators.h>
  13. #include <vector>
  14. class Configuration;
  15. class pkgIndexFile;
  16. class pkgPackageManager;
  17. class debSystemPrivate;
  18. class pkgDepCache;
  19. #ifndef APT_10_CLEANER_HEADERS
  20. class debStatusIndex;
  21. #endif
  22. class debSystem : public pkgSystem
  23. {
  24. // private d-pointer
  25. debSystemPrivate * const d;
  26. APT_HIDDEN bool CheckUpdates();
  27. public:
  28. virtual bool Lock() APT_OVERRIDE;
  29. virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
  30. virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
  31. virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
  32. virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
  33. virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
  34. virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
  35. virtual bool FindIndex(pkgCache::PkgFileIterator File,
  36. pkgIndexFile *&Found) const APT_OVERRIDE;
  37. debSystem();
  38. virtual ~debSystem();
  39. APT_HIDDEN static std::string GetDpkgExecutable();
  40. APT_HIDDEN static std::vector<std::string> GetDpkgBaseCommand();
  41. APT_HIDDEN static void DpkgChrootDirectory();
  42. APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
  43. APT_HIDDEN static bool SupportsMultiArch();
  44. APT_HIDDEN static std::vector<std::string> SupportedArchitectures();
  45. };
  46. extern debSystem debSys;
  47. #endif