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 );
192 bool repoOriginsEmpty()
const;
219 void setPath(
const Pathname &path );
225 Url mirrorListUrl()
const;
230 Url rawMirrorListUrl()
const;
233 void setMirrorlistUrl(
const Url &url );
235 void setMetalinkUrl(
const Url &url );
238 Url rawCfgMirrorlistUrl()
const;
240 Url rawCfgMetalinkUrl()
const;
305 void setMetadataPath(
const Pathname &path );
308 bool usesAutoMetadataPaths()
const;
319 void setPackagesPath(
const Pathname &path );
384 bool gpgCheck()
const;
386 void setGpgCheck(
TriBool value_r );
388 void setGpgCheck(
bool value_r );
391 bool repoGpgCheck()
const;
393 bool repoGpgCheckIsMandatory()
const;
395 void setRepoGpgCheck(
TriBool value_r );
398 bool pkgGpgCheck()
const;
400 bool pkgGpgCheckIsMandatory()
const;
402 void setPkgGpgCheck(
TriBool value_r );
407 TriBool validRepoSignature()
const;
409 void setValidRepoSignature(
TriBool value_r );
418 AllowUnsignedPackage,
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>
501 {
for_( it, begin_r, end_r ) addContent( *it ); }
503 template <
class TContainer>
505 { addContentFrom( container_r.begin(), container_r.end() ); }
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;
637 #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...
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
void addContentFrom(const TContainer &container_r)
Repository type enumeration.