#include <SourceManager.h>
Inheritance diagram for zypp::SourceManager:

Iterate over all known SourceIds. | |
| typedef MapKVIteratorTraits< SourceMap >::Key_const_iterator | SourceId_const_iterator |
| SourceId_const_iterator | SourceId_begin () const |
| SourceId_const_iterator | SourceId_end () const |
Iterate over all known Sources. | |
| typedef MapKVIteratorTraits< SourceMap >::Value_const_iterator | Source_const_iterator |
| Source_const_iterator | Source_begin () const |
| Source_const_iterator | Source_end () const |
Iterate over all (SourceId,Source_Ref) pairs. | |
| typedef SourceMap::const_iterator | const_iterator |
| const_iterator | begin () const |
| const_iterator | end () const |
Public Types | |
| typedef Source_Ref::NumericId | SourceId |
| Runtime unique numeric Source Id. | |
Public Member Functions | |
| ~SourceManager () | |
| Dtor. | |
| void | reset () |
| Reset the manager - discard the sources database, do not store the changes to the persistent store. | |
| source::SourceInfoList | knownSourceInfos (const Pathname &root_r) |
| List the known aliases and urls ( no need to restore first ). | |
| void | store (Pathname root_r, bool metadata_cache) |
| Store the current state to the given path. | |
| bool | restore (Pathname root_r, bool use_caches=true, const std::string &alias_filter="", const std::string &url_filter="") |
| Source_Ref | findSource (SourceId id) |
| Find a source with a specified ID. | |
| Source_Ref | findSource (const std::string &alias_r) |
| Find a source with a specified alias. | |
| Source_Ref | findSourceByUrl (const Url &url_r) |
| Find a source with a specified URL. | |
| std::list< SourceId > | enabledSources () const |
| Return the list of the currently enabled sources. | |
| std::list< SourceId > | allSources () const |
| Return ids of all sources. | |
| SourceId | addSource (Source_Ref source_r) |
| Add a new source. | |
| void | renameSource (SourceId id, const std::string &new_alias_r) |
| Rename an existing source by Alias. | |
| void | removeSource (SourceId id) |
| Remove an existing source by ID. | |
| void | removeSource (const std::string &alias_r) |
| Remove an existing source by Alias. | |
| void | removeSourceByUrl (const Url &url_r) |
| Remove an existing source by Url. | |
| void | releaseAllSources () |
| Release all medias held by all sources. | |
| void | reattachSources (const Pathname &attach_point) |
| Reattach all sources which are not mounted, but downloaded, to different directory. | |
| void | disableAllSources () |
| Disable all registered sources. | |
Static Public Member Functions | |
| static SourceManager_Ptr | sourceManager () |
| Singleton access. | |
| static void | disableSourcesAt (const Pathname &root) |
| Helper function to disable all sources in the persistent store on the given location. | |
Private Types | |
| typedef std::map< SourceId, Source_Ref > | SourceMap |
| exposition only | |
Private Member Functions | |
| SourceManager () | |
| Singleton ctor. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const SourceManager &obj) |
throwing findSource is not acceptable, return either a Source or noSource.
Make restore either void or nonthrowing, but two ways of error reporting is bad.
Definition at line 84 of file SourceManager.h.
|
|
Runtime unique numeric Source Id.
Definition at line 98 of file SourceManager.h. |
|
|
exposition only
Definition at line 102 of file SourceManager.h. |
|
|
Definition at line 106 of file SourceManager.h. |
|
|
Definition at line 116 of file SourceManager.h. |
|
|
Definition at line 126 of file SourceManager.h. |
|
|
Dtor.
Definition at line 150 of file SourceManager.cc. References MIL. |
|
|
Singleton ctor.
Definition at line 140 of file SourceManager.cc. References MIL. |
|
|
Singleton access.
Definition at line 45 of file SourceManager.cc. Referenced by zypp::source::SourceImpl::provideDirTree(), zypp::source::SourceImpl::provideJustFile(), and zypp::SourceCache::restoreSources(). |
|
|
Definition at line 155 of file SourceManager.cc. References zypp::_sources. |
|
|
Definition at line 160 of file SourceManager.cc. References zypp::_sources. |
|
|
Definition at line 165 of file SourceManager.cc. References zypp::_sources, and zypp::make_map_key_begin(). |
|
|
Definition at line 170 of file SourceManager.cc. References zypp::_sources, and zypp::make_map_key_end(). |
|
|
Definition at line 175 of file SourceManager.cc. References zypp::_sources, and zypp::make_map_value_begin(). |
|
|
Definition at line 180 of file SourceManager.cc. References zypp::_sources, and zypp::make_map_value_end(). |
|
|
Reset the manager - discard the sources database, do not store the changes to the persistent store.
Definition at line 185 of file SourceManager.cc. References zypp::_deleted_sources, zypp::_sources, and MIL. |
|
|
List the known aliases and urls ( no need to restore first ).
Definition at line 556 of file SourceManager.cc. |
|
||||||||||||
|
Store the current state to the given path.
Definition at line 303 of file SourceManager.cc. References zypp::_renamed_sources, zypp::filesystem::assert_dir(), MIL, and ZYPP_METADATA_PREFIX. Referenced by disableSourcesAt(), and knownSourceInfos(). |
|
||||||||||||||||||||
|
If the sources database is not empty, it throws an exception
Definition at line 398 of file SourceManager.cc. References zypp::_sources, MIL, and ZYPP_THROW. |
|
|
Find a source with a specified ID.
Definition at line 577 of file SourceManager.cc. References zypp::_sources, and ZYPP_THROW. Referenced by renameSource(). |
|
|
Find a source with a specified alias.
Definition at line 587 of file SourceManager.cc. References zypp::_sources. |
|
|
Find a source with a specified URL. URLs are unique in zenworks but NOT in zypp. A bug in SL 10.1 causes alias mismatches so we have to resort to URLs. #177543
Definition at line 602 of file SourceManager.cc. References zypp::_sources, and zypp::Url::asCompleteString(). |
|
|
Return the list of the currently enabled sources.
Definition at line 278 of file SourceManager.cc. References zypp::_sources. |
|
|
Return ids of all sources.
Definition at line 291 of file SourceManager.cc. References zypp::_sources. |
|
|
Add a new source. An attempt to add Source_Ref::noSource does nothing but returning Source_Ref::noSource.numericId(). Thus it results in adding no Source. Definition at line 192 of file SourceManager.cc. References zypp::sourceTableAdd(). |
|
||||||||||||
|
Rename an existing source by Alias.
Definition at line 197 of file SourceManager.cc. References zypp::_renamed_sources, zypp::Source_Ref::alias(), findSource(), and zypp::Source_Ref::setAlias(). |
|
|
Remove an existing source by ID.
Definition at line 213 of file SourceManager.cc. References zypp::_sources, zypp::sourceTableRemove(), and WAR. |
|
|
Remove an existing source by Alias.
Definition at line 221 of file SourceManager.cc. References zypp::_sources, zypp::sourceTableRemove(), and WAR. |
|
|
Remove an existing source by Url.
Definition at line 233 of file SourceManager.cc. References zypp::_sources, zypp::Url::asString(), zypp::sourceTableRemove(), and WAR. |
|
|
Release all medias held by all sources.
Definition at line 245 of file SourceManager.cc. References zypp::_sources, and MIL. |
|
|
Reattach all sources which are not mounted, but downloaded, to different directory.
Definition at line 256 of file SourceManager.cc. References zypp::_sources, and MIL. |
|
|
Disable all registered sources.
Definition at line 268 of file SourceManager.cc. References zypp::_sources, and MIL. |
|
|
Helper function to disable all sources in the persistent store on the given location. Does not manipulate with the current status of the source manager.
Definition at line 538 of file SourceManager.cc. |
|
||||||||||||
|
Stream output Definition at line 572 of file SourceManager.cc. |
1.4.6