12 #ifndef ZYPP2_REPOSITORYINFO_H 13 #define ZYPP2_REPOSITORYINFO_H 91 static unsigned defaultPriority();
95 static unsigned noPriority();
100 unsigned priority()
const;
106 void setPriority(
unsigned newval_r );
114 bool baseUrlsEmpty()
const;
119 bool baseUrlSet()
const;
149 Url location()
const;
167 void addBaseUrl(
Url url );
171 void setBaseUrl(
Url url );
175 void setBaseUrls(
url_set urls );
180 bool effectiveBaseUrlsEmpty()
const;
191 url_set effectiveBaseUrls()
const;
197 std::vector<std::vector<Url>> groupedBaseUrls()
const;
226 void setPath(
const Pathname &path );
232 Url mirrorListUrl()
const;
237 Url rawMirrorListUrl()
const;
240 void setMirrorlistUrl(
const Url &url );
242 void setMetalinkUrl(
const Url &url );
245 Url rawCfgMirrorlistUrl()
const;
247 Url rawCfgMetalinkUrl()
const;
312 void setMetadataPath(
const Pathname &path );
315 bool usesAutoMetadataPaths()
const;
326 void setPackagesPath(
const Pathname &path );
391 bool gpgCheck()
const;
393 void setGpgCheck(
TriBool value_r );
395 void setGpgCheck(
bool value_r );
398 bool repoGpgCheck()
const;
400 bool repoGpgCheckIsMandatory()
const;
402 void setRepoGpgCheck(
TriBool value_r );
405 bool pkgGpgCheck()
const;
407 bool pkgGpgCheckIsMandatory()
const;
409 void setPkgGpgCheck(
TriBool value_r );
414 TriBool validRepoSignature()
const;
416 void setValidRepoSignature(
TriBool value_r );
425 AllowUnsignedPackage,
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>
508 {
for_( it, begin_r, end_r ) addContent( *it ); }
510 template <
class TContainer>
512 { addContentFrom( container_r.begin(), container_r.end() ); }
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;
644 #endif // ZYPP2_REPOSITORYINFO_H
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
bool hasContentAll(TIterator begin_r, TIterator end_r) const
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::unordered_set< Locale > LocaleSet
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
What is known about a repository.
Request the standard behavior (as defined in zypp.conf or 'Job')
Provides API related macros.
bool hasContentAny(TIterator begin_r, TIterator end_r) const
bool hasContentAll(const TContainer &container_r) const
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
GpgCheck
Some predefined settings.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
shared_ptr< const RepoInfo > RepoInfo_constPtr
url_set::size_type urls_size_type
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
bool hasContentAny(const TContainer &container_r) const
'Language[_Country]' codes.
std::list< RepoInfo > RepoInfoList
void addContentFrom(TIterator begin_r, TIterator end_r)
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
Base class implementing common features of RepoInfo and ServiceInfo.
shared_ptr< RepoInfo > RepoInfo_Ptr
Easy-to use interface to the ZYPP dependency resolver.
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3...
void addContentFrom(const TContainer &container_r)
Repository type enumeration.