zypp::storage::PersistentStorage Class Reference

#include <PersistentStorage.h>

Inheritance diagram for zypp::storage::PersistentStorage:

zypp::base::ReferenceCounted NonCopyable List of all members.

Public Member Functions

 PersistentStorage ()
 Default ctor.
 ~PersistentStorage ()
 Dtor.
void doTest ()
void init (const Pathname &root)
 Initializes the Storage when the system is located in some root path.
bool isInitialized () const
 true is backend was already initialized
void storeObject (ResObject::constPtr resolvable)
 Stores a Resolvable in the active backend.
void deleteObject (ResObject::constPtr resolvable)
 Deletes a Resolvable from the active backend.
std::list< ResObject::PtrstoredObjects () const
 Query for installed Resolvables.
std::list< ResObject::PtrstoredObjects (const Resolvable::Kind kind) const
 Query for installed Resolvables of a certain kind.
std::list< ResObject::PtrstoredObjects (const Resolvable::Kind 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)
 Set a flag for a resolvable.
void removeObjectFlag (ResObject::constPtr resolvable, const std::string &flag)
 Removes a flag for a resolvable.
std::set< std::string > objectFlags (ResObject::constPtr resolvable) const
 Returns a set of flags a resolvable has stored.
bool doesObjectHasFlag (ResObject::constPtr resolvable, const std::string &flag) const
 True if the resolvable has that flag.
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
std::list< SourceDatastoredSources () const
 Query for installed Sources.
void storeSource (const SourceData &data)
 Add a new installed source.
void deleteSource (const std::string &alias)
 Delete an installed source.

Private Types

typedef intrusive_ptr< PersistentStoragePtr
typedef intrusive_ptr< const
PersistentStorage
constPtr

Private Attributes

Privated

Friends

std::ostream & operator<< (std::ostream &str, const PersistentStorage &obj)

Classes

class  Private
struct  SourceData

Detailed Description

Definition at line 35 of file PersistentStorage.h.


Member Typedef Documentation

typedef intrusive_ptr<PersistentStorage> zypp::storage::PersistentStorage::Ptr [private]
 

Definition at line 38 of file PersistentStorage.h.

typedef intrusive_ptr<const PersistentStorage> zypp::storage::PersistentStorage::constPtr [private]
 

Definition at line 39 of file PersistentStorage.h.


Constructor & Destructor Documentation

zypp::storage::PersistentStorage::PersistentStorage  ) 
 

Default ctor.

Definition at line 49 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and DBG.

zypp::storage::PersistentStorage::~PersistentStorage  ) 
 

Dtor.

Definition at line 71 of file PersistentStorage.cc.


Member Function Documentation

void zypp::storage::PersistentStorage::doTest  ) 
 

Definition at line 79 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::doTest().

void zypp::storage::PersistentStorage::init const Pathname root  ) 
 

Initializes the Storage when the system is located in some root path.

THIS MUST BE CALLED BEFORE DOING ANY OPERATION

Definition at line 56 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, and d.

Referenced by zypp::target::TargetImpl::enableStorage().

bool zypp::storage::PersistentStorage::isInitialized  )  const
 

true is backend was already initialized

Definition at line 61 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, and d.

void zypp::storage::PersistentStorage::storeObject ResObject::constPtr  resolvable  ) 
 

Stores a Resolvable in the active backend.

Definition at line 85 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storeObject().

void zypp::storage::PersistentStorage::deleteObject ResObject::constPtr  resolvable  ) 
 

Deletes a Resolvable from the active backend.

Definition at line 91 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::deleteObject().

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects  )  const
 

Query for installed Resolvables.

Definition at line 97 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storedObjects().

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects const Resolvable::Kind  kind  )  const
 

Query for installed Resolvables of a certain kind.

Definition at line 103 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storedObjects().

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects const Resolvable::Kind  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.

Definition at line 111 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storedObjects().

void zypp::storage::PersistentStorage::setObjectFlag ResObject::constPtr  resolvable,
const std::string &  flag
 

Set a flag for a resolvable.

Definition at line 121 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::setObjectFlag().

void zypp::storage::PersistentStorage::removeObjectFlag ResObject::constPtr  resolvable,
const std::string &  flag
 

Removes a flag for a resolvable.

Definition at line 125 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::removeObjectFlag().

std::set< std::string > zypp::storage::PersistentStorage::objectFlags ResObject::constPtr  resolvable  )  const
 

Returns a set of flags a resolvable has stored.

Definition at line 129 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::objectFlags().

bool zypp::storage::PersistentStorage::doesObjectHasFlag ResObject::constPtr  resolvable,
const std::string &  flag
const
 

True if the resolvable has that flag.

Definition at line 133 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::doesObjectHasFlag().

void zypp::storage::PersistentStorage::setFlag const std::string &  key,
const std::string &  flag
 

Definition at line 141 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::setFlag().

void zypp::storage::PersistentStorage::removeFlag const std::string &  key,
const std::string &  flag
 

Definition at line 147 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::removeFlag().

std::set< std::string > zypp::storage::PersistentStorage::flags const std::string &  key  )  const
 

Definition at line 153 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::flags().

bool zypp::storage::PersistentStorage::hasFlag const std::string &  key,
const std::string &  flag
const
 

Definition at line 159 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::hasFlag().

std::list< PersistentStorage::SourceData > zypp::storage::PersistentStorage::storedSources  )  const
 

Query for installed Sources.

Definition at line 169 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storedSources().

void zypp::storage::PersistentStorage::storeSource const SourceData data  ) 
 

Add a new installed source.

Definition at line 175 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::storeSource().

void zypp::storage::PersistentStorage::deleteSource const std::string &  alias  ) 
 

Delete an installed source.

Definition at line 181 of file PersistentStorage.cc.

References zypp::storage::PersistentStorage::Private::backend, d, and zypp::storage::Backend::deleteSource().


Friends And Related Function Documentation

std::ostream & operator<< std::ostream &  str,
const PersistentStorage obj
[friend]
 

Stream output

Definition at line 191 of file PersistentStorage.cc.


Member Data Documentation

Private* zypp::storage::PersistentStorage::d [private]
 

Definition at line 144 of file PersistentStorage.h.

Referenced by deleteObject(), deleteSource(), doesObjectHasFlag(), doTest(), flags(), hasFlag(), init(), isInitialized(), objectFlags(), PersistentStorage(), removeFlag(), removeObjectFlag(), setFlag(), setObjectFlag(), storedObjects(), storedSources(), storeObject(), and storeSource().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 19:10:55 2006 for zypp by  doxygen 1.4.6