#include <fstream>#include <cups/ppd.h>#include <cups/cups.h>#include <cups/language.h>#include "ClassesConf.h"#include "Y2Logger.h"#include "CupsCalls.h"#include <ycp/YCPVoid.h>Defines | |
| #define | ADD_MAP(X) {char* Y=TOLOWER(#X);m->add(YCPString(Y),YCPString(X));free(Y);} |
Functions | |
| void | setClassOptions (const char *name, YCPMap &options, bool deflt=false) |
| bool | newClass (const YCPValue &value) |
| 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) |
| void | ClassOptions2map (cups_dest_t *dest, map< string, string > &m) |
Referenced by PrinterEntry::Read(), and ClassEntry::Read().
| void ClassOptions2map | ( | cups_dest_t * | dest, | |
| map< string, string > & | m | |||
| ) |
Convert options to map. fixme: remove this function (it is already present as PrinterOptions2map)
Referenced by ClassesConf::completeEntries().
| YCPValue list2YCPList | ( | const list< string > & | l | ) |
References YCPList::add().
| YCPValue map2YCPMap | ( | const map< string, string > & | m | ) |
| bool newClass | ( | const YCPValue & | value | ) |
References setClass(), setClassOptions(), YCPMap::value(), Y2_DEBUG, Y2_ERROR, and YCPList2set().
Referenced by ClassesConf::modifyClass().
| YCPValue set2YCPList | ( | const set< string > & | l | ) |
| void setClassOptions | ( | const char * | name, | |
| YCPMap & | opt, | |||
| bool | deflt | |||
| ) |
Set class options in cups system.
| name | Name of the class. | |
| opt | YCPMap of options. | |
| defls | Is this class default class? |
References YCPMap::begin(), YCPMap::end(), YCPMapIterator::key(), ClassEntry::options, and YCPMapIterator::value().
Referenced by ClassEntry::changeClass(), and newClass().
| 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