#ifndef PKGLIB_PKGCACHE_H
#define PKGLIB_PKGCACHE_H
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/macros.h>
+
#include <string>
#include <time.h>
-#include <apt-pkg/mmap.h>
#ifndef APT_8_CLEANER_HEADERS
using std::string;
/** \brief priority of a package version
Zero is used for unparsable or absent Priority fields. */
- enum VerPriority {Important=1,Required=2,Standard=3,Optional=4,Extra=5};
+ enum VerPriority {Required=1,Important=2,Standard=3,Optional=4,Extra=5};
enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4};
enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
std::string CacheFile;
MMap ⤅
- unsigned long sHash(const std::string &S) const;
- unsigned long sHash(const char *S) const;
+ unsigned long sHash(const std::string &S) const APT_PURE;
+ unsigned long sHash(const char *S) const APT_PURE;
public:
inline PkgFileIterator FileEnd();
inline bool MultiArchCache() const { return MultiArchEnabled; }
- inline char const * const NativeArch() const;
+ inline char const * NativeArch();
// Make me a function
pkgVersioningSystem *VS;
// Converters
- static const char *CompTypeDeb(unsigned char Comp);
- static const char *CompType(unsigned char Comp);
+ static const char *CompTypeDeb(unsigned char Comp) APT_CONST;
+ static const char *CompType(unsigned char Comp) APT_CONST;
static const char *DepType(unsigned char Dep);
pkgCache(MMap *Map,bool DoMap = true);
map_ptrloc StringList;
/** \brief String representing the version system used */
map_ptrloc VerSysName;
- /** \brief Architecture(s) the cache was built against */
+ /** \brief native architecture the cache was built against */
map_ptrloc Architecture;
+ /** \brief all architectures the cache was built against */
+ map_ptrloc Architectures;
/** \brief The maximum size of a raw entry from the original Package file */
unsigned long MaxVerFileSize;
/** \brief The maximum size of a raw entry from the original Translation file */
/** \brief Size of the complete cache file */
unsigned long CacheFileSize;
- bool CheckSizes(Header &Against) const;
+ bool CheckSizes(Header &Against) const APT_PURE;
Header();
};
/*}}}*/
/*}}}*/
-inline char const * const pkgCache::NativeArch() const
+inline char const * pkgCache::NativeArch()
{ return StrP + HeaderP->Architecture; }
#include <apt-pkg/cacheiterators.h>