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;
137 {
return( baseUrlsEmpty() ?
Url() : *baseUrlsBegin()); }
149 url_set baseUrls()
const;
153 url_set rawBaseUrls()
const;
162 void addBaseUrl(
Url url );
166 void setBaseUrl(
Url url );
170 void setBaseUrls( url_set urls );
197 void setPath(
const Pathname &path );
202 Url mirrorListUrl()
const;
206 Url rawMirrorListUrl()
const;
211 void setMirrorListUrl(
const Url &url );
213 void setMirrorListUrls( url_set urls );
216 void setMetalinkUrl(
const Url &url );
218 void setMetalinkUrls( url_set urls );
271 void setMetadataPath(
const Pathname &path );
274 bool usesAutoMetadataPaths()
const;
285 void setPackagesPath(
const Pathname &path );
345 bool gpgCheck()
const;
347 void setGpgCheck(
TriBool value_r );
349 void setGpgCheck(
bool value_r );
352 bool repoGpgCheck()
const;
354 bool repoGpgCheckIsMandatory()
const;
356 void setRepoGpgCheck(
TriBool value_r );
359 bool pkgGpgCheck()
const;
361 bool pkgGpgCheckIsMandatory()
const;
363 void setPkgGpgCheck(
TriBool value_r );
368 TriBool validRepoSignature()
const;
370 void setValidRepoSignature(
TriBool value_r );
379 AllowUnsignedPackage,
388 bool setGpgCheck( GpgCheck mode_r );
393 bool gpgKeyUrlsEmpty()
const;
395 urls_size_type gpgKeyUrlsSize()
const;
398 url_set gpgKeyUrls()
const;
400 url_set rawGpgKeyUrls()
const;
402 void setGpgKeyUrls( url_set urls );
405 Url gpgKeyUrl()
const;
407 Url rawGpgKeyUrl()
const;
409 void setGpgKeyUrl(
const Url &gpgkey );
417 bool keepPackages()
const;
427 void setKeepPackages(
bool keep );
433 bool effectiveKeepPackages()
const;
439 std::string service()
const;
443 void setService(
const std::string& name );
448 std::string targetDistribution()
const;
454 void setTargetDistribution(
const std::string & targetDistribution);
458 const std::set<std::string> & contentKeywords()
const;
461 void addContent(
const std::string & keyword_r );
463 template <
class TIterator>
465 {
for_( it, begin_r, end_r ) addContent( *it ); }
467 template <
class TContainer>
469 { addContentFrom( container_r.begin(), container_r.end() ); }
474 bool hasContent()
const;
476 bool hasContent(
const std::string & keyword_r )
const;
478 template <
class TIterator>
480 {
for_( it, begin_r, end_r )
if ( ! hasContent( *it ) )
return false;
return true; }
482 template <
class TContainer>
484 {
return hasContentAll( container_r.begin(), container_r.end() ); }
486 template <
class TIterator>
488 {
for_( it, begin_r, end_r )
if ( hasContent( *it ) )
return true;
return false; }
490 template <
class TContainer>
492 {
return hasContentAny( container_r.begin(), container_r.end() ); }
508 bool hasLicense()
const;
510 bool hasLicense(
const std::string & name_r )
const;
515 bool needToAcceptLicense()
const;
517 bool needToAcceptLicense(
const std::string & name_r )
const;
520 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
522 std::string getLicense(
const Locale & lang_r =
Locale() );
524 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
532 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
539 bool requireStatusWithMediaFile ()
const;
546 std::ostream &
dumpOn( std::ostream &
str )
const override;
552 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
562 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
594 #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
Url url() const
Pars pro toto: The first repository url.
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.
zypp::Pathname provideKey(SyncContextRef ctx, zypp::RepoInfo info, std::string keyID_r, zypp::Pathname targetDirectory_r)
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.
void addContentFrom(const TContainer &container_r)
Repository type enumeration.