]> git.saurik.com Git - apt.git/blob - apt-pkg/deb/debsystem.h
support arch:all data e.g. in separate Packages file
[apt.git] / apt-pkg / deb / debsystem.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 // $Id: debsystem.h,v 1.4 2003/01/11 07:16:33 jgg Exp $
4 /* ######################################################################
5
6 System - Debian version of the System Class
7
8 ##################################################################### */
9 /*}}}*/
10 #ifndef PKGLIB_DEBSYSTEM_H
11 #define PKGLIB_DEBSYSTEM_H
12
13 #include <apt-pkg/pkgsystem.h>
14 #include <apt-pkg/pkgcache.h>
15 #include <apt-pkg/cacheiterators.h>
16
17 #include <vector>
18 class Configuration;
19 class pkgIndexFile;
20 class pkgPackageManager;
21 class debSystemPrivate;
22 class pkgDepCache;
23
24 #ifndef APT_10_CLEANER_HEADERS
25 class debStatusIndex;
26 #endif
27
28 class debSystem : public pkgSystem
29 {
30 // private d-pointer
31 debSystemPrivate * const d;
32 APT_HIDDEN bool CheckUpdates();
33
34 public:
35
36 virtual bool Lock() APT_OVERRIDE;
37 virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
38 virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
39 virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
40 virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
41 virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
42 virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
43 virtual bool FindIndex(pkgCache::PkgFileIterator File,
44 pkgIndexFile *&Found) const APT_OVERRIDE;
45
46 debSystem();
47 virtual ~debSystem();
48
49 APT_HIDDEN static std::string GetDpkgExecutable();
50 APT_HIDDEN static std::vector<std::string> GetDpkgBaseCommand();
51 APT_HIDDEN static void DpkgChrootDirectory();
52 APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
53 APT_HIDDEN static bool SupportsMultiArch();
54 APT_HIDDEN static std::vector<std::string> SupportedArchitectures();
55 };
56
57 extern debSystem debSys;
58
59 #endif