apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

debsystem.h
Go to the documentation of this file.
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 /* ######################################################################
4 
5  System - Debian version of the System Class
6 
7  ##################################################################### */
8  /*}}}*/
9 #ifndef PKGLIB_DEBSYSTEM_H
10 #define PKGLIB_DEBSYSTEM_H
11 
12 #include <apt-pkg/pkgcache.h>
13 #include <apt-pkg/pkgsystem.h>
14 
15 #include <vector>
16 class Configuration;
17 class pkgIndexFile;
18 class pkgPackageManager;
19 class debSystemPrivate;
20 class pkgDepCache;
21 
22 
23 class debSystem : public pkgSystem
24 {
25  // private d-pointer
27  APT_HIDDEN bool CheckUpdates();
28 
29  public:
30  virtual bool Lock(OpProgress *const Progress) APT_OVERRIDE;
31  virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
32  virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
33  virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
34  virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
35  virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
36  virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
37  virtual bool FindIndex(pkgCache::PkgFileIterator File,
38  pkgIndexFile *&Found) const APT_OVERRIDE;
39 
40  debSystem();
41  virtual ~debSystem();
42 
43  APT_HIDDEN static std::string GetDpkgExecutable();
44  APT_HIDDEN static std::vector<std::string> GetDpkgBaseCommand();
45  APT_HIDDEN static void DpkgChrootDirectory();
46  APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
47  bool MultiArchSupported() const override;
48  static bool AssertFeature(std::string const &Feature);
49  std::vector<std::string> ArchitecturesSupported() const override;
50 
51  bool LockInner(OpProgress *const Progress, int timeoutSec) override;
52  bool UnLockInner(bool NoErrors=false) override;
53  bool IsLocked() override;
54 };
55 
56 extern debSystem debSys;
57 
58 #endif
return false
bool UnLockInner(bool NoErrors=false) override
Definition: debsystem.cc:208
virtual bool UnLock(bool NoErrors=false) APT_OVERRIDE
Definition: debsystem.cc:192
bool IsLocked() override
checks if the system is currently locked
Definition: debsystem.cc:218
virtual bool Lock(OpProgress *const Progress) APT_OVERRIDE
Definition: debsystem.cc:120
static APT_HIDDEN void DpkgChrootDirectory()
Definition: debsystem.cc:395
virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE
Definition: debsystem.cc:288
std::vector< std::string > ArchitecturesSupported() const override
Definition: debsystem.cc:493
debSystemPrivate *const d
Definition: debsystem.h:26
bool LockInner(OpProgress *const Progress, int timeoutSec) override
Definition: debsystem.cc:173
virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE
Definition: debsystem.cc:310
static APT_HIDDEN std::vector< std::string > GetDpkgBaseCommand()
Definition: debsystem.cc:376
static APT_HIDDEN pid_t ExecDpkg(std::vector< std::string > const &sArgs, int *const inputFd, int *const outputFd, bool const DiscardOutput)
Definition: debsystem.cc:407
virtual bool FindIndex(pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const APT_OVERRIDE
Definition: debsystem.cc:347
virtual bool AddStatusFiles(std::vector< pkgIndexFile * > &List) APT_OVERRIDE
Definition: debsystem.cc:336
static bool AssertFeature(std::string const &Feature)
Definition: debsystem.cc:472
APT_HIDDEN bool CheckUpdates()
Definition: debsystem.cc:227
static APT_HIDDEN std::string GetDpkgExecutable()
Definition: debsystem.cc:362
bool MultiArchSupported() const override
Definition: debsystem.cc:467
virtual pkgPackageManager * CreatePM(pkgDepCache *Cache) const APT_OVERRIDE
Definition: debsystem.cc:261
virtual signed Score(Configuration const &Cnf) APT_OVERRIDE
Definition: debsystem.cc:321
debSystem debSys
Definition: debsystem.cc:45
#define APT_OVERRIDE
Definition: macros.h:111
#define APT_HIDDEN
Definition: macros.h:78
pkgCache - Structure definitions for the cache file