| cacheset.h | | cacheset.h | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 138 | |
| | | | |
| A simple helper responsible for search for all members of a task | | A simple helper responsible for search for all members of a task | |
| in the cache. Optional it prints a a notice about the | | in the cache. Optional it prints a a notice about the | |
| packages chosen cause of the given task. | | packages chosen cause of the given task. | |
| \param Cache the packages are in | | \param Cache the packages are in | |
| \param pattern name of the task | | \param pattern name of the task | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static APT::PackageSet FromTask(pkgCacheFile &Cache, std::string pat
tern, CacheSetHelper &helper); | | static APT::PackageSet FromTask(pkgCacheFile &Cache, std::string pat
tern, CacheSetHelper &helper); | |
| static APT::PackageSet FromTask(pkgCacheFile &Cache, std::string con
st &pattern) { | | static APT::PackageSet FromTask(pkgCacheFile &Cache, std::string con
st &pattern) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::FromTask(Cache, pattern, helper); | | return FromTask(Cache, pattern, helper); | |
| } | | } | |
| | | | |
| /** \brief returns all packages in the cache whose name matchs a giv
en pattern | | /** \brief returns all packages in the cache whose name matchs a giv
en pattern | |
| | | | |
| A simple helper responsible for executing a regular expression o
n all | | A simple helper responsible for executing a regular expression o
n all | |
| package names in the cache. Optional it prints a a notice about
the | | package names in the cache. Optional it prints a a notice about
the | |
| packages chosen cause of the given package. | | packages chosen cause of the given package. | |
| \param Cache the packages are in | | \param Cache the packages are in | |
| \param pattern regular expression for package names | | \param pattern regular expression for package names | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static APT::PackageSet FromRegEx(pkgCacheFile &Cache, std::string pa
ttern, CacheSetHelper &helper); | | static APT::PackageSet FromRegEx(pkgCacheFile &Cache, std::string pa
ttern, CacheSetHelper &helper); | |
| static APT::PackageSet FromRegEx(pkgCacheFile &Cache, std::string co
nst &pattern) { | | static APT::PackageSet FromRegEx(pkgCacheFile &Cache, std::string co
nst &pattern) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::FromRegEx(Cache, pattern, helper); | | return FromRegEx(Cache, pattern, helper); | |
| } | | } | |
| | | | |
| /** \brief returns all packages specified by a string | | /** \brief returns all packages specified by a string | |
| | | | |
| \param Cache the packages are in | | \param Cache the packages are in | |
| \param string String the package name(s) should be extracted fro
m | | \param string String the package name(s) should be extracted fro
m | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static APT::PackageSet FromString(pkgCacheFile &Cache, std::string c
onst &string, CacheSetHelper &helper); | | static APT::PackageSet FromString(pkgCacheFile &Cache, std::string c
onst &string, CacheSetHelper &helper); | |
| static APT::PackageSet FromString(pkgCacheFile &Cache, std::string c
onst &string) { | | static APT::PackageSet FromString(pkgCacheFile &Cache, std::string c
onst &string) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::FromString(Cache, string, helper); | | return FromString(Cache, string, helper); | |
| } | | } | |
| | | | |
| /** \brief returns a package specified by a string | | /** \brief returns a package specified by a string | |
| | | | |
| \param Cache the package is in | | \param Cache the package is in | |
| \param string String the package name should be extracted from | | \param string String the package name should be extracted from | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::stri
ng const &string, CacheSetHelper &helper); | | static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::stri
ng const &string, CacheSetHelper &helper); | |
| static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::stri
ng const &string) { | | static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::stri
ng const &string) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::FromName(Cache, string, helper); | | return FromName(Cache, string, helper); | |
| } | | } | |
| | | | |
| /** \brief returns all packages specified on the commandline | | /** \brief returns all packages specified on the commandline | |
| | | | |
| Get all package names from the commandline and executes regex's
if needed. | | Get all package names from the commandline and executes regex's
if needed. | |
| No special package command is supported, just plain names. | | No special package command is supported, just plain names. | |
| \param Cache the packages are in | | \param Cache the packages are in | |
| \param cmdline Command line the package names should be extracte
d from | | \param cmdline Command line the package names should be extracte
d from | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static APT::PackageSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, CacheSetHelper &helper); | | static APT::PackageSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, CacheSetHelper &helper); | |
| static APT::PackageSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline) { | | static APT::PackageSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::FromCommandLine(Cache, cmdline, help
er); | | return FromCommandLine(Cache, cmdline, helper); | |
| } | | } | |
| | | | |
| struct Modifier { | | struct Modifier { | |
| enum Position { NONE, PREFIX, POSTFIX }; | | enum Position { NONE, PREFIX, POSTFIX }; | |
| unsigned short ID; | | unsigned short ID; | |
| const char * const Alias; | | const char * const Alias; | |
| Position Pos; | | Position Pos; | |
| Modifier (unsigned short const &id, const char * const alias
, Position const &pos) : ID(id), Alias(alias), Pos(pos) {}; | | Modifier (unsigned short const &id, const char * const alias
, Position const &pos) : ID(id), Alias(alias), Pos(pos) {}; | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 218 | | skipping to change at line 218 | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static std::map<unsigned short, PackageSet> GroupedFromCommandLine( | | static std::map<unsigned short, PackageSet> GroupedFromCommandLine( | |
| pkgCacheFile &Cache, const char **cmdline, | | pkgCacheFile &Cache, const char **cmdline, | |
| std::list<PackageSet::Modifier> const &mods, | | std::list<PackageSet::Modifier> const &mods, | |
| unsigned short const &fallback, CacheSetHelper &helper); | | unsigned short const &fallback, CacheSetHelper &helper); | |
| static std::map<unsigned short, PackageSet> GroupedFromCommandLine( | | static std::map<unsigned short, PackageSet> GroupedFromCommandLine( | |
| pkgCacheFile &Cache, const char **cmdline, | | pkgCacheFile &Cache, const char **cmdline, | |
| std::list<PackageSet::Modifier> const &mods, | | std::list<PackageSet::Modifier> const &mods, | |
| unsigned short const &fallback) { | | unsigned short const &fallback) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::PackageSet::GroupedFromCommandLine(Cache, cmdlin
e, | | return GroupedFromCommandLine(Cache, cmdline, | |
| mods, fallback, helper); | | mods, fallback, helper); | |
| } | | } | |
| | | | |
| enum Constructor { UNKNOWN, REGEX, TASK }; | | enum Constructor { UNKNOWN, REGEX, TASK }; | |
| Constructor getConstructor() const { return ConstructedBy; }; | | Constructor getConstructor() const { return ConstructedBy; }; | |
| | | | |
| PackageSet() : ConstructedBy(UNKNOWN) {}; | | PackageSet() : ConstructedBy(UNKNOWN) {}; | |
| PackageSet(Constructor const &by) : ConstructedBy(by) {}; | | PackageSet(Constructor const &by) : ConstructedBy(by) {}; | |
| /*}}
}*/ | | /*}}
}*/ | |
| private: /*{{
{*/ | | private: /*{{
{*/ | |
| | | | |
| skipping to change at line 312 | | skipping to change at line 312 | |
| Get all versions from the commandline, uses given default versio
n if | | Get all versions from the commandline, uses given default versio
n if | |
| non specifically requested and executes regex's if needed on na
mes. | | non specifically requested and executes regex's if needed on na
mes. | |
| \param Cache the packages and versions are in | | \param Cache the packages and versions are in | |
| \param cmdline Command line the versions should be extracted fro
m | | \param cmdline Command line the versions should be extracted fro
m | |
| \param helper responsible for error and message handling */ | | \param helper responsible for error and message handling */ | |
| static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, | | static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, | |
| APT::VersionSet::Version const &fallback, CacheSetHe
lper &helper); | | APT::VersionSet::Version const &fallback, CacheSetHe
lper &helper); | |
| static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, | | static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline, | |
| APT::VersionSet::Version const &fallback) { | | APT::VersionSet::Version const &fallback) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::VersionSet::FromCommandLine(Cache, cmdline, fall
back, helper); | | return FromCommandLine(Cache, cmdline, fallback, helper); | |
| } | | } | |
| static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline) { | | static APT::VersionSet FromCommandLine(pkgCacheFile &Cache, const ch
ar **cmdline) { | |
|
| return APT::VersionSet::FromCommandLine(Cache, cmdline, CAND
INST); | | return FromCommandLine(Cache, cmdline, CANDINST); | |
| } | | } | |
| | | | |
| static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg, | | static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg, | |
| APT::VersionSet::Version const &fallback, CacheSetHe
lper &helper, | | APT::VersionSet::Version const &fallback, CacheSetHe
lper &helper, | |
| bool const &onlyFromName = false); | | bool const &onlyFromName = false); | |
| static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg, | | static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg, | |
| APT::VersionSet::Version const &fallback) { | | APT::VersionSet::Version const &fallback) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::VersionSet::FromString(Cache, pkg, fallback, hel
per); | | return FromString(Cache, pkg, fallback, helper); | |
| } | | } | |
| static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg) { | | static APT::VersionSet FromString(pkgCacheFile &Cache, std::string p
kg) { | |
|
| return APT::VersionSet::FromString(Cache, pkg, CANDINST); | | return FromString(Cache, pkg, CANDINST); | |
| } | | } | |
| | | | |
| /** \brief returns all versions specified for the package | | /** \brief returns all versions specified for the package | |
| | | | |
| \param Cache the package and versions are in | | \param Cache the package and versions are in | |
| \param P the package in question | | \param P the package in question | |
| \param fallback the version(s) you want to get | | \param fallback the version(s) you want to get | |
| \param helper the helper used for display and error handling */ | | \param helper the helper used for display and error handling */ | |
| static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P, | | static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P, | |
| VersionSet::Version const &fallback, CacheSetHelper &helper)
; | | VersionSet::Version const &fallback, CacheSetHelper &helper)
; | |
| static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P, | | static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P, | |
| APT::VersionSet::Version const &fallback) { | | APT::VersionSet::Version const &fallback) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::VersionSet::FromPackage(Cache, P, fallback, help
er); | | return FromPackage(Cache, P, fallback, helper); | |
| } | | } | |
| static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P) { | | static APT::VersionSet FromPackage(pkgCacheFile &Cache, pkgCache::Pk
gIterator const &P) { | |
|
| return APT::VersionSet::FromPackage(Cache, P, CANDINST); | | return FromPackage(Cache, P, CANDINST); | |
| } | | } | |
| | | | |
| struct Modifier { | | struct Modifier { | |
| enum Position { NONE, PREFIX, POSTFIX }; | | enum Position { NONE, PREFIX, POSTFIX }; | |
| unsigned short ID; | | unsigned short ID; | |
| const char * const Alias; | | const char * const Alias; | |
| Position Pos; | | Position Pos; | |
| VersionSet::Version SelectVersion; | | VersionSet::Version SelectVersion; | |
| Modifier (unsigned short const &id, const char * const alias
, Position const &pos, | | Modifier (unsigned short const &id, const char * const alias
, Position const &pos, | |
| VersionSet::Version const &select) : ID(id), Alias
(alias), Pos(pos), | | VersionSet::Version const &select) : ID(id), Alias
(alias), Pos(pos), | |
| | | | |
| skipping to change at line 367 | | skipping to change at line 367 | |
| | | | |
| static std::map<unsigned short, VersionSet> GroupedFromCommandLine( | | static std::map<unsigned short, VersionSet> GroupedFromCommandLine( | |
| pkgCacheFile &Cache, const char **cmdline, | | pkgCacheFile &Cache, const char **cmdline, | |
| std::list<VersionSet::Modifier> const &mods, | | std::list<VersionSet::Modifier> const &mods, | |
| unsigned short const &fallback, CacheSetHelper &helper); | | unsigned short const &fallback, CacheSetHelper &helper); | |
| static std::map<unsigned short, VersionSet> GroupedFromCommandLine( | | static std::map<unsigned short, VersionSet> GroupedFromCommandLine( | |
| pkgCacheFile &Cache, const char **cmdline, | | pkgCacheFile &Cache, const char **cmdline, | |
| std::list<VersionSet::Modifier> const &mods, | | std::list<VersionSet::Modifier> const &mods, | |
| unsigned short const &fallback) { | | unsigned short const &fallback) { | |
| CacheSetHelper helper; | | CacheSetHelper helper; | |
|
| return APT::VersionSet::GroupedFromCommandLine(Cache, cmdlin
e, | | return GroupedFromCommandLine(Cache, cmdline, | |
| mods, fallback, helper); | | mods, fallback, helper); | |
| } | | } | |
| /*}}
}*/ | | /*}}
}*/ | |
| protected: /*{{
{*/ | | protected: /*{{
{*/ | |
| | | | |
| /** \brief returns the candidate version of the package | | /** \brief returns the candidate version of the package | |
| | | | |
| \param Cache to be used to query for information | | \param Cache to be used to query for information | |
| \param Pkg we want the candidate version from this package */ | | \param Pkg we want the candidate version from this package */ | |
| static pkgCache::VerIterator getCandidateVer(pkgCacheFile &Cache, | | static pkgCache::VerIterator getCandidateVer(pkgCacheFile &Cache, | |
| | | | |
End of changes. 13 change blocks. |
| 13 lines changed or deleted | | 13 lines changed or added | |
|