Go to the documentation of this file.
12 #ifndef ZYPP2_REPOSITORYINFO_H
13 #define ZYPP2_REPOSITORYINFO_H
19 #include <zypp/APIConfig.h>
447 void addContent(
const std::string & keyword_r );
449 template <
class TIterator>
453 template <
class TContainer>
462 bool hasContent(
const std::string & keyword_r )
const;
464 template <
class TIterator>
466 {
for_( it, begin_r, end_r )
if ( !
hasContent( *it ) )
return false;
return true; }
468 template <
class TContainer>
470 {
return hasContentAll( container_r.begin(), container_r.end() ); }
472 template <
class TIterator>
474 {
for_( it, begin_r, end_r )
if (
hasContent( *it ) )
return true;
return false; }
476 template <
class TContainer>
478 {
return hasContentAny( container_r.begin(), container_r.end() ); }
496 bool hasLicense(
const std::string & name_r )
const;
526 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
542 virtual std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const;
571 #endif // ZYPP2_REPOSITORYINFO_H
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
void addContentFrom(TIterator begin_r, TIterator end_r)
LocaleSet getLicenseLocales() const
Return the locales the license is available for.
void setBaseUrl(const Url &url)
Clears current base URL list and adds url.
bool gpgKeyUrlsEmpty() const
Whether gpgkey URLs are defined.
url_set rawBaseUrls() const
The complete set of raw repository urls (no variables replaced)
GpgCheck
Some predefined settings.
urls_size_type gpgKeyUrlsSize() const
Number of gpgkey URLs defined.
bool hasContentAny(const TContainer &container_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
void addContentFrom(const TContainer &container_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
shared_ptr< const RepoInfo > RepoInfo_constPtr
shared_ptr< RepoInfo > RepoInfo_Ptr
What is known about a repository.
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
void setGpgKeyUrl(const Url &gpgkey)
(leagcy API) Set the gpgkey URL defined for this repo
std::list< RepoInfo > RepoInfoList
bool baseUrlsEmpty() const
whether repository urls are available
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
void setBaseUrls(url_set urls)
Clears current base URL list and adds an url_set.
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
unsigned priority() const
Repository priority for solver.
void addContent(const std::string &keyword_r)
Add content keywords.
bool baseUrlSet() const
Whether there are manualy configured repository urls.
Pathname packagesPath() const
Path where this repo packages are cached.
bool gpgCheck() const
Whether default signature checking should be performed.
void setPath(const Pathname &path)
set the product path.
void setPriority(unsigned newval_r)
Set repository priority for solver.
Url mirrorListUrl() const
Url of a file which contains a list of repository urls.
url_set rawGpgKeyUrls() const
The list of raw gpgkey URLs defined for this repo (no variables replaced)
virtual std::ostream & dumpAsXmlOn(std::ostream &str, const std::string &content="") const
Write an XML representation of this RepoInfo object.
Pathname provideKey(const std::string &keyID_r, const Pathname &targetDirectory_r) const
downloads all configured gpg keys into the defined directory
bool usesAutoMethadataPaths() const
Whether metadataPath uses AUTO% setup.
bool hasContentAny(TIterator begin_r, TIterator end_r) const
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
void setGpgKeyUrls(url_set urls)
Set a list of gpgkey URLs defined for this repo.
void setType(const repo::RepoType &t)
set the repository type
Repository type enumeration.
void setTargetDistribution(const std::string &targetDistribution)
Sets the distribution for which is this repository meant.
void setKeepPackages(bool keep)
Set if packaqes downloaded from this repository will be kept in local cache.
bool repoGpgCheckIsMandatory() const
Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.
std::string name() const
Repository name.
virtual std::ostream & dumpOn(std::ostream &str) const
Write a human-readable representation of this RepoInfo object into the str stream.
void addBaseUrl(const Url &url)
Add a base url.
void getRawGpgChecks(TriBool &g_r, TriBool &r_r, TriBool &p_r) const
Raw values for RepoManager.
Easy-to use interface to the ZYPP dependency resolver.
urls_const_iterator baseUrlsBegin() const
iterator that points at begin of repository urls
bool hasLicense() const
Whether there is a license associated with the repo.
Url rawUrl() const
Pars pro toto: The first repository raw url (no variables replaced)
void setValidRepoSignature(TriBool value_r)
Set the value for validRepoSignature (or indeterminate if unsigned).
TriBool validRepoSignature() const
Whether the repo metadata are signed and successfully validated or indeterminate if unsigned.
bool hasContentAll(TIterator begin_r, TIterator end_r) const
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects.
bool pkgGpgCheck() const
Whether the signature of rpm packages should be checked for this repo.
std::string targetDistribution() const
Distribution for which is this repository meant.
bool hasContentAll(const TContainer &container_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
url_set gpgKeyUrls() const
The list of gpgkey URLs defined for this repo.
Base class implementing common features of RepoInfo and ServiceInfo.
bool hasContent() const
Check for content keywords.
static unsigned noPriority()
The least priority (unsigned(-1)).
friend std::ostream & operator<<(std::ostream &str, const RepoInfo &obj)
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Url url() const
Pars pro toto: The first repository url.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
virtual std::ostream & dumpAsIniOn(std::ostream &str) const
Write this RepoInfo object into str in a .repo file format.
Pathname metadataPath() const
Path where this repo metadata was read from.
bool pkgGpgCheckIsMandatory() const
Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.
url_set baseUrls() const
The complete set of repository urls.
static unsigned defaultPriority()
The default priority (99).
bool repoGpgCheck() const
Whether the signature of repo metadata should be checked for this repo.
std::unordered_set< Locale > LocaleSet
void setMirrorListUrl(const Url &url)
Set mirror list url.
void setRepoGpgCheck(TriBool value_r)
Set the value for repoGpgCheck (or indeterminate to use the default).
url_set::size_type urls_size_type
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
bool needToAcceptLicense() const
Whether the repo license has to be accepted, e.g.
void setService(const std::string &name)
sets service which added this repository
Url gpgKeyUrl() const
(leagcy API) The 1st gpgkey URL defined for this repo
String related utilities and Regular expression matching.
urls_const_iterator baseUrlsEnd() const
iterator that points at end of repository urls
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
Url rawGpgKeyUrl() const
(leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced)
'Language[_Country]' codes.
void setMetalinkUrl(const Url &url)
Like setMirrorListUrl but expect metalink format.
Url rawMirrorListUrl() const
The raw mirrorListUrl (no variables replaced).
creates and provides information about known sources.
bool keepPackages() const
Whether packages downloaded from this repository will be kept in local cache.
repo::RepoType type() const
Type of repository,.
std::string getLicense(const Locale &lang_r=Locale()) const
Return the best license for the current (or a specified) locale.
const std::set< std::string > & contentKeywords() const
Content keywords defined.
Pathname path() const
Repository path.
urls_size_type baseUrlsSize() const
number of repository urls