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.
 
 
 
 
 
 

62 lines
1.9 KiB

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