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;
314 Pathname systemPackagesPath()
const;
329 void setPackagesPath(
const Pathname &path );
394 bool gpgCheck()
const;
396 void setGpgCheck(
TriBool value_r );
398 void setGpgCheck(
bool value_r );
401 bool repoGpgCheck()
const;
403 bool repoGpgCheckIsMandatory()
const;
405 void setRepoGpgCheck(
TriBool value_r );
408 bool pkgGpgCheck()
const;
410 bool pkgGpgCheckIsMandatory()
const;
412 void setPkgGpgCheck(
TriBool value_r );
417 TriBool validRepoSignature()
const;
419 void setValidRepoSignature(
TriBool value_r );
428 AllowUnsignedPackage,
437 bool setGpgCheck( GpgCheck mode_r );
442 bool gpgKeyUrlsEmpty()
const;
444 urls_size_type gpgKeyUrlsSize()
const;
447 url_set gpgKeyUrls()
const;
449 url_set rawGpgKeyUrls()
const;
451 void setGpgKeyUrls( url_set urls );
454 Url gpgKeyUrl()
const;
456 Url rawGpgKeyUrl()
const;
458 void setGpgKeyUrl(
const Url &gpgkey );
463 bool keepPackages()
const;
473 void setKeepPackages(
bool keep );
479 bool effectiveKeepPackages()
const;
485 std::string service()
const;
489 void setService(
const std::string& name );
494 std::string targetDistribution()
const;
500 void setTargetDistribution(
const std::string & targetDistribution);
504 const std::set<std::string> & contentKeywords()
const;
507 void addContent(
const std::string & keyword_r );
509 template <
class TIterator>
511 {
for_( it, begin_r, end_r ) addContent( *it ); }
513 template <
class TContainer>
515 { addContentFrom( container_r.begin(), container_r.end() ); }
520 bool hasContent()
const;
522 bool hasContent(
const std::string & keyword_r )
const;
524 template <
class TIterator>
526 {
for_( it, begin_r, end_r )
if ( ! hasContent( *it ) )
return false;
return true; }
528 template <
class TContainer>
530 {
return hasContentAll( container_r.begin(), container_r.end() ); }
532 template <
class TIterator>
534 {
for_( it, begin_r, end_r )
if ( hasContent( *it ) )
return true;
return false; }
536 template <
class TContainer>
538 {
return hasContentAny( container_r.begin(), container_r.end() ); }
554 bool hasLicense()
const;
556 bool hasLicense(
const std::string & name_r )
const;
561 bool needToAcceptLicense()
const;
563 bool needToAcceptLicense(
const std::string & name_r )
const;
566 std::string getLicense(
const Locale & lang_r =
Locale() )
const;
568 std::string getLicense(
const Locale & lang_r =
Locale() );
570 std::string getLicense(
const std::string & name_r,
const Locale & lang_r =
Locale() )
const;
578 LocaleSet getLicenseLocales(
const std::string & name_r )
const;
585 bool requireStatusWithMediaFile ()
const;
592 std::ostream &
dumpOn( std::ostream &
str )
const override;
598 std::ostream & dumpAsIniOn( std::ostream &
str )
const override;
608 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
620 std::string repoStatusString()
const;
647 #endif // ZYPP2_REPOSITORYINFO_H
bool hasContentAll(TIterator begin_r, TIterator end_r) const
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3...
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::unordered_set< Locale > LocaleSet
String related utilities and Regular expression matching.
std::list< RepoInfo > RepoInfoList
relates: RepoInfo
What is known about a repository.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Request the standard behavior (as defined in zypp.conf or 'Job')
bool hasContentAny(TIterator begin_r, TIterator end_r) const
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
bool hasContentAll(const TContainer &container_r) const
GpgCheck
Some predefined settings.
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Provides API related macros.
url_set::size_type urls_size_type
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
bool hasContentAny(const TContainer &container_r) const
'Language[_Country]' codes.
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
relates: Repository XML output
shared_ptr< const RepoInfo > RepoInfo_constPtr
relates: RepoInfo
void addContentFrom(TIterator begin_r, TIterator end_r)
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
shared_ptr< RepoInfo > RepoInfo_Ptr
relates: RepoInfo
Base class implementing common features of RepoInfo and ServiceInfo.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Easy-to use interface to the ZYPP dependency resolver.
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
void addContentFrom(const TContainer &container_r)
Repository type enumeration.