apt 3.1.11 commandline package manager

debsystem.h
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
26 debSystemPrivate * const d;
27 APT_HIDDEN bool CheckUpdates();
28
29 public:
30 bool Lock(OpProgress *Progress) override;
31 bool UnLock(bool NoErrors = false) override;
32 pkgPackageManager *CreatePM(pkgDepCache *Cache) const override;
33 bool Initialize(Configuration &Cnf) override;
34 bool ArchiveSupported(const char *Type) override;
35 signed Score(Configuration const &Cnf) override;
36 bool AddStatusFiles(std::vector<pkgIndexFile *> &List) override;
37 bool FindIndex(pkgCache::PkgFileIterator File,
38 pkgIndexFile *&Found) const override;
39
40 debSystem();
41 ~debSystem() override;
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 std::string StripDpkgChrootDirectory(std::string const &File);
47 APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
48 bool MultiArchSupported() const override;
49 static bool AssertFeature(std::string const &Feature);
50 std::vector<std::string> ArchitecturesSupported() const override;
51
52 bool LockInner(OpProgress *const Progress, int timeoutSec) override;
53 bool UnLockInner(bool NoErrors=false) override;
54 bool IsLocked() override;
55};
56
57 extern debSystem debSys;
58
59#endif
Configuration
Definition configuration.h:41
OpProgress
Definition progress.h:30
debSystemPrivate
Definition debsystem.cc:47
debSystem
Definition debsystem.h:24
debSystem::IsLocked
bool IsLocked() override
checks if the system is currently locked
Definition debsystem.cc:218
debSystem::ArchitecturesSupported
std::vector< std::string > ArchitecturesSupported() const override
Definition debsystem.cc:531
debSystem::MultiArchSupported
bool MultiArchSupported() const override
Definition debsystem.cc:505
pkgCache::PkgFileIterator
Definition cacheiterators.h:496
pkgDepCache
Definition depcache.h:63
pkgIndexFile
Definition indexfile.h:103
pkgPackageManager
Definition packagemanager.h:49
pkgcache.h
pkgCache - Structure definitions for the cache file