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() );
212 const std::vector<Url> &url,
268 void cleanMetadata(
const RepoInfo &info,
279 void cleanPackages(
const RepoInfo &info,
322 void cleanCache(
const RepoInfo &info,
330 bool isCached(
const RepoInfo &info )
const;
342 void loadFromCache(
const RepoInfo &info,
404 void removeRepository(
const RepoInfo & info,
416 void modifyRepository(
const std::string &alias,
422 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
437 RepoInfo getRepositoryInfo(
const std::string &alias,
476 bool serviceEmpty()
const;
483 ServiceSizeType serviceSize()
const;
490 ServiceConstIterator serviceBegin()
const;
496 ServiceConstIterator serviceEnd()
const;
503 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
511 ServiceInfo getService(
const std::string & alias )
const;
514 bool hasService(
const std::string & alias )
const;
530 void addService(
const std::string & alias,
const Url& url );
549 void removeService(
const std::string & alias );
589 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
592 { modifyService( service.
alias(), service ); }
609 {
return info.
service() == alias; }
648 template<
typename OutputIterator>
650 OutputIterator out )
const 654 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
655 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
679 #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