12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 32 #include <zypp-core/ui/ProgressData> 96 RefreshService_restoreStatus = (1<<0),
97 RefreshService_forceRefresh = (1<<1),
112 bool repoEmpty()
const;
120 {
return std::list<RepoInfo>(repoBegin(),repoEnd()); }
123 RepoInfo getRepo(
const std::string & alias )
const;
126 {
return getRepo( info_r.
alias() ); }
129 bool hasRepo(
const std::string & alias )
const;
132 {
return hasRepo( info_r.
alias() ); }
137 static std::string makeStupidAlias(
const Url & url_r =
Url() );
264 void cleanMetadata(
const RepoInfo &info,
275 void cleanPackages(
const RepoInfo &info,
302 CacheBuildPolicy policy = BuildIfNeeded,
317 void cleanCache(
const RepoInfo &info,
325 bool isCached(
const RepoInfo &info )
const;
337 void loadFromCache(
const RepoInfo &info,
377 void addRepository(
const RepoInfo &info,
392 void addRepositories(
const Url &url,
399 void removeRepository(
const RepoInfo & info,
411 void modifyRepository(
const std::string &alias,
417 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
432 RepoInfo getRepositoryInfo(
const std::string &alias,
471 bool serviceEmpty()
const;
478 ServiceSizeType serviceSize()
const;
485 ServiceConstIterator serviceBegin()
const;
491 ServiceConstIterator serviceEnd()
const;
498 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
506 ServiceInfo getService(
const std::string & alias )
const;
509 bool hasService(
const std::string & alias )
const;
525 void addService(
const std::string & alias,
const Url& url );
544 void removeService(
const std::string & alias );
554 void refreshServices(
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
564 void refreshService(
const std::string & alias,
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
566 void refreshService(
const ServiceInfo & service,
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
584 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
587 { modifyService( service.
alias(), service ); }
604 {
return info.
service() == alias; }
643 template<
typename OutputIterator>
645 OutputIterator out )
const 649 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
650 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
675 #endif // ZYPP2_REPOMANAGER_H RefreshCheckStatus
Possibly return state of checkIfRefreshMEtadata function.
ZYPP_DECLARE_FLAGS(VendorSupportOptions, VendorSupportOption)
RepoSet::size_type RepoSizeType
refresh is delayed due to settings
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
RefreshCheckStatus
Possibly return state of checkIfRefreshMEtadata function.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(DiskUsageCounter::MountPoint::HintFlags)
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.
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_)
AsyncOpRef< expected< repo::RefreshCheckStatus > > checkIfToRefreshMetadata(repo::AsyncRefreshContextRef refCtx, ProvideMediaHandle medium, ProgressObserverRef progressObserver=nullptr)
ServiceSet::size_type ServiceSizeType
Iterable< RepoConstIterator > repos() const
Iterate the known repositories.
ServiceConstIterator serviceBegin() const
Iterator to first service in internal storage.
RefreshServiceBit
Flags for tuning RefreshService.
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.
RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
bool operator()(const RepoInfo &info) const
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
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)
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > refreshMetadata(repo::AsyncRefreshContextRef refCtx, ProvideMediaHandle medium, ProgressObserverRef progressObserver)
Track changing files or directories.
Iterable< ServiceConstIterator > services() const
Iterate the known services.
Easy-to use interface to the ZYPP dependency resolver.
RepoConstIterator repoEnd() const
std::list< ServiceInfo > knownServices() const
List of known services.
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > buildCache(repo::AsyncRefreshContextRef refCtx, ProgressObserverRef progressObserver=nullptr)
Repository type enumeration.
ServiceSet::const_iterator ServiceConstIterator