12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 32 #include <zypp-core/ui/ProgressData> 129 bool hasRepo(
const std::string & alias )
const;
509 bool hasService(
const std::string & alias )
const;
525 void addService(
const std::string & alias,
const Url& url );
643 template<
typename OutputIterator>
645 OutputIterator out )
const 675 #endif // ZYPP2_REPOMANAGER_H RefreshCheckStatus checkIfToRefreshMetadata(const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy)
RefreshCheckStatus
Possibly return state of checkIfRefreshMEtadata function.
RepoSet::size_type RepoSizeType
constexpr std::string_view Url("url")
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
refresh is delayed due to settings
bool hasRepo(const std::string &alias) const
Return whether there is a known repository for alias.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
void removeService(const std::string &alias)
Removes service specified by its name.
void cleanCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
clean local cache
ServiceInfo getService(const std::string &alias) const
Finds ServiceInfo by alias or return ServiceInfo::noService.
RepoSizeType repoSize() const
void refreshServices(const RefreshServiceOptions &options_r)
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Pathname metadataPath(const RepoInfo &info) const
Path where the metadata is downloaded and kept.
friend std::ostream & operator<<(std::ostream &str, const RepoManager &obj)
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.
ZYPP_DECLARE_FLAGS(RefreshServiceFlags, RefreshServiceBit)
void addRepositories(const Url &url, OPT_PROGRESS)
RepoInfo getRepo(const std::string &alias) const
Find RepoInfo by alias or return RepoInfo::noRepo.
repo::ServiceType probeService(const Url &url) const
void buildCache(const RepoInfo &info, CacheBuildPolicy policy, OPT_PROGRESS)
Url::asString() view options.
repo::RepoType probe(const Url &url, const Pathname &path=Pathname()) const
void loadFromCache(const RepoInfo &info, OPT_PROGRESS)
void cleanCacheDirGarbage(const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Remove any subdirectories of cache directories which no longer belong to any of known repositories...
void modifyRepository(const std::string &alias, const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Modify repository attributes.
RepoInfo getRepo(const RepoInfo &info_r) const
void addRepository(const RepoInfo &info, OPT_PROGRESS)
void cleanPackages(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local package cache.
RepoInfo getRepositoryInfo(const std::string &alias, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Find a matching repository info.
std::set< ServiceInfo > ServiceSet
ServiceInfo typedefs.
void removeRepository(const RepoInfo &info, OPT_PROGRESS) override
std::string alias() const
unique identifier for this source.
void addService(const std::string &alias, const Url &url)
Adds a new service by its alias and URL.
bool serviceEmpty() const
Gets true if no service is in RepoManager (so no one in specified location)
Service type enumeration.
MatchServiceAlias(std::string alias_)
ServiceSet::size_type ServiceSizeType
Iterable< RepoConstIterator > repos() const
Iterate the known repositories.
void modifyService(const std::string &oldAlias, const ServiceInfo &service)
Modifies service file (rewrites it with new values) and underlying repositories if needed...
bool isCached(const RepoInfo &info) const
Whether a repository exists in cache.
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.
std::list< RepoInfo > readRepoFile(const Url &repo_file)
Parses repo_file and returns a list of RepoInfo objects corresponding to repositories found within th...
RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy, OPT_PROGRESS)
bool operator()(const RepoInfo &info) const
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
static std::string makeStupidAlias(const Url &url_r=Url())
Some stupid string but suitable as alias for your url if nothing better is available.
Functor thats filter RepoInfo by service which it belongs to.
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
RepoSet::const_iterator RepoConstIterator
static const ViewOption DEFAULTS
Default combination of view options.
void modifyService(const ServiceInfo &service)
RepoStatus metadataStatus(const RepoInfo &info) const
Status of local metadata.
Track changing files or directories.
ServiceSizeType serviceSize() const
Gets count of service in RepoManager (in specified location)
Force refresh even if TTL is not reached.
Iterable< ServiceConstIterator > services() const
Iterate the known services.
void refreshService(const std::string &alias, const RefreshServiceOptions &options_r)
Easy-to use interface to the ZYPP dependency resolver.
RepoConstIterator repoEnd() const
void refreshGeoIp(const RepoInfo::url_set &urls)
void cleanMetadata(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local metadata.
RepoStatus cacheStatus(const RepoInfo &info) const
Status of metadata cache.
bool hasService(const std::string &alias) const
Return whether there is a known service for alias.
std::list< ServiceInfo > knownServices() const
List of known services.
RepoManager(RepoManagerOptions options=RepoManagerOptions())
Repository type enumeration.
Force restoring repo enabled/disabled status.
ServiceSet::const_iterator ServiceConstIterator
Pathname packagesPath(const RepoInfo &info) const
Path where the rpm packages are downloaded and kept.