limal::apparmor_reporting::ApparmorReportingConfig Class Reference

#include <ApparmorReporting.hpp>

List of all members.

Public Member Functions

 ApparmorReportingConfig (BLOCXX_NAMESPACE::String &xmlPath="/etc/apparmor/reports.conf", BLOCXX_NAMESPACE::String &crontabPath="/etc/apparmor/reports.crontab")
 ~ApparmorReportingConfig ()
ReportConfig readConfig ()
bool writeConfig (ReportConfig &config)
void removeReport (BLOCXX_NAMESPACE::String &name)
void writeReport (BLOCXX_NAMESPACE::String &currentName, BLOCXX_NAMESPACE::String &newName, ReportData &reportData)
bool reportExists (BLOCXX_NAMESPACE::String &name)
ReportData findReport (BLOCXX_NAMESPACE::String &name)
BLOCXX_NAMESPACE::String getXMLPath ()
void setXMLPath (BLOCXX_NAMESPACE::String &xmlPath)
BLOCXX_NAMESPACE::String getCrontabPath ()
void setCrontabPath (BLOCXX_NAMESPACE::String &crontabPath)

Private Member Functions

void loadXML ()
BLOCXX_NAMESPACE::String find_text (xmlNodePtr currentElement, char *tag)
BLOCXX_NAMESPACE::String find_attribute (xmlNodePtr currentElement, char *tag, char *attribute)
bool find_crontab_data (ReportData &data)

Private Attributes

BLOCXX_NAMESPACE::COWIntrusiveReference<
Data > 
m_data


Constructor & Destructor Documentation

limal::apparmor_reporting::ApparmorReportingConfig::ApparmorReportingConfig BLOCXX_NAMESPACE::String &  xmlPath = "/etc/apparmor/reports.conf",
BLOCXX_NAMESPACE::String &  crontabPath = "/etc/apparmor/reports.crontab"
 

Construct a ApparmorReporting object.

limal::apparmor_reporting::ApparmorReportingConfig::~ApparmorReportingConfig  ) 
 

Destructor of ApparmorReporting.


Member Function Documentation

BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::find_attribute xmlNodePtr  currentElement,
char *  tag,
char *  attribute
[private]
 

bool limal::apparmor_reporting::ApparmorReportingConfig::find_crontab_data ReportData data  )  [private]
 

BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::find_text xmlNodePtr  currentElement,
char *  tag
[private]
 

ReportData limal::apparmor_reporting::ApparmorReportingConfig::findReport BLOCXX_NAMESPACE::String &  name  ) 
 

Returns the data from an individual report.

Parameters:
[in] The name of the report to look up.
Returns:
The report data.

BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::getCrontabPath  ) 
 

Returns the path to reports.crontab.

Returns:
The path to reports.crontab.

BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::getXMLPath  ) 
 

Returns the path to reports.conf.

Returns:
The path to reports.conf.

void limal::apparmor_reporting::ApparmorReportingConfig::loadXML  )  [private]
 

ReportConfig limal::apparmor_reporting::ApparmorReportingConfig::readConfig  ) 
 

Parses the XML and returns a map of structs containing the data.

Returns:
The map

void limal::apparmor_reporting::ApparmorReportingConfig::removeReport BLOCXX_NAMESPACE::String &  name  ) 
 

Removes an entry from disk. Note that none of the three "special" reports are allowed to be removed from the configuration file.

Parameters:
[in] The name of the report to remove.

bool limal::apparmor_reporting::ApparmorReportingConfig::reportExists BLOCXX_NAMESPACE::String &  name  ) 
 

Returns true if there is a report by that name.

Parameters:
[in] The name of the report.
Returns:
True/false.

void limal::apparmor_reporting::ApparmorReportingConfig::setCrontabPath BLOCXX_NAMESPACE::String &  crontabPath  ) 
 

Sets the path to reports.crontab.

Parameters:
[in] The path to reports.crontab.

void limal::apparmor_reporting::ApparmorReportingConfig::setXMLPath BLOCXX_NAMESPACE::String &  xmlPath  ) 
 

Sets the path to reports.conf.

Parameters:
[in] The path to reports.conf.

bool limal::apparmor_reporting::ApparmorReportingConfig::writeConfig ReportConfig config  ) 
 

Writes the config map to reports.conf and reports.crontab.

Returns:
True on success, false on failure.

void limal::apparmor_reporting::ApparmorReportingConfig::writeReport BLOCXX_NAMESPACE::String &  currentName,
BLOCXX_NAMESPACE::String &  newName,
ReportData reportData
 

Modifies an existing report or inserts a new one.

Parameters:
[in] The current name of the report.
[in] The new name of the report.
[in] The ReportData to write.


Member Data Documentation

BLOCXX_NAMESPACE ::COWIntrusiveReference<Data> limal::apparmor_reporting::ApparmorReportingConfig::m_data [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 21 04:45:14 2009 for limal-apparmor-reporting by  doxygen 1.4.6