12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 33 #include <zypp-core/ui/ProgressData> 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() );
267 void cleanMetadata(
const RepoInfo &info,
278 void cleanPackages(
const RepoInfo &info,
321 void cleanCache(
const RepoInfo &info,
329 bool isCached(
const RepoInfo &info )
const;
341 void loadFromCache(
const RepoInfo &info,
403 void removeRepository(
const RepoInfo & info,
415 void modifyRepository(
const std::string &alias,
421 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
436 RepoInfo getRepositoryInfo(
const std::string &alias,
475 bool serviceEmpty()
const;
482 ServiceSizeType serviceSize()
const;
489 ServiceConstIterator serviceBegin()
const;
495 ServiceConstIterator serviceEnd()
const;
502 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
510 ServiceInfo getService(
const std::string & alias )
const;
513 bool hasService(
const std::string & alias )
const;
529 void addService(
const std::string & alias,
const Url& url );
548 void removeService(
const std::string & alias );
588 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
591 { modifyService( service.
alias(), service ); }
608 {
return info.
service() == alias; }
647 template<
typename OutputIterator>
649 OutputIterator out )
const 653 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
654 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
678 #endif // ZYPP2_REPOMANAGER_H
Force restoring repo enabled/disabled status.
RepoSet::size_type RepoSizeType
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
RepoManagerFlags::RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
Force refresh even if TTL is not reached.
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > refreshMetadata(repo::AsyncRefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
void modifyRepository(const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
bool hasRepo(const RepoInfo &info_r) const
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
What is known about a repository.
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > buildCache(repo::AsyncRefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver)
Url::asString() view options.
RepoInfo getRepo(const RepoInfo &info_r) const
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::set< ServiceInfo > ServiceSet
ServiceInfo typedefs.
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
std::string alias() const
unique identifier for this source.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Service type enumeration.
MatchServiceAlias(std::string alias_)
ServiceSet::size_type ServiceSizeType
Iterable< RepoConstIterator > repos() const
Iterate the known repositories.
RepoManagerFlags::RefreshServiceFlags RefreshServiceFlags
ServiceConstIterator serviceBegin() const
Iterator to first service in internal storage.
ServiceConstIterator serviceEnd() const
Iterator to place behind last service in internal storage.
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
bool operator()(const RepoInfo &info) const
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
refresh is delayed due to settings
Functor thats filter RepoInfo by service which it belongs to.
AsyncOpRef< expected< void > > refreshService(AsyncRepoManagerRef repoMgr, ServiceInfo info, zypp::RepoManagerFlags::RefreshServiceOptions options)
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
RepoSet::const_iterator RepoConstIterator
AsyncOpRef< expected< repo::RefreshCheckStatus > > checkIfToRefreshMetadata(repo::AsyncRefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
void modifyService(const ServiceInfo &service)
RefreshCheckStatus
Possibly return state of RepoManager::checkIfToRefreshMetadata function.
Track changing files or directories.
AsyncOpRef< expected< RepoInfo > > addRepository(AsyncRepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress)
Iterable< ServiceConstIterator > services() const
Iterate the known services.
Easy-to use interface to the ZYPP dependency resolver.
RefreshServiceBit
Flags for tuning RefreshService.
AsyncOpRef< expected< void > > addRepositories(AsyncRepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress)
RepoConstIterator repoEnd() const
zypp::RepoManagerOptions RepoManagerOptions
std::list< ServiceInfo > knownServices() const
List of known services.
Repository type enumeration.
ServiceSet::const_iterator ServiceConstIterator