#include <ClassesConf.h>
Public Member Functions | |
| ClassEntry () | |
| ~ClassEntry () | |
| void | setSaved () |
| void | clearSaved () |
| bool | isSaved () |
| CREATE_SET (Name, char *) | |
| CREATE_SET (Default, bool) | |
| CREATE_SET (Info, char *) | |
| CREATE_SET (Location, char *) | |
| CREATE_SET (Uri, char *) | |
| CREATE_SET (State, char *) | |
| CREATE_SET (StateMessage, char *) | |
| CREATE_SET (Accepting, bool) | |
| CREATE_SET (BannerStart, char *) | |
| CREATE_SET (BannerEnd, char *) | |
| CREATE_SET (ppd, char *) | |
| void | addAllowUsers (const string u) |
| void | addDenyUsers (const string u) |
| void | addPrinters (const string p) |
| void | addOption (const string name, const string value) |
| void | delAllowUsers (const string u) |
| void | delDenyUsers (const string u) |
| void | delOption (const string s) |
| string | getClass () const |
| const char * | getClass_str () const |
| map< string, string > & | getOptions () |
| int | getPrintersSize () |
| void | dump () const |
| YCPValue | Read () const |
| bool | changeClass (const YCPValue &value) |
| bool | newClass (const YCPValue &value) |
Private Attributes | |
| string | Name |
| bool | Default |
| string | Info |
| string | Location |
| string | Uri |
| string | State |
| string | StateMessage |
| bool | Accepting |
| string | BannerStart |
| string | BannerEnd |
| set< string > | AllowUsers |
| set< string > | DenyUsers |
| set< string > | Printers |
| string | ppd |
| map< string, string > | options |
| bool | saved |
This contains one entry from the classes.conf file
| ClassEntry::ClassEntry | ( | ) | [inline] |
Default constructor.
| ClassEntry::~ClassEntry | ( | ) | [inline] |
Destructor.
| void ClassEntry::setSaved | ( | ) | [inline] |
| void ClassEntry::clearSaved | ( | ) | [inline] |
References saved.
| bool ClassEntry::isSaved | ( | ) | [inline] |
References saved.
| ClassEntry::CREATE_SET | ( | Name | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | Default | , | |
| bool | ||||
| ) |
| ClassEntry::CREATE_SET | ( | Info | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | Location | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | Uri | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | State | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | StateMessage | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | Accepting | , | |
| bool | ||||
| ) |
| ClassEntry::CREATE_SET | ( | BannerStart | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | BannerEnd | , | |
| char * | ||||
| ) |
| ClassEntry::CREATE_SET | ( | ppd | , | |
| char * | ||||
| ) |
| void ClassEntry::addAllowUsers | ( | const string | u | ) | [inline] |
add* functions to add items to set/map
| u | username. |
References AllowUsers.
Referenced by ClassesConf::getClasses().
| void ClassEntry::addDenyUsers | ( | const string | u | ) | [inline] |
| void ClassEntry::addPrinters | ( | const string | p | ) | [inline] |
| void ClassEntry::addOption | ( | const string | name, | |
| const string | value | |||
| ) | [inline] |
Add or change option
| name | Name of the option. | |
| value | Value of the option. |
References options.
| void ClassEntry::delAllowUsers | ( | const string | u | ) | [inline] |
| void ClassEntry::delDenyUsers | ( | const string | u | ) | [inline] |
delete user from DenyUsers
References DenyUsers.
| void ClassEntry::delOption | ( | const string | s | ) | [inline] |
| string ClassEntry::getClass | ( | ) | const [inline] |
| const char* ClassEntry::getClass_str | ( | ) | const [inline] |
| map<string,string>& ClassEntry::getOptions | ( | ) | [inline] |
| int ClassEntry::getPrintersSize | ( | ) | [inline] |
| void ClassEntry::dump | ( | ) | const |
| YCPValue ClassEntry::Read | ( | ) | const |
Convert ClassEntry to YCPValue
References Accepting, YCPMap::add(), ADD_MAP, AllowUsers, BannerEnd, BannerStart, Default, DenyUsers, Info, Location, map2YCPMap(), Name, options, Printers, set2YCPList(), State, and StateMessage.
| bool ClassEntry::changeClass | ( | const YCPValue & | value | ) |
Helper function for Write. Update class definition in cups system. Updates class entry (this). Saves only changed items.
| value | New value of ClassEntry. |
References Accepting, AllowUsers, BannerEnd, BannerStart, DenyUsers, Info, YCPElement::isNull(), Location, ppd, Printers, setClass(), setClassOptions(), setSaved(), State, StateMessage, Uri, YCPMap::value(), Y2_DEBUG, Y2_ERROR, and YCPList2set().
| bool ClassEntry::newClass | ( | const YCPValue & | value | ) |
Add new class. Replace
string ClassEntry::Name [private] |
Referenced by dump(), getClass(), getClass_str(), and Read().
bool ClassEntry::Default [private] |
string ClassEntry::Info [private] |
Referenced by changeClass(), dump(), and Read().
string ClassEntry::Location [private] |
Referenced by changeClass(), dump(), and Read().
string ClassEntry::Uri [private] |
Referenced by changeClass(), and dump().
string ClassEntry::State [private] |
Referenced by changeClass(), and Read().
string ClassEntry::StateMessage [private] |
Referenced by changeClass(), and Read().
bool ClassEntry::Accepting [private] |
Referenced by changeClass(), and Read().
string ClassEntry::BannerStart [private] |
Referenced by changeClass(), and Read().
string ClassEntry::BannerEnd [private] |
Referenced by changeClass(), and Read().
set<string> ClassEntry::AllowUsers [private] |
Referenced by addAllowUsers(), changeClass(), delAllowUsers(), and Read().
set<string> ClassEntry::DenyUsers [private] |
Referenced by addDenyUsers(), changeClass(), delDenyUsers(), and Read().
set<string> ClassEntry::Printers [private] |
Referenced by addPrinters(), changeClass(), getPrintersSize(), and Read().
string ClassEntry::ppd [private] |
Referenced by changeClass().
map<string,string> ClassEntry::options [private] |
Referenced by addOption(), delOption(), getOptions(), Read(), and setClassOptions().
bool ClassEntry::saved [private] |
This value indicates if classes was saved in ClassesConf::Write. ClassesConf::Write clears saved for all classes. ClassesConf::Write sets saved for each classes it saves. Classes that do not have saved bit set were not saved and must be deleted.
Referenced by clearSaved(), isSaved(), and setSaved().
1.5.5