wml::CupsdCtrl Class Reference

A class that controls cupsd.conf settings A class to read values from and write to cupsd.conf. Also provides a method to cause the cupsd to reload the configuration. More...

#include <CupsdCtrl.h>

List of all members.

Constructor and Destructor



 CupsdCtrl ()
 Constructor Create a new CupsdCtrl object Default constructor sets cupsd.conf file path to /etc/cups/cupsd.conf.
 CupsdCtrl (std::string p)
 Constructor Create a new CupsdCtrl object, setting the cupsd.conf file path to p.
 ~CupsdCtrl ()
 Deconstructor Delete this CupsdCtrl object.
void setDirective (std::queue< std::pair< std::string, std::string > > containerId, std::string key, std::string value)
 Set a directive Sets a directive based on the path stored in containerId, and the key/value pair specified. This does not write the directive to the file specified.
std::string getDirective (std::queue< std::pair< std::string, std::string > > containerId, std::string key, bool valueOnly=false)
 Get a directive Returns a directive based on the path stored in containerId, and the key/value pair specified. This does not write the directive to the file specified.
void read (void)
 Read in the file specified Reads in the file specified, and populates the directiveContainers and directives data structures.
void write (void)
 Write to the file specified Writes the data stored in the directiveContainers and directives data structures to the file specified.
void reset (void)
void restartCups (void)
 Restart the cupsd program.


Detailed Description

A class that controls cupsd.conf settings A class to read values from and write to cupsd.conf. Also provides a method to cause the cupsd to reload the configuration.

As well as managing cupsd.conf, this class may also manage mime.convs and mime.types (functionality to be added later).

Definition at line 307 of file CupsdCtrl.h.


Member Function Documentation

std::string wml::CupsdCtrl::getDirective ( std::queue< std::pair< std::string, std::string > >  containerId,
std::string  key,
bool  valueOnly = false 
)

Get a directive Returns a directive based on the path stored in containerId, and the key/value pair specified. This does not write the directive to the file specified.

Parameters:
containerId The path to the directive to be returned
key The key of the directive to be returned
valueOnly specifies if the function should return the full directive or the value only
Returns:
Returns a string containing either the full directive, or the directives value

void wml::CupsdCtrl::reset ( void   ) 

Empty this->directives etc.

void wml::CupsdCtrl::setDirective ( std::queue< std::pair< std::string, std::string > >  containerId,
std::string  key,
std::string  value 
)

Set a directive Sets a directive based on the path stored in containerId, and the key/value pair specified. This does not write the directive to the file specified.

Parameters:
containerId The path to the directive to be set
key The key of the key/value pair of the directive to be set
value The value of the key/value pair of the directive to be set


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

Generated on Wed Apr 6 11:14:38 2011 for wmlcups by  doxygen 1.5.9