12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 33 #include <zypp-core/ui/ProgressData> 108 bool repoEmpty()
const;
116 {
return std::list<RepoInfo>(repoBegin(),repoEnd()); }
119 RepoInfo getRepo(
const std::string & alias )
const;
122 {
return getRepo( info_r.
alias() ); }
125 bool hasRepo(
const std::string & alias )
const;
128 {
return hasRepo( info_r.
alias() ); }
133 static std::string makeStupidAlias(
const Url & url_r =
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,
406 void removeRepository(
const RepoInfo & info,
418 void modifyRepository(
const std::string &alias,
424 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
439 RepoInfo getRepositoryInfo(
const std::string &alias,
478 bool serviceEmpty()
const;
485 ServiceSizeType serviceSize()
const;
492 ServiceConstIterator serviceBegin()
const;
498 ServiceConstIterator serviceEnd()
const;
505 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
513 ServiceInfo getService(
const std::string & alias )
const;
516 bool hasService(
const std::string & alias )
const;
532 void addService(
const std::string & alias,
const Url& url );
551 void removeService(
const std::string & alias );
591 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
594 { modifyService( service.
alias(), service ); }
611 {
return info.
service() == alias; }
650 template<
typename OutputIterator>
652 OutputIterator out )
const 681 #endif // ZYPP2_REPOMANAGER_H
Force restoring repo enabled/disabled status.
RepoSet::size_type RepoSizeType
MaybeAwaitable< expected< repo::RefreshContextRef > > refreshMetadata(repo::RefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
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.
MaybeAwaitable< expected< repo::RefreshContextRef > > buildCache(repo::RefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver)
Iterable< TIterator > makeIterable(TIterator &&begin_r, TIterator &&end_r)
relates: Iterable convenient construction.
Force refresh even if TTL is not reached.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
MaybeAwaitable< expected< void > > refreshService(RepoManagerRef repoMgr, ServiceInfo info, zypp::RepoManagerFlags::RefreshServiceOptions options)
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.
MaybeAwaitable< expected< RepoInfo > > addRepository(RepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress, const zypp::TriBool &forcedProbe)
What is known about a repository.
Url::asString() view options.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
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_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Service type enumeration.
MatchServiceAlias(std::string alias_)
MaybeAwaitable< expected< repo::RefreshCheckStatus > > checkIfToRefreshMetadata(repo::RefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
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
FilterIterator< Pred, Base > make_filter_iterator(Pred p, Base it, Base end)
Helper function to deduce types and construct a FilterIterator.
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
refresh is delayed due to settings
MaybeAwaitable< expected< void > > addRepositories(RepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress)
Functor thats filter RepoInfo by service which it belongs to.
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
RepoSet::const_iterator RepoConstIterator
void modifyService(const ServiceInfo &service)
RefreshCheckStatus
Possibly return state of RepoManager::checkIfToRefreshMetadata function.
Track changing files or directories.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Iterable< ServiceConstIterator > services() const
Iterate the known services.
Easy-to use interface to the ZYPP dependency resolver.
RefreshServiceBit
Flags for tuning RefreshService.
RepoConstIterator repoEnd() const
zypp::RepoManagerOptions RepoManagerOptions
std::list< ServiceInfo > knownServices() const
List of known services.
Repository type enumeration.
ServiceSet::const_iterator ServiceConstIterator