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 656 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
657 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
681 #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.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
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.
AsyncOpRef< expected< RepoInfo > > addRepository(AsyncRepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress, const zypp::TriBool &forcedProbe)
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.
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