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() );
256 void cleanMetadata(
const RepoInfo &info,
267 void cleanPackages(
const RepoInfo &info,
310 void cleanCache(
const RepoInfo &info,
318 bool isCached(
const RepoInfo &info )
const;
330 void loadFromCache(
const RepoInfo &info,
392 void removeRepository(
const RepoInfo & info,
404 void modifyRepository(
const std::string &alias,
410 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
425 RepoInfo getRepositoryInfo(
const std::string &alias,
464 bool serviceEmpty()
const;
471 ServiceSizeType serviceSize()
const;
478 ServiceConstIterator serviceBegin()
const;
484 ServiceConstIterator serviceEnd()
const;
491 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
499 ServiceInfo getService(
const std::string & alias )
const;
502 bool hasService(
const std::string & alias )
const;
518 void addService(
const std::string & alias,
const Url& url );
537 void removeService(
const std::string & alias );
577 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
580 { modifyService( service.
alias(), service ); }
597 {
return info.
service() == alias; }
636 template<
typename OutputIterator>
638 OutputIterator out )
const 642 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
643 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
667 #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.
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