libzypp 17.34.1
zypp::RepoManagerBaseImpl Struct Referenceabstract

#include <zypp/zypp_detail/repomanagerbase_p.h>

Inheritance diagram for zypp::RepoManagerBaseImpl:

Classes

struct  MatchServiceAlias
 Functor thats filter RepoInfo by service which it belongs to. More...
 

Public Types

using ServiceSet = std::set<ServiceInfo>
 ServiceInfo typedefs.
 
using ServiceConstIterator = ServiceSet::const_iterator
 
using ServiceSizeType = ServiceSet::size_type
 
using RepoSet = std::set<RepoInfo>
 RepoInfo typedefs.
 
using RepoConstIterator = RepoSet::const_iterator
 
using RepoSizeType = RepoSet::size_type
 

Public Member Functions

 RepoManagerBaseImpl (RepoManagerOptions &&opt)
 
virtual ~RepoManagerBaseImpl ()
 
bool repoEmpty () const
 
RepoSizeType repoSize () const
 
RepoConstIterator repoBegin () const
 
RepoConstIterator repoEnd () const
 
bool hasRepo (const std::string &alias) const
 
RepoInfo getRepo (const std::string &alias) const
 
Pathname metadataPath (const RepoInfo &info) const
 
Pathname packagesPath (const RepoInfo &info) const
 
RepoStatus metadataStatus (const RepoInfo &info) const
 
void cleanMetadata (const RepoInfo &info, OPT_PROGRESS)
 
void cleanPackages (const RepoInfo &info, OPT_PROGRESS, bool isAutoClean=false)
 
void cleanCacheDirGarbage (OPT_PROGRESS)
 
void cleanCache (const RepoInfo &info, OPT_PROGRESS)
 
bool isCached (const RepoInfo &info) const
 
RepoStatus cacheStatus (const RepoInfo &info) const
 
void loadFromCache (const RepoInfo &info, OPT_PROGRESS)
 
void addProbedRepository (const RepoInfo &info, repo::RepoType probedType)
 
virtual void removeRepository (const RepoInfo &info, OPT_PROGRESS)=0
 
void modifyRepository (const std::string &alias, const RepoInfo &newinfo_r, OPT_PROGRESS)
 
RepoInfo getRepositoryInfo (const std::string &alias)
 
RepoInfo getRepositoryInfo (const Url &url, const url::ViewOption &urlview)
 
bool serviceEmpty () const
 
ServiceSizeType serviceSize () const
 
ServiceConstIterator serviceBegin () const
 
ServiceConstIterator serviceEnd () const
 
bool hasService (const std::string &alias) const
 
ServiceInfo getService (const std::string &alias) const
 
void addService (const ServiceInfo &service)
 
void addService (const std::string &alias, const Url &url)
 
void removeService (const std::string &alias)
 
void removeService (const ServiceInfo &service)
 
void modifyService (const std::string &oldAlias, const ServiceInfo &newService)
 

Static Public Member Functions

static RepoStatus metadataStatus (const RepoInfo &info, const RepoManagerOptions &options)
 
static repo::RepoType probeCache (const Pathname &path_r)
 Probe Metadata in a local cache directory.
 
static RepoStatus cacheStatus (const RepoInfo &info, const RepoManagerOptions &options)
 
static void touchIndexFile (const RepoInfo &info, const RepoManagerOptions &options)
 

Protected Member Functions

void removeRepositoryImpl (const RepoInfo &info, OPT_PROGRESS)
 
void saveService (ServiceInfo &service) const
 
Pathname generateNonExistingName (const Pathname &dir, const std::string &basefilename) const
 Generate a non existing filename in a directory, using a base name.
 
std::string generateFilename (const RepoInfo &info) const
 
std::string generateFilename (const ServiceInfo &info) const
 
void setCacheStatus (const RepoInfo &info, const RepoStatus &status)
 
void touchIndexFile (const RepoInfo &info)
 
template<typename OutputIterator >
void getRepositoriesInService (const std::string &alias, OutputIterator out) const
 
void init_knownServices ()
 
void init_knownRepositories ()
 
const RepoSetrepos () const
 
RepoSetreposManip ()
 

Protected Attributes

RepoManagerOptions _options
 
