16#ifndef PKGLIB_CACHEFILE_H
17#define PKGLIB_CACHEFILE_H
21#include <apt-pkg/depcache.h>
22#include <apt-pkg/macros.h>
49 inline operator pkgCache &()
const {
return *Cache;};
50 inline operator pkgCache *()
const {
return Cache;};
51 inline operator pkgDepCache &()
const {
return *DCache;};
52 inline operator pkgDepCache *()
const {
return DCache;};
53 inline operator pkgPolicy &()
const {
return *Policy;};
54 inline operator pkgPolicy *()
const {
return Policy;};
57 inline pkgDepCache *operator ->()
const {
return DCache;};
58 inline pkgDepCache &operator *()
const {
return *DCache;};
60 inline unsigned char &operator [](pkgCache::DepIterator
const &I)
const {
return (*DCache)[I];};
62 bool BuildCaches(
OpProgress *Progress = NULL,
bool WithLock =
true);
63 bool BuildSourceList(
OpProgress *Progress = NULL);
65 bool BuildDepCache(
OpProgress *Progress = NULL);
66 bool Open(
OpProgress *Progress = NULL,
bool WithLock =
true);
67 inline bool ReadOnlyOpen(
OpProgress *Progress = NULL) {
return Open(Progress,
false); };
68 static void RemoveCaches();
73 void InhibitActionGroups(
bool yes);
75 inline pkgCache* GetPkgCache() { BuildCaches(NULL,
false);
return Cache; };
76 inline pkgDepCache* GetDepCache() { BuildDepCache();
return DCache; };
77 inline pkgPolicy* GetPolicy() { BuildPolicy();
return Policy; };
78 inline pkgSourceList* GetSourceList() { BuildSourceList();
return SrcList; };
80 inline bool IsPkgCacheBuilt()
const {
return (Cache != NULL); };
81 inline bool IsDepCacheBuilt()
const {
return (DCache != NULL); };
82 inline bool IsPolicyBuilt()
const {
return (Policy != NULL); };
83 inline bool IsSrcListBuilt()
const {
return (SrcList != NULL); };
Definition cachefile.h:33
Definition cacheiterators.h:47
Definition indexfile.h:103
Definition sourcelist.h:43
pkgCache - Structure definitions for the cache file
Definition cachefile.cc:43
Definition depcache.h:188