12 #ifndef ZYPP2_REPOSITORYINFO_H
13 #define ZYPP2_REPOSITORYINFO_H
179 Pathname
path()
const;
347 void addContent(
const std::string & keyword_r );
349 template <
class _Iterator>
353 template <
class _Container>
362 bool hasContent(
const std::string & keyword_r = std::string() )
const;
364 template <
class _Iterator>
366 {
for_( it, begin_r, end_r )
if ( !
hasContent( *it ) )
return false;
return true; }
368 template <
class _Container>
370 {
return hasContentAll( container_r.begin(), container_r.end() ); }
372 template <
class _Iterator>
374 {
for_( it, begin_r, end_r )
if (
hasContent( *it ) )
return true;
return false; }
376 template <
class _Container>
378 {
return hasContentAny( container_r.begin(), container_r.end() ); }
408 virtual std::ostream &
dumpOn( std::ostream & str )
const;
414 virtual std::ostream &
dumpAsIniOn( std::ostream & str )
const;
424 virtual std::ostream &
dumpAsXmlOn( std::ostream & str,
const std::string & content =
"" )
const;
447 #endif // ZYPP2_REPOSITORYINFO_H
LocaleSet getLicenseLocales() const
Return the locales the license is available for.
std::string name() const
Repository name.
std::string targetDistribution() const
Distribution for which is this repository meant.
bool hasContentAll(const _Container &container_r) const
void setGpgKeyUrl(const Url &gpgkey)
Key to use for gpg checking of this repository.
static unsigned defaultPriority()
The default priority (99).
bool hasContentAll(_Iterator begin_r, _Iterator end_r) const
Url rawUrl() const
Pars pro toto: The first repository raw url (no variables replaced)
virtual std::ostream & dumpAsIniOn(std::ostream &str) const
Write this RepoInfo object into str in a .repo file format.
void addContentFrom(_Iterator begin_r, _Iterator end_r)
void setPriority(unsigned newval_r)
Set repository priority for solver.
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
shared_ptr< RepoInfo > RepoInfo_Ptr
void setMirrorListUrl(const Url &url)
Set mirror list url.
urls_const_iterator baseUrlsBegin() const
iterator that points at begin of repository urls
Pathname metadataPath() const
Path where this repo metadata was read from.
String related utilities and Regular expression matching.
bool pkgGpgCheck() const
Whether the signature of rpm packages should be checked for this repo.
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects...
What is known about a repository.
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
void setBaseUrl(const Url &url)
Clears current base URL list and adds url.
urls_const_iterator baseUrlsEnd() const
iterator that points at end of repository urls
shared_ptr< const RepoInfo > RepoInfo_constPtr
Pathname packagesPath() const
Path where this repo packages are cached.
unsigned priority() const
Repository priority for solver.
void setValidRepoSignature(TriBool value_r)
Set the value for validRepoSignature (or indeterminate if unsigned).
bool repoGpgCheck() const
Whether the signature of repo metadata should be checked for this repo.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
bool keepPackages() const
Whether packages downloaded from this repository will be kept in local cache.
bool needToAcceptLicense() const
Whether the repo license has to be accepted, e.g.
Url rawMirrorListUrl() const
The raw mirrorListUrl (no variables replaced).
std::ostream & operator<<(std::ostream &str, const Exception &obj)
void setRepoGpgCheck(TriBool value_r)
Set the value for repoGpgCheck (or indeterminate to use the default).
Url mirrorListUrl() const
Url of a file which contains a list of repository urls.
Provides API related macros.
void setPath(const Pathname &path)
set the product path.
void setService(const std::string &name)
sets service which added this repository
void setMetadataPath(const Pathname &path)
set the path where the local metadata is stored
bool gpgCheck() const
Whether default signature checking should be performed for this repo.
void setType(const repo::RepoType &t)
set the repository type
bool baseUrlSet() const
Whether there are manualy configured repository urls.
void setKeepPackages(bool keep)
Set if packaqes downloaded from this repository will be kept in local cache.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
std::tr1::unordered_set< Locale > LocaleSet
void addBaseUrl(const Url &url)
Add a base url.
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
url_set baseUrls() const
The complete set of repository urls.
url_set rawBaseUrls() const
The complete set of raw repository urls (no variables replaced)
void setMetalinkUrl(const Url &url)
Like setMirrorListUrl but expect metalink format.
bool baseUrlsEmpty() const
whether repository urls are available
repo::RepoType type() const
Type of repository,.
url_set::size_type urls_size_type
void setTargetDistribution(const std::string &targetDistribution)
Sets the distribution for which is this repository meant.
std::string getLicense(const Locale &lang_r=Locale()) const
Return the best license for the current (or a specified) locale.
bool hasContentAny(const _Container &container_r) const
bool hasLicense() const
Whether there is a license associated with the repo.
bool hasContent(const std::string &keyword_r=std::string()) const
Check for content keywords.
Url gpgKeyUrl() const
Key to use for gpg checking of this repository.
Url url() const
Pars pro toto: The first repository url.
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
std::list< RepoInfo > RepoInfoList
bool hasContentAny(_Iterator begin_r, _Iterator end_r) const
Base class implementing common features of RepoInfo and ServiceInfo.
void addContent(const std::string &keyword_r)
Add content keywords.
virtual std::ostream & dumpAsXmlOn(std::ostream &str, const std::string &content="") const
Write an XML representation of this RepoInfo object.
TriBool validRepoSignature() const
Whether the repo metadata are signed and successfully validated or indeterminate if unsigned...
urls_size_type baseUrlsSize() const
number of repository urls
Easy-to use interface to the ZYPP dependency resolver.
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
Url rawGpgKeyUrl() const
The raw gpgKeyUrl (no variables replaced).
Pathname path() const
Repository path.
virtual std::ostream & dumpOn(std::ostream &str) const
Write a human-readable representation of this RepoInfo object into the str stream.
Repository type enumeration.
friend std::ostream & operator<<(std::ostream &str, const RepoInfo &obj)
void addContentFrom(const _Container &container_r)