RepoSet _reposX
 
ServiceSet _services
 
DefaultIntegral< bool, false > _reposDirty
 

Detailed Description

Definition at line 213 of file repomanagerbase_p.h.

Member Typedef Documentation

◆ ServiceSet

ServiceInfo typedefs.

Definition at line 231 of file repomanagerbase_p.h.

◆ ServiceConstIterator

using zypp::RepoManagerBaseImpl::ServiceConstIterator = ServiceSet::const_iterator

Definition at line 232 of file repomanagerbase_p.h.

◆ ServiceSizeType

using zypp::RepoManagerBaseImpl::ServiceSizeType = ServiceSet::size_type

Definition at line 233 of file repomanagerbase_p.h.

◆ RepoSet

RepoInfo typedefs.

Definition at line 236 of file repomanagerbase_p.h.

◆ RepoConstIterator

using zypp::RepoManagerBaseImpl::RepoConstIterator = RepoSet::const_iterator

Definition at line 237 of file repomanagerbase_p.h.

◆ RepoSizeType

using zypp::RepoManagerBaseImpl::RepoSizeType = RepoSet::size_type

Definition at line 238 of file repomanagerbase_p.h.

Constructor & Destructor Documentation

◆ RepoManagerBaseImpl()

zypp::RepoManagerBaseImpl::RepoManagerBaseImpl ( RepoManagerOptions && opt)

Definition at line 162 of file repomanagerbase_p.cc.

◆ ~RepoManagerBaseImpl()

zypp::RepoManagerBaseImpl::~RepoManagerBaseImpl ( )
virtual

Definition at line 166 of file repomanagerbase_p.cc.

Member Function Documentation

◆ repoEmpty()

bool zypp::RepoManagerBaseImpl::repoEmpty ( ) const
inline

Definition at line 246 of file repomanagerbase_p.h.

◆ repoSize()

RepoSizeType zypp::RepoManagerBaseImpl::repoSize ( ) const
inline

Definition at line 247 of file repomanagerbase_p.h.

◆ repoBegin()

RepoConstIterator zypp::RepoManagerBaseImpl::repoBegin ( ) const
inline

Definition at line 248 of file repomanagerbase_p.h.

◆ repoEnd()

RepoConstIterator zypp::RepoManagerBaseImpl::repoEnd ( ) const
inline

Definition at line 249 of file repomanagerbase_p.h.

◆ hasRepo()

bool zypp::RepoManagerBaseImpl::hasRepo ( const std::string & alias) const
inline

Definition at line 251 of file repomanagerbase_p.h.

◆ getRepo()

RepoInfo zypp::RepoManagerBaseImpl::getRepo ( const std::string & alias) const
inline

Definition at line 254 of file repomanagerbase_p.h.

◆ metadataPath()

Pathname zypp::RepoManagerBaseImpl::metadataPath ( const RepoInfo & info) const
inline

Definition at line 261 of file repomanagerbase_p.h.

◆ packagesPath()

Pathname zypp::RepoManagerBaseImpl::packagesPath ( const RepoInfo & info) const
inline

Definition at line 264 of file repomanagerbase_p.h.

◆ metadataStatus() [1/2]

RepoStatus zypp::RepoManagerBaseImpl::metadataStatus ( const RepoInfo & info,
const RepoManagerOptions & options )
static

Definition at line 171 of file repomanagerbase_p.cc.

◆ metadataStatus() [2/2]

RepoStatus zypp::RepoManagerBaseImpl::metadataStatus ( const RepoInfo & info) const

Definition at line 218 of file repomanagerbase_p.cc.

◆ cleanMetadata()

void zypp::RepoManagerBaseImpl::cleanMetadata ( const RepoInfo & info,
OPT_PROGRESS  )

Definition at line 223 of file repomanagerbase_p.cc.

◆ cleanPackages()

void zypp::RepoManagerBaseImpl::cleanPackages ( const RepoInfo & info,
OPT_PROGRESS ,
bool isAutoClean = false )

Definition at line 232 of file repomanagerbase_p.cc.

◆ probeCache()

repo::RepoType zypp::RepoManagerBaseImpl::probeCache ( const Pathname & path_r)
static

Probe Metadata in a local cache directory.

