12#ifndef ZYPP_REPOMANAGER_H
13#define ZYPP_REPOMANAGER_H
33#include <zypp-core/ui/ProgressData>
60 friend std::ostream &
operator<<( std::ostream &
str,
const RepoManager & obj );
92 static constexpr RefreshServiceBit RefreshService_restoreStatus = RefreshServiceBit::RefreshService_restoreStatus;
93 static constexpr RefreshServiceBit RefreshService_forceRefresh = RefreshServiceBit::RefreshService_forceRefresh;
107 bool repoEmpty()
const;
115 {
return std::list<RepoInfo>(repoBegin(),repoEnd()); }
118 RepoInfo getRepo(
const std::string & alias )
const;
121 {
return getRepo(
info_r.alias() ); }
124 bool hasRepo(
const std::string & alias )
const;
127 {
return hasRepo(
info_r.alias() ); }
132 static std::string makeStupidAlias(
const Url &
url_r =
Url() );
243 void refreshMetadata(
const RepoInfo &info,
255 void cleanMetadata(
const RepoInfo &info,
266 void cleanPackages(
const RepoInfo &info,
292 void buildCache(
const RepoInfo &info,
308 void cleanCache(
const RepoInfo &info,
316 bool isCached(
const RepoInfo &info )
const;
328 void loadFromCache(
const RepoInfo &info,
368 void addRepository(
const RepoInfo &info,
383 void addRepositories(
const Url &url,
390 void removeRepository(
const RepoInfo & info,
402 void modifyRepository(
const std::string &alias,
423 RepoInfo getRepositoryInfo(
const std::string &alias,
462 bool serviceEmpty()
const;
469 ServiceSizeType serviceSize()
const;
476 ServiceConstIterator serviceBegin()
const;
482 ServiceConstIterator serviceEnd()
const;
489 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
497 ServiceInfo getService(
const std::string & alias )
const;
500 bool hasService(
const std::string & alias )
const;
516 void addService(
const std::string & alias,
const Url& url );
535 void removeService(
const std::string & alias );
545 void refreshServices(
const RefreshServiceOptions &
options_r = RefreshServiceOptions() );
555 void refreshService(
const std::string & alias,
const RefreshServiceOptions &
options_r = RefreshServiceOptions() );
557 void refreshService(
const ServiceInfo & service,
const RefreshServiceOptions &
options_r = RefreshServiceOptions() );
575 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
578 { modifyService( service.
alias(), service ); }
595 {
return info.
service() == alias; }
634 template<
typename OutputIterator>
640 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
641 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
RepoManager implementation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
What is known about a repository.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
Track changing files or directories.
std::string alias() const
unique identifier for this source.
String related utilities and Regular expression matching.
RefreshCheckStatus
Possibly return state of RepoManager::checkIfToRefreshMetadata function.
@ RefreshIfNeededIgnoreDelay
RefreshServiceBit
Flags for tuning RefreshService.
Easy-to use interface to the ZYPP dependency resolver.
std::list< RepoInfo > readRepoFile(const Url &repo_file)
Parses repo_file and returns a list of RepoInfo objects corresponding to repositories found within th...
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Functor thats filter RepoInfo by service which it belongs to.
MatchServiceAlias(std::string alias_)
bool operator()(const RepoInfo &info) const
creates and provides information about known sources.
RepoInfo getRepo(const RepoInfo &info_r) const
ServiceSet::const_iterator ServiceConstIterator
bool hasRepo(const RepoInfo &info_r) const
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::list< ServiceInfo > knownServices() const
List of known services.
ServiceSet::size_type ServiceSizeType
RepoManagerFlags::RefreshServiceFlags RefreshServiceFlags
ServiceConstIterator serviceEnd() const
Iterator to place behind last service in internal storage.
ServiceConstIterator serviceBegin() const
Iterator to first service in internal storage.
void modifyService(const ServiceInfo &service)
Iterable< ServiceConstIterator > services() const
Iterate the known services.
void modifyRepository(const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
RepoSet::size_type RepoSizeType
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
Iterable< RepoConstIterator > repos() const
Iterate the known repositories.
RepoManagerFlags::RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
RepoConstIterator repoEnd() const
RepoSet::const_iterator RepoConstIterator
std::set< ServiceInfo > ServiceSet
ServiceInfo typedefs.
Repository type enumeration.
Service type enumeration.
Url::asString() view options.