PrintersConf Class Reference

#include <PrintersConf.h>

List of all members.

Public Member Functions

 PrintersConf ()
 ~PrintersConf ()
void dump () const
YCPValue Read ()
YCPBoolean Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())

Private Member Functions

bool parseFile (const char *fn)
bool completeEntries ()
void Clear ()
bool modifyPrinter (YCPMap printer)
bool readSettings ()
bool getPrinters ()
list< PrinterEntry >::iterator getPrinterEntry (const string name)
list< PrinterEntry >::iterator findPrinter (const string name)

Private Attributes

list< PrinterEntryPrinters


Constructor & Destructor Documentation

PrintersConf::PrintersConf (  )  [inline]

Default Constructor.

PrintersConf::~PrintersConf (  )  [inline]

Destructor.


Member Function Documentation

bool PrintersConf::parseFile ( const char *  fn  )  [private]

Parse file printers.conf.

Parameters:
fn File to parse.
Returns:
if the operation was successful.

bool PrintersConf::completeEntries (  )  [private]

Not all of the settings can be read from file printers.conf. This function reads additional settings via cups library calls.

Returns:
True if settings was read successfully.

void PrintersConf::Clear (  )  [inline, private]

Erase all settings.

bool PrintersConf::modifyPrinter ( YCPMap  printer  )  [private]

Update printer.

bool PrintersConf::readSettings (  )  [private]

Read printers.conf file. Build list of printers (Printers).

Parameters:
fn filename of the printers.conf.
Returns:
True if file was read successfully.

bool PrintersConf::getPrinters (  )  [private]

New version of get-classes that works over ipp...

list< PrinterEntry >::iterator PrintersConf::getPrinterEntry ( const string  name  )  [private]

Returns printer entry by printer name. If the printer does not have an entry, it is created.

Parameters:
name Printer name.
Returns:
Iterator that points to printer entry for printer.

list< PrinterEntry >::iterator PrintersConf::findPrinter ( const string  name  )  [private]

Returns printer entry by printer name. If the printer does not have an entry, returns Printers.end().

Parameters:
name Printer name.
Returns:
Iterator that points to printer entry for printer or Printer.end()

void PrintersConf::dump (  )  const

Dump all printers.

YCPValue PrintersConf::Read (  ) 

Convert PrintersConf to YCPValue

YCPBoolean PrintersConf::Write ( const YCPPath path,
const YCPValue value,
const YCPValue arg = YCPNull() 
)

Write printers...


Member Data Documentation

list<PrinterEntry> PrintersConf::Printers [private]

List of PrinterEntries.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 18:12:01 2006 for yast2-printer by  doxygen 1.5.0