#include <fstream>#include <cups/cups.h>#include <cups/ppd.h>#include <cups/language.h>#include "PrintersConf.h"#include "Y2Logger.h"#include "CupsCalls.h"Defines | |
| #define | ADD_MAP(X) {char* Y=TOLOWER(#X);m->add(YCPString(Y),YCPString(X));free(Y);} |
Functions | |
| bool | newPrinter (const YCPValue &value) |
| void | PrinterOptions2map (cups_dest_t *dest, map< string, string > &m) |
| set< string > | YCPList2set (const YCPList &l) |
| YCPValue | set2YCPList (const set< string > &l) |
| YCPValue | list2YCPList (const list< string > &l) |
| YCPValue | map2YCPMap (const map< string, string > &m) |
| YCPMap | getPrinterOptions (const char *name) |
| void | setPrinterOptions (const char *name, YCPMap &opt, bool deflt) |
| YCPMap getPrinterOptions | ( | const char * | name | ) |
Get printer options in cups system
| name | Name of the printer. |
References YCPMap::add().
| YCPValue list2YCPList | ( | const list< string > & | l | ) |
References YCPList::add().
| YCPValue map2YCPMap | ( | const map< string, string > & | m | ) |
| bool newPrinter | ( | const YCPValue & | value | ) |
References setPrinter(), setPrinterOptions(), YCPMap::value(), Y2_ERROR, and YCPList2set().
Referenced by PrintersConf::modifyPrinter().
| void PrinterOptions2map | ( | cups_dest_t * | dest, | |
| map< string, string > & | m | |||
| ) |
Convert options to map.
Referenced by PrintersConf::completeEntries().
| YCPValue set2YCPList | ( | const set< string > & | l | ) |
| void setPrinterOptions | ( | const char * | name, | |
| YCPMap & | opt, | |||
| bool | deflt | |||
| ) |
Set printer options in cups system.
| name | Name of the printer. | |
| opt | YCPMap of options. | |
| defls | Is this printer default printer? |
References YCPMap::begin(), YCPMap::end(), YCPMapIterator::key(), PrinterEntry::options, and YCPMapIterator::value().
Referenced by PrinterEntry::changePrinter(), and newPrinter().
| set<string> YCPList2set | ( | const YCPList & | l | ) |
References YCPList::size(), YCPList::value(), and Y2_ERROR.
Referenced by ClassEntry::changeClass(), PrinterEntry::changePrinter(), newClass(), and newPrinter().
1.5.5