12#ifndef ZYPP2_REPOSITORYINFO_H
13#define ZYPP2_REPOSITORYINFO_H
427 bool setGpgCheck( GpgCheck mode_r );
432 bool gpgKeyUrlsEmpty()
const;
434 urls_size_type gpgKeyUrlsSize()
const;
437 url_set gpgKeyUrls()
const;
439 url_set rawGpgKeyUrls()
const;
441 void setGpgKeyUrls( url_set urls );
444 Url gpgKeyUrl()
const;
446 Url rawGpgKeyUrl()
const;
448 void setGpgKeyUrl(
const Url &gpgkey );
453 bool keepPackages()
const;
463 void setKeepPackages(
bool keep );
469 bool effectiveKeepPackages()
const;
475 std::string service()
const;
479 void setService(
const std::string& name );
484 std::string targetDistribution()
const;
490 void setTargetDistribution(
const std::string & targetDistribution);
494 const std::set<std::string> & contentKeywords()
const;
497 void addContent(
const std::string & keyword_r );
499 template <
class TIterator>
503 template <
class TContainer>
510 bool hasContent()
const;
512 bool hasContent(
const std::string & keyword_r )
const;
514 template <
class TIterator>
516 {
for_( it, begin_r, end_r )
if ( !
hasContent( *it ) )
return false;
return true; }
518 template <
class TContainer>
520 {
return hasContentAll( container_r.begin(), container_r.end() ); }
522 template <
class TIterator>
524 {
for_( it, begin_r, end_r )
if (
hasContent( *it ) )
return true;
return false; }
526 template <
class TContainer>
528 {
return hasContentAny( container_r.begin(), container_r.end() ); }
544 bool hasLicense()
const;
546 bool hasLicense(
const std::string & name_r )
const;
551 bool needToAcceptLicense()
const;
553 bool needToAcceptLicense(
const std::string & name_r )
const;
556 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
558 std::string getLicense(
const Locale & lang_r =
Locale() );
560 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
568 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
575 bool requireStatusWithMediaFile ()
const;
582 std::ostream &
dumpOn( std::ostream &
str )
const override;
588 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
598 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
610 std::string repoStatusString()
const;
'Language[_Country]' codes.
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
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.
MirroredOriginSet repoOrigins() const
The repodata origins.
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,.
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.
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
Url rawCfgMirrorlistUrl() const
The configured raw mirrorlist url.
bool repoOriginsEmpty() const
whether repo origins are available
Base class implementing common features of RepoInfo and ServiceInfo.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
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)
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.