#include <XMLFilesBackend.h>
Inheritance diagram for zypp::storage::XMLFilesBackend:

Public Types | |
| typedef intrusive_ptr< XMLFilesBackend > | Ptr |
| typedef intrusive_ptr< const XMLFilesBackend > | constPtr |
Public Member Functions | |
| XMLFilesBackend (const Pathname &root) | |
| Default ctor. | |
| ~XMLFilesBackend () | |
| Dtor. | |
| void | setRandomFileNameEnabled (bool enabled) |
| virtual void | doTest () |
| virtual bool | isBackendInitialized () const |
| is the storage backend initialized | |
| virtual void | initBackend () |
| initialize the storage backend | |
| virtual void | storeObject (ResObject::constPtr resolvable) |
| Stores a Resolvable in the active backend. | |
| virtual void | deleteObject (ResObject::constPtr resolvable) |
| Deletes a Resolvable from the active backend. | |
| virtual std::list< ResObject::Ptr > | storedObjects () const |
| Deletes a Resolvable from the active backend. | |
| virtual std::list< ResObject::Ptr > | storedObjects (const Resolvable::Kind) const |
| Query for installed Resolvables of a certain kind. | |
| virtual std::list< ResObject::Ptr > | storedObjects (const Resolvable::Kind, const std::string &name, bool partial_match=false) const |
| Query for installed Resolvables of a certain kind by name partial_match allows for text search. | |
| void | setObjectFlag (ResObject::constPtr resolvable, const std::string &flag) |
| void | removeObjectFlag (ResObject::constPtr resolvable, const std::string &flag) |
| std::set< std::string > | objectFlags (ResObject::constPtr resolvable) const |
| bool | doesObjectHasFlag (ResObject::constPtr resolvable, const std::string &flag) const |
| void | setFlag (const std::string &key, const std::string &flag) |
| void | removeFlag (const std::string &key, const std::string &flag) |
| std::set< std::string > | flags (const std::string &key) const |
| bool | hasFlag (const std::string &key, const std::string &flag) const |
| virtual std::list< PersistentStorage::SourceData > | storedSources () const |
| Query for installed Sources. | |
| virtual void | storeSource (const PersistentStorage::SourceData &data) |
| Query for installed Sources. | |
| virtual void | deleteSource (const std::string &alias) |
| Query for installed Sources. | |
Protected Member Functions | |
| void | writeObjectFlags (ResObject::constPtr resolvable, const std::set< std::string > &pflags) |
| void | writeFlags (const std::string &key, const std::set< std::string > &pflags) |
| void | writeFlagsInFile (const std::string &filename, const std::set< std::string > &pflags) |
| std::set< std::string > | flagsFromFile (const std::string &filename) const |
| std::string | randomString (int length) const |
| int | random () const |
| std::string | dirForResolvable (ResObject::constPtr resolvable) const |
| Directory where the xml file is stored (for the given resolvable). | |
| std::string | dirForResolvableFlags (ResObject::constPtr resolvable) const |
| Directory where the flags are stored (for the given resolvable). | |
| std::string | fileNameForResolvable (ResObject::constPtr resolvable) const |
| Encoded filename for a resolvable. | |
| std::string | fullPathForResolvableFlags (ResObject::constPtr resolvable) const |
| Encoded filename for resolvable flags. | |
| std::string | dirForNamedFlags () const |
| dir for named flags | |
| std::string | fullPathForNamedFlags (const std::string &key) const |
| full path for named flags | |
| std::string | dirForResolvableKind (Resolvable::Kind kind) const |
| Directory where the xml file is stored (for the given resolvable kind). | |
| std::string | dirForResolvableKindFlags (Resolvable::Kind kind) const |
| Directory where the flags are stored (for the given resolvable kind). | |
| std::string | fullPathForResolvable (ResObject::constPtr resolvable) const |
| Full path to the xml file for a given resolvable Does not care if the resolvable is yet stored or not. | |
| std::list< ResObject::Ptr > | resolvablesFromFile (std::string file_path, Resolvable::Kind kind) const |
| Full path to the xml file for a given resolvable Does not care if the resolvable is yet stored or not. | |
| Patch::Ptr | createPatch (const zypp::parser::xmlstore::XMLPatchData &parsed) const |
| Message::Ptr | createMessage (const zypp::parser::xmlstore::XMLPatchMessageData &parsed) const |
| Script::Ptr | createScript (const zypp::parser::xmlstore::XMLPatchScriptData &parsed) const |
| Product::Ptr | createProduct (const zypp::parser::xmlstore::XMLProductData &parsed) const |
| Selection::Ptr | createSelection (const zypp::parser::xmlstore::XMLPatternData &parsed) const |
| Pattern::Ptr | createPattern (const zypp::parser::xmlstore::XMLPatternData &parsed) const |
| Atom::Ptr | createAtom (const zypp::parser::xmlstore::XMLPatchAtomData &parsed) const |
| Language::Ptr | createLanguage (const zypp::parser::xmlstore::XMLLanguageData &parsed) const |
| Dependencies | createDependencies (const zypp::parser::xmlstore::XMLResObjectData &parsed, const Resolvable::Kind my_kind) const |
| Capability | createCapability (const XMLDependency &dep, const Resolvable::Kind &my_kind) const |
Private Attributes | |
| Private * | d |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const XMLFilesBackend &obj) |
Classes | |
| class | Private |
Definition at line 45 of file XMLFilesBackend.h.
|
|
Definition at line 49 of file XMLFilesBackend.h. |
|
|
Definition at line 50 of file XMLFilesBackend.h. |
|
|
Default ctor.
Definition at line 102 of file XMLFilesBackend.cc. References d, DBG, initBackend(), isBackendInitialized(), zypp::storage::XMLFilesBackend::Private::kinds, zypp::storage::XMLFilesBackend::Private::kinds_flags, zypp::storage::XMLFilesBackend::Private::randomFileName, and zypp::storage::XMLFilesBackend::Private::root. |
|
|
Dtor.
Definition at line 1156 of file XMLFilesBackend.cc. References d. |
|
|
Definition at line 306 of file XMLFilesBackend.cc. References d, and zypp::storage::XMLFilesBackend::Private::randomFileName. |
|
|
Implements zypp::storage::Backend. Definition at line 1166 of file XMLFilesBackend.cc. |
|
|
is the storage backend initialized
Implements zypp::storage::Backend. Definition at line 186 of file XMLFilesBackend.cc. References zypp::ExternalProgram::close(), d, dirForResolvableKind(), zypp::ExternalProgram::Discard_Stderr, zypp::storage::XMLFilesBackend::Private::kinds, zypp::storage::XMLFilesBackend::Private::root, WAR, and ZYPP_DB_DIR. Referenced by XMLFilesBackend(). |
|
|
initialize the storage backend
Implements zypp::storage::Backend. Definition at line 257 of file XMLFilesBackend.cc. References zypp::filesystem::assert_dir(), zypp::filesystem::Pathname::asString(), d, DBG, dirForResolvableKind(), zypp::storage::XMLFilesBackend::Private::kinds, MIL, zypp::storage::XMLFilesBackend::Private::root, ZYPP_DB_DIR, and ZYPP_THROW. Referenced by XMLFilesBackend(). |
|
|
Stores a Resolvable in the active backend.
Implements zypp::storage::Backend. Definition at line 526 of file XMLFilesBackend.cc. References d, ERR, zypp::storage::XMLFilesBackend::Private::kinds, and zypp::storage::resolvableKindToString(). |
|
|
Deletes a Resolvable from the active backend.
Implements zypp::storage::Backend. Definition at line 556 of file XMLFilesBackend.cc. References ERR, fullPathForResolvable(), zypp::filesystem::unlink(), and ZYPP_THROW. |
|
|
Deletes a Resolvable from the active backend.
Implements zypp::storage::Backend. Definition at line 648 of file XMLFilesBackend.cc. References d, DBG, and zypp::storage::XMLFilesBackend::Private::kinds. Referenced by storedObjects(). |
|
|
Query for installed Resolvables of a certain kind.
Implements zypp::storage::Backend. Definition at line 669 of file XMLFilesBackend.cc. References DBG, dirForResolvableKind(), ERR, zypp::storage::resolvableKindToString(), and resolvablesFromFile(). |
|
||||||||||||||||
|
Query for installed Resolvables of a certain kind by name partial_match allows for text search.
Implements zypp::storage::Backend. Definition at line 695 of file XMLFilesBackend.cc. References storedObjects(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 385 of file XMLFilesBackend.cc. References flags(), objectFlags(), and writeObjectFlags(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 393 of file XMLFilesBackend.cc. References flags(), objectFlags(), and writeObjectFlags(). |
|
|
Implements zypp::storage::Backend. Definition at line 409 of file XMLFilesBackend.cc. References flagsFromFile(), and fullPathForResolvableFlags(). Referenced by doesObjectHasFlag(), removeObjectFlag(), and setObjectFlag(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 416 of file XMLFilesBackend.cc. References flags(), and objectFlags(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 427 of file XMLFilesBackend.cc. References flags(), and writeFlags(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 435 of file XMLFilesBackend.cc. References flags(), and writeFlags(). |
|
|
Implements zypp::storage::Backend. Definition at line 443 of file XMLFilesBackend.cc. References flagsFromFile(), and fullPathForNamedFlags(). Referenced by doesObjectHasFlag(), hasFlag(), removeFlag(), removeObjectFlag(), setFlag(), and setObjectFlag(). |
|
||||||||||||
|
Implements zypp::storage::Backend. Definition at line 450 of file XMLFilesBackend.cc. References flags(). |
|
||||||||||||
|
Definition at line 401 of file XMLFilesBackend.cc. References fullPathForResolvableFlags(), MIL, and writeFlagsInFile(). Referenced by removeObjectFlag(), and setObjectFlag(). |
|
||||||||||||
|
Definition at line 457 of file XMLFilesBackend.cc. References fullPathForNamedFlags(), MIL, and writeFlagsInFile(). Referenced by removeFlag(), and setFlag(). |
|
||||||||||||
|
Definition at line 469 of file XMLFilesBackend.cc. References MIL, and ZYPP_THROW. Referenced by writeFlags(), and writeObjectFlags(). |
|
|
Definition at line 496 of file XMLFilesBackend.cc. References zypp::iostr::getline(), and ZYPP_THROW. Referenced by flags(), and objectFlags(). |
|
|
Query for installed Sources.
Implements zypp::storage::Backend. Definition at line 1184 of file XMLFilesBackend.cc. References zypp::filesystem::Pathname::asString(), d, DBG, ERR, zypp::storage::XMLFilesBackend::Private::root, and ZYPP_DB_DIR. |
|
|
Query for installed Sources.
Implements zypp::storage::Backend. Definition at line 1215 of file XMLFilesBackend.cc. References zypp::storage::PersistentStorage::SourceData::alias, zypp::filesystem::Pathname::asString(), d, zypp::storage::XMLFilesBackend::Private::root, zypp::storage::toXML(), ZYPP_DB_DIR, and ZYPP_THROW. |
|
|
Query for installed Sources.
Implements zypp::storage::Backend. Definition at line 1247 of file XMLFilesBackend.cc. References zypp::filesystem::Pathname::asString(), d, zypp::Digest::digest(), ERR, zypp::storage::XMLFilesBackend::Private::root, ZYPP_DB_DIR, and ZYPP_THROW. |
|
|
Definition at line 167 of file XMLFilesBackend.cc. References random(), and zypp::solver::detail::str. |
|
|
Definition at line 146 of file XMLFilesBackend.cc. References zypp::base::sysconfig::read(). Referenced by randomString(). |
|
|
Directory where the xml file is stored (for the given resolvable).
Definition at line 336 of file XMLFilesBackend.cc. References dirForResolvableKind(). Referenced by fullPathForResolvable(). |
|
|
Directory where the flags are stored (for the given resolvable).
Definition at line 342 of file XMLFilesBackend.cc. References dirForResolvableKindFlags(). Referenced by fullPathForResolvableFlags(). |
|
|
Encoded filename for a resolvable. Does not take kind into account. Definition at line 348 of file XMLFilesBackend.cc. References zypp::Edition::noedition. Referenced by fullPathForResolvable(), and fullPathForResolvableFlags(). |
|
|
Encoded filename for resolvable flags. Does not take kind into account. Definition at line 378 of file XMLFilesBackend.cc. References dirForResolvableFlags(), and fileNameForResolvable(). Referenced by objectFlags(), and writeObjectFlags(). |
|
|
dir for named flags
Definition at line 328 of file XMLFilesBackend.cc. References d, zypp::storage::XMLFilesBackend::Private::root, and ZYPP_DB_DIR. Referenced by fullPathForNamedFlags(). |
|
|
full path for named flags
Definition at line 370 of file XMLFilesBackend.cc. References zypp::Digest::digest(), and dirForNamedFlags(). Referenced by flags(), and writeFlags(). |
|
|
Directory where the xml file is stored (for the given resolvable kind).
Definition at line 312 of file XMLFilesBackend.cc. References d, zypp::storage::resolvableKindToString(), zypp::storage::XMLFilesBackend::Private::root, and ZYPP_DB_DIR. Referenced by dirForResolvable(), initBackend(), isBackendInitialized(), and storedObjects(). |
|
|
Directory where the flags are stored (for the given resolvable kind).
Definition at line 320 of file XMLFilesBackend.cc. References d, zypp::storage::resolvableKindToString(), zypp::storage::XMLFilesBackend::Private::root, and ZYPP_DB_DIR. Referenced by dirForResolvableFlags(). |
|
|
Full path to the xml file for a given resolvable Does not care if the resolvable is yet stored or not.
Definition at line 364 of file XMLFilesBackend.cc. References dirForResolvable(), and fileNameForResolvable(). Referenced by deleteObject(). |
|
||||||||||||
|
Full path to the xml file for a given resolvable Does not care if the resolvable is yet stored or not.
Definition at line 576 of file XMLFilesBackend.cc. References zypp::parser::XMLNodeIteratorBase::atEnd(), createPatch(), MIL, zypp::storage::resolvableKindToString(), WAR, and ZYPP_CAUGHT. Referenced by storedObjects(). |
|
|
|
|
|
|
|
|
|
Definition at line 932 of file XMLFilesBackend.cc. References zypp::Language::installedInstance(), zypp::parser::xmlstore::XMLResObjectData::name, ZYPP_CAUGHT, and ZYPP_THROW. |
|
||||||||||||
|
Definition at line 1092 of file XMLFilesBackend.cc. References createCapability(), zypp::Dep::PROVIDES, and zypp::parser::xmlstore::XMLResObjectData::provides. Referenced by createAtom(), createMessage(), createPatch(), createPattern(), createProduct(), createScript(), and createSelection(). |
|
||||||||||||
|
Definition at line 1142 of file XMLFilesBackend.cc. References zypp::parser::xmlstore::XMLDependency::encoded, zypp::parser::xmlstore::XMLDependency::kind, and zypp::CapFactory::parse(). Referenced by createDependencies(). |
|
||||||||||||
|
Stream output Definition at line 1174 of file XMLFilesBackend.cc. |
|
|
Reimplemented from zypp::storage::Backend. Definition at line 196 of file XMLFilesBackend.h. Referenced by deleteSource(), dirForNamedFlags(), dirForResolvableKind(), dirForResolvableKindFlags(), initBackend(), isBackendInitialized(), setRandomFileNameEnabled(), storedObjects(), storedSources(), storeObject(), storeSource(), XMLFilesBackend(), and ~XMLFilesBackend(). |
1.4.6