apt: apt-pkg/edsp/edspsystem.h Source File

apt 2.7.5 commandline package manager

edspsystem.h
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3/* ######################################################################
4
5 System - Debian version of the System Class
6
7 ##################################################################### */
8 /*}}}*/
9#ifndef PKGLIB_EDSPSYSTEM_H
10#define PKGLIB_EDSPSYSTEM_H
11
12#include <apt-pkg/pkgcache.h>
13#include <apt-pkg/pkgsystem.h>
14#include <apt-pkg/error.h>
15
16#include <memory>
17#include <vector>
18
19#include <apt-pkg/macros.h>
20
21class Configuration;
22class pkgDepCache;
23class pkgIndexFile;
24class pkgPackageManager;
25
26 class APT_HIDDEN edspLikeSystem : public pkgSystem
27{
28protected:
29 std::unique_ptr<pkgIndexFile> StatusFile;
30
31public:
32 virtual bool Lock(OpProgress * const Progress) APT_OVERRIDE APT_PURE;
33 virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE APT_PURE;
34 virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE APT_PURE;
35 virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
36 virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE APT_PURE;
37 virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
38 virtual bool FindIndex(pkgCache::PkgFileIterator File,
39 pkgIndexFile *&Found) const APT_OVERRIDE;
40
41 bool MultiArchSupported() const override { return true; }
42 std::vector<std::string> ArchitecturesSupported() const override { return {}; };
43
44 bool LockInner(OpProgress * const, int) override { return _error->Error("LockInner is not implemented"); };
45 bool UnLockInner(bool) override { return _error->Error("UnLockInner is not implemented"); };
46 bool IsLocked() override { return true; };
47
48 explicit edspLikeSystem(char const * const Label);
49 virtual ~edspLikeSystem();
50};
51
52 class APT_HIDDEN edspSystem : public edspLikeSystem
53{
54 std::string tempDir;
55 std::string tempStatesFile;
56 std::string tempPrefsFile;
57
58public:
59 virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
60 virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
61
62 edspSystem();
63 virtual ~edspSystem();
64};
65
66 class APT_HIDDEN eippSystem : public edspLikeSystem
67{
68 public:
69 virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
70
71 eippSystem();
72 virtual ~eippSystem();
73};
74
75#endif
Configuration
Definition configuration.h:40
OpProgress
Definition progress.h:30
edspLikeSystem
Definition edspsystem.h:27
edspLikeSystem::IsLocked
bool IsLocked() override
checks if the system is currently locked
Definition edspsystem.h:46
edspLikeSystem::ArchitecturesSupported
std::vector< std::string > ArchitecturesSupported() const override
Definition edspsystem.h:42
edspLikeSystem::MultiArchSupported
bool MultiArchSupported() const override
Definition edspsystem.h:41
edspSystem
Definition edspsystem.h:53
eippSystem
Definition edspsystem.h:67
pkgDepCache
Definition depcache.h:62
pkgIndexFile
Definition indexfile.h:103
pkgPackageManager
Definition packagemanager.h:48
pkgSystem
Definition pkgsystem.h:53
pkgcache.h
pkgCache - Structure definitions for the cache file