Next: pkgCache::PkgIterator
Up: PkgDebian
Previous: PkgDebian
Indice
is a wrapper class for opening, generating
and closing the cache. It is the main actor of the ``cache operations''
category.
implements a simple mechanism to
open various sorts of caches. It can operate as root, as non-root,
show progress and so on, it transparently handles everything is necessary.
This means it can rebuild caches from the source list and instantiates
and prepares the standard policy mechanism. It is defined in the header
file
. The methods we use are:
-
Progress,
Withlock
: it is used to open the packages
cache. The first input parameter is a progress indicator that, in
our case, it set not to display ouput (to hide the typical ``Reading
Package Lists...'' and ``Building Dependency Tree...''). The
second one is a lock flag that is true by default. Since PackageFS
opens the cache only for reading purposes, no lock is needed. This
function is called into the
method;
-
: it simply closes the cache;
-
: it initializes an iterator to
the first cache entry;
-
Name
:
this method belongs to the
class which is defined
in
. The developer can transparently
access it through the
class. As the reader
can imagine, this method is used inside
to reach a particular package entry.
Next: pkgCache::PkgIterator
Up: PkgDebian
Previous: PkgDebian
Indice
2004-11-19