12#ifndef ZYPP2_REPOSITORYINFO_H
13#define ZYPP2_REPOSITORYINFO_H
434 bool setGpgCheck( GpgCheck mode_r );
439 bool gpgKeyUrlsEmpty()
const;
441 urls_size_type gpgKeyUrlsSize()
const;
444 url_set gpgKeyUrls()
const;
446 url_set rawGpgKeyUrls()
const;
448 void setGpgKeyUrls( url_set urls );
451 Url gpgKeyUrl()
const;
453 Url rawGpgKeyUrl()
const;
455 void setGpgKeyUrl(
const Url &gpgkey );
460 bool keepPackages()
const;
470 void setKeepPackages(
bool keep );
476 bool effectiveKeepPackages()
const;
482 std::string service()
const;
486 void setService(
const std::string& name );
491 std::string targetDistribution()
const;
497 void setTargetDistribution(
const std::string & targetDistribution);
501 const std::set<std::string> & contentKeywords()
const;
504 void addContent(
const std::string & keyword_r );
506 template <
class TIterator>
510 template <
class TContainer>
517 bool hasContent()
const;
519 bool hasContent(
const std::string & keyword_r )
const;
521 template <
class TIterator>
523 {
for_( it, begin_r, end_r )
if ( !
hasContent( *it ) )
return false;
return true; }
525 template <
class TContainer>
527 {
return hasContentAll( container_r.begin(), container_r.end() ); }
529 template <
class TIterator>
531 {
for_( it, begin_r, end_r )
if (
hasContent( *it ) )
return true;
return false; }
533 template <
class TContainer>
535 {
return hasContentAny( container_r.begin(), container_r.end() ); }
551 bool hasLicense()
const;
553 bool hasLicense(
const std::string & name_r )
const;
558 bool needToAcceptLicense()
const;
560 bool needToAcceptLicense(
const std::string & name_r )
const;
563 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
565 std::string getLicense(
const Locale & lang_r =
Locale() );
567 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
575 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
582 bool requireStatusWithMediaFile ()
const;
589 std::ostream &
dumpOn( std::ostream &
str )
const override;
595 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
605 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
617 std::string repoStatusString()
const;
'Language[_Country]' codes.
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
void setMetalinkUrl(const Url &url)
Set the raw metalink url.
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
void setMirrorlistUrl(const Url &url)
Set the raw mirrorlist url.
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
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
Url rawCfgMetalinkUrl() const
The configured raw metalink url.
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).
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
Url rawCfgMirrorlistUrl() const
The configured raw mirrorlist url.
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 ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3....
#define for_(IT, BEG, END)
Convenient for-loops using iterator.