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 );
350 bool gpgCheck()
const;
352 void setGpgCheck(
TriBool value_r );
354 void setGpgCheck(
bool value_r );
357 bool repoGpgCheck()
const;
359 bool repoGpgCheckIsMandatory()
const;
361 void setRepoGpgCheck(
TriBool value_r );
364 bool pkgGpgCheck()
const;
366 bool pkgGpgCheckIsMandatory()
const;
368 void setPkgGpgCheck(
TriBool value_r );
373 TriBool validRepoSignature()
const;
375 void setValidRepoSignature(
TriBool value_r );
384 AllowUnsignedPackage,
393 bool setGpgCheck( GpgCheck mode_r );
398 bool gpgKeyUrlsEmpty()
const;
400 urls_size_type gpgKeyUrlsSize()
const;
403 url_set gpgKeyUrls()
const;
405 url_set rawGpgKeyUrls()
const;
407 void setGpgKeyUrls( url_set urls );
410 Url gpgKeyUrl()
const;
412 Url rawGpgKeyUrl()
const;
414 void setGpgKeyUrl(
const Url &gpgkey );
422 bool keepPackages()
const;
432 void setKeepPackages(
bool keep );
438 bool effectiveKeepPackages()
const;
444 std::string service()
const;
448 void setService(
const std::string& name );
453 std::string targetDistribution()
const;
459 void setTargetDistribution(
const std::string & targetDistribution);
463 const std::set<std::string> & contentKeywords()
const;
466 void addContent(
const std::string & keyword_r );
468 template <
class TIterator>
470 {
for_( it, begin_r, end_r ) addContent( *it ); }
472 template <
class TContainer>
474 { addContentFrom( container_r.begin(), container_r.end() ); }
479 bool hasContent()
const;
481 bool hasContent(
const std::string & keyword_r )
const;
483 template <
class TIterator>
485 {
for_( it, begin_r, end_r )
if ( ! hasContent( *it ) )
return false;
return true; }
487 template <
class TContainer>
489 {
return hasContentAll( container_r.begin(), container_r.end() ); }
491 template <
class TIterator>
493 {
for_( it, begin_r, end_r )
if ( hasContent( *it ) )
return true;
return false; }
495 template <
class TContainer>
497 {
return hasContentAny( container_r.begin(), container_r.end() ); }
513 bool hasLicense()
const;
515 bool hasLicense(
const std::string & name_r )
const;
520 bool needToAcceptLicense()
const;
522 bool needToAcceptLicense(
const std::string & name_r )
const;
525 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
527 std::string getLicense(
const Locale & lang_r =
Locale() );
529 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
537 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
544 bool requireStatusWithMediaFile ()
const;
551 std::ostream &
dumpOn( std::ostream &
str )
const override;
557 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
567 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
579 std::string repoStatusString()
const;
606 #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.