Note
Metadata in local cache directories must not be probed using probe as a cache path must not be rewritten (bnc#946129)

Definition at line 250 of file repomanagerbase_p.cc.

◆ cleanCacheDirGarbage()

void zypp::RepoManagerBaseImpl::cleanCacheDirGarbage ( OPT_PROGRESS )

Definition at line 267 of file repomanagerbase_p.cc.

◆ cleanCache()

void zypp::RepoManagerBaseImpl::cleanCache ( const RepoInfo & info,
OPT_PROGRESS  )

Definition at line 312 of file repomanagerbase_p.cc.

◆ isCached()

bool zypp::RepoManagerBaseImpl::isCached ( const RepoInfo & info) const
inline

Definition at line 280 of file repomanagerbase_p.h.

◆ cacheStatus() [1/2]

RepoStatus zypp::RepoManagerBaseImpl::cacheStatus ( const RepoInfo & info) const
inline

Definition at line 283 of file repomanagerbase_p.h.

◆ cacheStatus() [2/2]

static RepoStatus zypp::RepoManagerBaseImpl::cacheStatus ( const RepoInfo & info,
const RepoManagerOptions & options )
inlinestatic

Definition at line 286 of file repomanagerbase_p.h.

◆ loadFromCache()

void zypp::RepoManagerBaseImpl::loadFromCache ( const RepoInfo & info,
OPT_PROGRESS  )

Definition at line 324 of file repomanagerbase_p.cc.

◆ addProbedRepository()

void zypp::RepoManagerBaseImpl::addProbedRepository ( const RepoInfo & info,
repo::RepoType probedType )

Definition at line 344 of file repomanagerbase_p.cc.

◆ removeRepository()

virtual void zypp::RepoManagerBaseImpl::removeRepository ( const RepoInfo & info,
OPT_PROGRESS  )
pure virtual

Implemented in zypp::RepoManager::Impl.

◆ modifyRepository()

void zypp::RepoManagerBaseImpl::modifyRepository ( const std::string & alias,
const RepoInfo & newinfo_r,
OPT_PROGRESS  )

Definition at line 471 of file repomanagerbase_p.cc.

◆ getRepositoryInfo() [1/2]

RepoInfo zypp::RepoManagerBaseImpl::getRepositoryInfo ( const std::string & alias)

Definition at line 545 of file repomanagerbase_p.cc.

◆ getRepositoryInfo() [2/2]

RepoInfo zypp::RepoManagerBaseImpl::getRepositoryInfo ( const Url & url,
const url::ViewOption & urlview )

Definition at line 556 of file repomanagerbase_p.cc.

◆ serviceEmpty()

bool zypp::RepoManagerBaseImpl::serviceEmpty ( ) const
inline

Definition at line 301 of file repomanagerbase_p.h.

◆ serviceSize()

ServiceSizeType zypp::RepoManagerBaseImpl::serviceSize ( ) const
inline

Definition at line 302 of file repomanagerbase_p.h.

◆ serviceBegin()

ServiceConstIterator zypp::RepoManagerBaseImpl::serviceBegin ( ) const
inline

Definition at line 303 of file repomanagerbase_p.h.

◆ serviceEnd()

ServiceConstIterator zypp::RepoManagerBaseImpl::serviceEnd ( ) const
inline

Definition at line 304 of file repomanagerbase_p.h.

◆ hasService()

bool zypp::RepoManagerBaseImpl::hasService ( const std::string & alias) const
inline

Definition at line 306 of file repomanagerbase_p.h.

◆ getService()

ServiceInfo zypp::RepoManagerBaseImpl::getService ( const std::string & alias) const
inline

Definition at line 309 of file repomanagerbase_p.h.

◆ addService() [1/2]

void zypp::RepoManagerBaseImpl::addService ( const ServiceInfo & service)

Definition at line 571 of file repomanagerbase_p.cc.

◆ addService() [2/2]

void zypp::RepoManagerBaseImpl::addService ( const std::string & alias,
const Url & url )
inline

Definition at line 317 of file repomanagerbase_p.h.

◆ removeService() [1/2]

void zypp::RepoManagerBaseImpl::removeService ( const std::string & alias)

Definition at line 593 of file repomanagerbase_p.cc.

◆ removeService() [2/2]

void zypp::RepoManagerBaseImpl::removeService ( const ServiceInfo & service)
inline

Definition at line 321 of file repomanagerbase_p.h.

◆ modifyService()

void zypp::RepoManagerBaseImpl::modifyService ( const std::string & oldAlias,
const ServiceInfo & newService )
Todo
refresh the service automatically if url is changed?

Definition at line 647 of file repomanagerbase_p.cc.

◆ touchIndexFile() [1/2]

void zypp::RepoManagerBaseImpl::touchIndexFile ( const RepoInfo & info,
const RepoManagerOptions & options )
static

Definition at line 768 of file repomanagerbase_p.cc.

◆ removeRepositoryImpl()

void zypp::RepoManagerBaseImpl::removeRepositoryImpl ( const RepoInfo & info,
OPT_PROGRESS  )
protected

Definition at line 384 of file repomanagerbase_p.cc.

◆ saveService()

void zypp::RepoManagerBaseImpl::saveService ( ServiceInfo & service) const
protected

Definition at line 721 of file repomanagerbase_p.cc.

◆ generateNonExistingName()

Pathname zypp::RepoManagerBaseImpl::generateNonExistingName ( const Pathname & dir,
const std::string & basefilename ) const
protected

Generate a non existing filename in a directory, using a base name.

For example if a directory contains 3 files

|– bar |– foo `– moo

If you try to generate a unique filename for this directory, based on "ruu" you will get "ruu", but if you use the base "foo" you will get "foo_1"

Parameters
dirDirectory where the file needs to be unique
basefilenamestring to base the filename on.

Definition at line 755 of file repomanagerbase_p.cc.

◆ generateFilename() [1/2]

std::string zypp::RepoManagerBaseImpl::generateFilename ( const RepoInfo & info) const
inlineprotected

Definition at line 334 of file repomanagerbase_p.h.

◆ generateFilename() [2/2]

std::string zypp::RepoManagerBaseImpl::generateFilename ( const ServiceInfo & info) const
inlineprotected

Definition at line 337 of file repomanagerbase_p.h.

◆ setCacheStatus()

void zypp::RepoManagerBaseImpl::setCacheStatus ( const RepoInfo & info,
const RepoStatus & status )
inlineprotected

Definition at line 340 of file repomanagerbase_p.h.

◆ touchIndexFile() [2/2]

void zypp::RepoManagerBaseImpl::touchIndexFile ( const RepoInfo & info)
protected

Definition at line 804 of file repomanagerbase_p.cc.

◆ getRepositoriesInService()

template<typename OutputIterator >
void zypp::RepoManagerBaseImpl::getRepositoriesInService ( const std::string & alias,
OutputIterator out ) const
inlineprotected

Definition at line 350 of file repomanagerbase_p.h.

◆ init_knownServices()

void zypp::RepoManagerBaseImpl::init_knownServices ( )
protected

Definition at line 809 of file repomanagerbase_p.cc.

◆ init_knownRepositories()

void zypp::RepoManagerBaseImpl::init_knownRepositories ( )
protected

Definition at line 874 of file repomanagerbase_p.cc.

◆ repos()

const RepoSet & zypp::RepoManagerBaseImpl::repos ( ) const
inlineprotected

Definition at line 362 of file repomanagerbase_p.h.

◆ reposManip()

RepoSet & zypp::RepoManagerBaseImpl::reposManip ( )
inlineprotected

Definition at line 363 of file repomanagerbase_p.h.

Member Data Documentation

◆ _options

RepoManagerOptions zypp::RepoManagerBaseImpl::_options
protected

Definition at line 366 of file repomanagerbase_p.h.

◆ _reposX

RepoSet zypp::RepoManagerBaseImpl::_reposX
protected

Definition at line 367 of file repomanagerbase_p.h.

◆ _services

ServiceSet zypp::RepoManagerBaseImpl::_services
protected

Definition at line 368 of file repomanagerbase_p.h.

◆ _reposDirty

DefaultIntegral<bool,false> zypp::RepoManagerBaseImpl::_reposDirty
protected

Definition at line 370 of file repomanagerbase_p.h.


The documentation for this struct was generated from the following files: