12#ifndef ZYPP2_REPOSITORYINFO_H
13#define ZYPP2_REPOSITORYINFO_H
422 bool setGpgCheck( GpgCheck mode_r );
427 bool gpgKeyUrlsEmpty()
const;
429 urls_size_type gpgKeyUrlsSize()
const;
432 url_set gpgKeyUrls()
const;
434 url_set rawGpgKeyUrls()
const;
436 void setGpgKeyUrls( url_set urls );
439 Url gpgKeyUrl()
const;
441 Url rawGpgKeyUrl()
const;
443 void setGpgKeyUrl(
const Url &gpgkey );
448 bool keepPackages()
const;
458 void setKeepPackages(
bool keep );
464 bool effectiveKeepPackages()
const;
470 std::string service()
const;
474 void setService(
const std::string& name );
479 std::string targetDistribution()
const;
485 void setTargetDistribution(
const std::string & targetDistribution);
489 const std::set<std::string> & contentKeywords()
const;
492 void addContent(
const std::string & keyword_r );
494 template <
class TIterator>
498 template <
class TContainer>
505 bool hasContent()
const;
507 bool hasContent(
const std::string & keyword_r )
const;
509 template <
class TIterator>
511 {
for_( it, begin_r, end_r )
if ( !
hasContent( *it ) )
return false;
return true; }
513 template <
class TContainer>
515 {
return hasContentAll( container_r.begin(), container_r.end() ); }
517 template <
class TIterator>
519 {
for_( it, begin_r, end_r )
if (
hasContent( *it ) )
return true;
return false; }
521 template <
class TContainer>
523 {
return hasContentAny( container_r.begin(), container_r.end() ); }
539 bool hasLicense()
const;
541 bool hasLicense(
const std::string & name_r )
const;
546 bool needToAcceptLicense()
const;
548 bool needToAcceptLicense(
const std::string & name_r )
const;
551 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
553 std::string getLicense(
const Locale & lang_r =
Locale() );
555 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
563 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
570 bool requireStatusWithMediaFile ()
const;
577 std::ostream &
dumpOn( std::ostream &
str )
const override;
583 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
593 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
605 std::string repoStatusString()
const;
'Language[_Country]' codes.
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
void setMirrorListUrls(url_set urls)
Like setMirrorListUrl but take an url_set.
void setMetalinkUrl(const Url &url)
Like setMirrorListUrl but expect metalink format.
Pathname metadataPath() const
Path where this repo metadata was read from.
bool hasContentAny(const TContainer &container_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
RepoInfo(RepoInfo &&)=default
url_set::size_type urls_size_type
bool usesAutoMetadataPaths() const
Whether metadataPath uses AUTO% setup.
shared_ptr< RepoInfo > RepoInfo_Ptr
void addContentFrom(TIterator begin_r, TIterator end_r)
GpgCheck
Some predefined settings.
bool baseUrlsEmpty() const
whether repository urls are available
Pathname predownloadPath() const
Path where this repo packages are predownloaded.
bool hasContent() const
Check for content keywords.
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
void setMirrorListUrl(const Url &url)
Set mirror list url.
Url rawUrl() const
Pars pro toto: The first repository raw url (no variables replaced) this is either rawBaseUrls()....
repo::RepoType type() const
Type of repository,.
url_set effectiveBaseUrls() const
The complete set of effective repository urls.
std::list< RepoInfo > RepoInfoList
RepoInfo & operator=(const RepoInfo &)=default
static unsigned noPriority()
The least priority (unsigned(-1)).
urls_size_type baseUrlsSize() const
number of repository urls
Url url() const
Pars pro toto: The first repository url, this is either baseUrls().front() or if no baseUrl is define...
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
void setBaseUrl(Url url)
Clears current base URL list and adds url.
urls_const_iterator baseUrlsEnd() const
iterator that points at end of repository urls
Url location() const
Returns the location URL for the repository, this is either the first configured baseUrl or a configu...
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
bool baseUrlSet() const
Whether there are manualy configured repository urls.
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
Pathname path() const
Repository path.
url_set baseUrls() const
The complete set of repository urls as configured.
void addBaseUrl(Url url)
Add a base url.
bool pkgGpgCheckIsMandatory() const
Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.
url_set rawBaseUrls() const
The complete set of raw repository urls (no variables replaced)
bool hasContentAny(TIterator begin_r, TIterator end_r) const
Url mirrorListUrl() const
Url of a file which contains a list of repository urls.
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects.
void setBaseUrls(url_set urls)
Clears current base URL list and adds an url_set.
unsigned priority() const
Repository priority for solver.
bool gpgCheck() const
Whether default signature checking should be performed.
void setPath(const Pathname &path)
set the product path.
void setValidRepoSignature(TriBool value_r)
Set the value for validRepoSignature (or indeterminate if unsigned).
static unsigned defaultPriority()
The default priority (99).
void setPriority(unsigned newval_r)
Set repository priority for solver.
RepoInfo(const RepoInfo &)=default
void addContentFrom(const TContainer &container_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
urls_const_iterator baseUrlsBegin() const
iterator that points at begin of repository urls
bool hasContentAll(const TContainer &container_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool repoGpgCheckIsMandatory() const
Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.
std::vector< std::vector< Url > > groupedBaseUrls() const
Returns the currently known effective baseUrls in groups, where each group contains a primary base ur...
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
shared_ptr< const RepoInfo > RepoInfo_constPtr
TriBool validRepoSignature() const
Whether the repo metadata are signed and successfully validated or indeterminate if unsigned.
void setRepoGpgCheck(TriBool value_r)
Set the value for repoGpgCheck (or indeterminate to use the default).
void setMetalinkUrls(url_set urls)
Like setMirrorListUrls but expect metalink format.
Pathname packagesPath() const
Path where this repo packages are cached.
bool hasContentAll(TIterator begin_r, TIterator end_r) const
void addContent(const std::string &keyword_r)
Add content keywords.
bool repoGpgCheck() const
Whether the signature of repo metadata should be checked for this repo.
void setType(const repo::RepoType &t)
set the repository type
bool pkgGpgCheck() const
Whether the signature of rpm packages should be checked for this repo.
Url rawMirrorListUrl() const
The raw mirrorListUrl (no variables replaced).
RepoInfo & operator=(RepoInfo &&)=default
bool effectiveBaseUrlsEmpty() const
whether effective repository urls are available
Base class implementing common features of RepoInfo and ServiceInfo.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Locale > LocaleSet
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
RW_pointer supporting 'copy on write' functionality.
Repository type enumeration.
Provides API related macros.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.