|
apt 3.0.3
commandline package manager
|
Classes | |
| struct | PkgModifier |
| class | Private |
Public Types | |
| enum | PkgSelector { UNKNOWN , REGEX , TASK , FNMATCH , PACKAGENAME , STRING , PATTERN } |
| enum | VerSelector { RELEASE , VERSIONNUMBER , ALL , CANDANDINST , CANDIDATE , INSTALLED , CANDINST , INSTCAND , NEWEST } |
| specifies which version(s) we want to refer to More... | |
Public Member Functions | |
| CacheSetHelper (bool const ShowError=true, GlobalError::MsgType ErrorType=GlobalError::ERROR) | |
| virtual bool | PackageFrom (enum PkgSelector const select, PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) |
| virtual bool | PackageFromCommandLine (PackageContainerInterface *const pci, pkgCacheFile &Cache, const char **cmdline) |
| virtual bool | PackageFromModifierCommandLine (unsigned short &modID, PackageContainerInterface *const pci, pkgCacheFile &Cache, const char *cmdline, std::list< PkgModifier > const &mods) |
| virtual void | showPackageSelection (pkgCache::PkgIterator const &pkg, PkgSelector const select, std::string const &pattern) |
| be notified about the package being selected via pattern | |
| virtual void | canNotFindPackage (enum PkgSelector const select, PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) |
| be notified if a package can't be found via pattern | |
| virtual void | showVersionSelection (pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver, enum VerSelector const select, std::string const &pattern) |
| be notified about the version being selected via pattern | |
| virtual void | canNotFindVersion (enum VerSelector const select, VersionContainerInterface *const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) |
| be notified if a version can't be found for a package | |
| virtual pkgCache::VerIterator | canNotGetVersion (enum VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) |
| virtual pkgCache::PkgIterator | canNotFindPkgName (pkgCacheFile &Cache, std::string const &str) |
| bool | showErrors () const |
| bool | showErrors (bool const newValue) |
| GlobalError::MsgType | errorType () const |
| GlobalError::MsgType | errorType (GlobalError::MsgType const &newValue) |
| std::string | getLastVersionMatcher () const |
| void | setLastVersionMatcher (std::string const &matcher) |
Protected Member Functions | |
| pkgCache::VerIterator | canNotGetInstCandVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) |
| pkgCache::VerIterator | canNotGetCandInstVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) |
| pkgCache::VerIterator | canNotGetVerFromRelease (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, std::string const &release) |
| pkgCache::VerIterator | canNotGetVerFromVersionNumber (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, std::string const &verstr) |
| bool | PackageFromTask (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern) |
| bool | PackageFromRegEx (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern) |
| bool | PackageFromFnmatch (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern) |
| bool | PackageFromPackageName (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern) |
| bool | PackageFromString (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) |
| bool | PackageFromPattern (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) |
Protected Attributes | |
| bool | ShowError |
| GlobalError::MsgType | ErrorType |
Simple base class with a lot of virtual methods which can be overridden to alter the behavior or the output of the CacheSets.
This helper is passed around by the static methods in the CacheSets and used every time they hit an error condition or something could be printed out.
| enum VerSelector |
specifies which version(s) we want to refer to
|
virtual |
be notified if a package can't be found via pattern
Can be used to show a message as well as to try something else to make it match
| select | is the method tried for selection |
| pci | is the container the package should be inserted in |
| Cache | is the package universe available |
| pattern | is the string not matching anything |
References CacheSetHelper::canNotFindPackage().
Referenced by CacheSetHelper::canNotFindPackage(), and CacheSetHelper::PackageFromString().
|
virtual |
be notified if a version can't be found for a package
Main use is probably to show a message to the user what happened
| select | is the method tried for selection |
| vci | is the container the version should be inserted in |
| Cache | is the package universe available |
| Pkg | is the package we wanted a version from |
References CacheSetHelper::ALL, CacheSetHelper::CANDANDINST, CacheSetHelper::CANDIDATE, CacheSetHelper::CANDINST, CacheSetHelper::INSTALLED, CacheSetHelper::INSTCAND, CacheSetHelper::NEWEST, CacheSetHelper::RELEASE, and CacheSetHelper::VERSIONNUMBER.
|
protected |
References CacheSetHelper::canNotFindPackage().
|
virtual |
be notified about the package being selected via pattern
Main use is probably to show a message to the user what happened
| pkg | is the package which was selected |
| select | is the selection method which choose the package |
| pattern | is the string used by the selection method to pick the package |
|
virtual |
be notified about the version being selected via pattern
Main use is probably to show a message to the user what happened Note that at the moment this method is only called for RELEASE and VERSION selections, not for the others.
| Pkg | is the package which was selected for |
| Ver | is the version selected |
| select | is the selection method which choose the version |
| pattern | is the string used by the selection method to pick the version |
References CacheSetHelper::ALL, CacheSetHelper::CANDANDINST, CacheSetHelper::CANDIDATE, CacheSetHelper::CANDINST, CacheSetHelper::INSTALLED, CacheSetHelper::INSTCAND, CacheSetHelper::NEWEST, CacheSetHelper::RELEASE, and CacheSetHelper::VERSIONNUMBER.