#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] |
| bool ClassEntry::isSaved | ( | ) | [inline] |
| 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. |
| 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. |
| void ClassEntry::delAllowUsers | ( | const string | u | ) | [inline] |
delete user from AllowUsers
| u | username. |
| void ClassEntry::delDenyUsers | ( | const string | u | ) | [inline] |
delete user from DenyUsers
| void ClassEntry::delOption | ( | const string | s | ) | [inline] |
delete option
| s | Option name to delete. |
| string ClassEntry::getClass | ( | ) | const [inline] |
Get class name.
| const char* ClassEntry::getClass_str | ( | ) | const [inline] |
Get class name.
| map<string,string>& ClassEntry::getOptions | ( | ) | [inline] |
Get reference to the map of the options.
| int ClassEntry::getPrintersSize | ( | ) | [inline] |
| void ClassEntry::dump | ( | ) | const |
Dump values, for debugging purposes.
| YCPValue ClassEntry::Read | ( | ) | const |
Convert ClassEntry to YCPValue
| 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. |
| bool ClassEntry::newClass | ( | const YCPValue & | value | ) |
Add new class. Replace
string ClassEntry::Name [private] |
bool ClassEntry::Default [private] |
string ClassEntry::Info [private] |
string ClassEntry::Location [private] |
string ClassEntry::Uri [private] |
string ClassEntry::State [private] |
string ClassEntry::StateMessage [private] |
bool ClassEntry::Accepting [private] |
string ClassEntry::BannerStart [private] |
string ClassEntry::BannerEnd [private] |
set<string> ClassEntry::AllowUsers [private] |
set<string> ClassEntry::DenyUsers [private] |
set<string> ClassEntry::Printers [private] |
string ClassEntry::ppd [private] |
map<string,string> ClassEntry::options [private] |
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.
1.5.0