12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 132 RefreshIfNeededIgnoreDelay
144 RefreshService_restoreStatus = (1<<0)
159 bool repoEmpty()
const;
160 RepoSizeType repoSize()
const;
161 RepoConstIterator repoBegin()
const;
162 RepoConstIterator repoEnd()
const;
166 {
return std::list<RepoInfo>(repoBegin(),repoEnd()); }
169 RepoInfo getRepo(
const std::string & alias )
const;
172 {
return getRepo( info_r.
alias() ); }
175 bool hasRepo(
const std::string & alias )
const;
178 {
return hasRepo( info_r.
alias() ); }
183 static std::string makeStupidAlias(
const Url & url_r =
Url() );
268 Pathname metadataPath(
const RepoInfo &info )
const;
281 Pathname packagesPath(
const RepoInfo &info )
const;
298 void refreshMetadata(
const RepoInfo &info,
310 void cleanMetadata(
const RepoInfo &info,
321 void cleanPackages(
const RepoInfo &info,
347 void buildCache(
const RepoInfo &info,
363 void cleanCache(
const RepoInfo &info,
371 bool isCached(
const RepoInfo &info )
const;
383 void loadFromCache(
const RepoInfo &info,
423 void addRepository(
const RepoInfo &info,
438 void addRepositories(
const Url &
url,
445 void removeRepository(
const RepoInfo & info,
457 void modifyRepository(
const std::string &alias,
463 { modifyRepository( newinfo.
alias(), newinfo, progressrcv ); }
478 RepoInfo getRepositoryInfo(
const std::string &alias,
517 bool serviceEmpty()
const;
524 ServiceSizeType serviceSize()
const;
531 ServiceConstIterator serviceBegin()
const;
537 ServiceConstIterator serviceEnd()
const;
541 {
return std::list<ServiceInfo>(serviceBegin(),serviceEnd()); }
549 ServiceInfo getService(
const std::string & alias )
const;
552 bool hasService(
const std::string & alias )
const;
568 void addService(
const std::string & alias,
const Url& url );
587 void removeService(
const std::string & alias );
597 void refreshServices(
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
607 void refreshService(
const std::string & alias,
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
609 void refreshService(
const ServiceInfo & service,
const RefreshServiceOptions & options_r = RefreshServiceOptions() );
627 void modifyService(
const std::string & oldAlias,
const ServiceInfo & service );
630 { modifyService( service.
alias(), service ); }
641 {
return info.
service() == alias; }
680 template<
typename OutputIterator>
682 OutputIterator out )
const 686 std::copy( boost::make_filter_iterator( filter, repoBegin(), repoEnd() ),
687 boost::make_filter_iterator( filter, repoEnd(), repoEnd() ),
704 #endif // ZYPP2_REPOMANAGER_H
ZYPP_DECLARE_FLAGS(VendorSupportOptions, VendorSupportOption)
RepoManagerOptions(const Pathname &root_r=Pathname())
Default ctor following ZConfig global settings.
std::string alias() const
unique identifier for this source.
void modifyService(const ServiceInfo &service)
Pathname repoRawCachePath
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
RefreshCheckStatus
Possibly return state of checkIfRefreshMEtadata function.
RepoSet::size_type RepoSizeType
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(DiskUsageCounter::MountPoint::HintFlags)
String related utilities and Regular expression matching.
RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
What is known about a repository.
Pathname knownServicesPath
RepoSet::const_iterator RepoConstIterator
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Url::asString() view options.
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
Pathname repoSolvCachePath
RefreshServiceBit
Flags for tuning RefreshService.
RepoManager implementation.
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
static RepoManagerOptions makeTestSetup(const Pathname &root_r)
Test setup adjusting all paths to be located below one root_r directory.
Pathname rootDir
remembers root_r value for later use
RepoInfo getRepo(const RepoInfo &info_r) const
std::ostream & operator<<(std::ostream &str, const Exception &obj)
bool hasRepo(const RepoInfo &info_r) const
MatchServiceAlias(const std::string &alias_)
Service type enumeration.
ServiceSet::const_iterator ServiceConstIterator
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
ServiceSet::size_type ServiceSizeType
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
creates and provides information about known sources.
bool operator()(const RepoInfo &info) 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...
void modifyRepository(const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
std::list< RepoInfo > knownRepositories() const
List of known repositories.
std::set< ServiceInfo > ServiceSet
ServiceInfo typedefs.
std::string servicesTargetDistro
Target distro ID to be used when refreshing repo index services.
Functor thats filter RepoInfo by service which it belongs to.
Pathname repoPackagesCachePath
static const ViewOption DEFAULTS
Default combination of view options.
Track changing files or directories.
Easy-to use interface to the ZYPP dependency resolver.
std::list< ServiceInfo > knownServices() const
List of known services.
Repository type enumeration.