libcamgm
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ca_mgm::CAConfig Class Reference

#include <CAConfig.hpp>

Public Member Functions

 CAConfig (const std::string &file)
 
 ~CAConfig ()
 
void setValue (const std::string &section, const std::string &key, const std::string &value)
 
void deleteValue (const std::string &section, const std::string &key)
 
void deleteSection (const std::string &section)
 
std::string getValue (const std::string &section, const std::string &key) const
 
bool exists (const std::string &section, const std::string &key) const
 
std::list< std::string > getKeylist (const std::string &section) const
 
void copySection (const std::string &srcSection, const std::string &destSection)
 
CAConfigclone (const std::string &file)
 
std::string filename () const
 
void dump ()
 

Private Member Functions

 CAConfig ()
 
 CAConfig (const CAConfig &)
 
CAConfigoperator= (const CAConfig &)
 
void dumpTree (CASection *section, int level=0)
 
void validateAndFix ()
 

Private Attributes

ca_mgm::RWCOW_pointer< CAConfigImpl > m_impl
 

Detailed Description

Class for reading and writing the openssl.cnf

Constructor & Destructor Documentation

ca_mgm::CAConfig::CAConfig ( const std::string &  file)

Create a new object from file

ca_mgm::CAConfig::~CAConfig ( )
ca_mgm::CAConfig::CAConfig ( )
private
ca_mgm::CAConfig::CAConfig ( const CAConfig )
private

Member Function Documentation

CAConfig* ca_mgm::CAConfig::clone ( const std::string &  file)

Clone this object

Parameters
filea new filename for this object
void ca_mgm::CAConfig::copySection ( const std::string &  srcSection,
const std::string &  destSection 
)

Copy all Keys and values from Section srcSection to Section destSection.

void ca_mgm::CAConfig::deleteSection ( const std::string &  section)
void ca_mgm::CAConfig::deleteValue ( const std::string &  section,
const std::string &  key 
)

Delete the Key key in Section section

void ca_mgm::CAConfig::dump ( )
void ca_mgm::CAConfig::dumpTree ( CASection *  section,
int  level = 0 
)
private
bool ca_mgm::CAConfig::exists ( const std::string &  section,
const std::string &  key 
) const

Check if Key key in Section section exists.

std::string ca_mgm::CAConfig::filename ( ) const

return current filename

std::list<std::string> ca_mgm::CAConfig::getKeylist ( const std::string &  section) const

Return a List of all Keys in Section section.

std::string ca_mgm::CAConfig::getValue ( const std::string &  section,
const std::string &  key 
) const

Get the value of Section section with the Key key.

CAConfig& ca_mgm::CAConfig::operator= ( const CAConfig )
private
void ca_mgm::CAConfig::setValue ( const std::string &  section,
const std::string &  key,
const std::string &  value 
)

Set a new value in Section section with the Key key.

void ca_mgm::CAConfig::validateAndFix ( )
private

Check the format of the template and fix it if required. (SLES9 => SLES10 update)

Member Data Documentation

ca_mgm::RWCOW_pointer<CAConfigImpl> ca_mgm::CAConfig::m_impl
private

The documentation for this class was generated from the following file: