#include <PrintersConf.h>
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< PrinterEntry > | Printers |
| PrintersConf::PrintersConf | ( | ) | [inline] |
Default Constructor.
| PrintersConf::~PrintersConf | ( | ) | [inline] |
Destructor.
| bool PrintersConf::parseFile | ( | const char * | fn | ) | [private] |
Parse file printers.conf.
| fn | File to parse. |
| 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.
| 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).
| fn | filename of the printers.conf. |
| 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.
| name | Printer name. |
| 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().
| name | Printer name. |
| 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...
list<PrinterEntry> PrintersConf::Printers [private] |
List of PrinterEntries.
1.5.0