#include <PrintersConf.h>
Public Member Functions | |
| PrinterEntry () | |
| ~PrinterEntry () | |
| void | setSaved () |
| void | clearSaved () |
| bool | isSaved () |
| CREATE_SET (Name, string) | |
| CREATE_SET (Default, bool) | |
| CREATE_SET (Shared, bool) | |
| CREATE_SET (Info, string) | |
| CREATE_SET (Location, string) | |
| CREATE_SET (Uri, string) | |
| CREATE_SET (State, string) | |
| CREATE_SET (StateMessage, string) | |
| CREATE_SET (Accepting, bool) | |
| CREATE_SET (BannerStart, string) | |
| CREATE_SET (BannerEnd, string) | |
| CREATE_SET (ppd, string) | |
| void | addAllowUsers (const string u) |
| void | addDenyUsers (const string u) |
| void | addOption (const string name, const string value) |
| void | delAllowUsers (const string u) |
| void | delDenyUsers (const string u) |
| void | delOption (const string s) |
| string | getPrinter () const |
| const char * | getPrinter_str () const |
| map< string, string > & | getOptions () |
| void | dump () const |
| YCPValue | Read () const |
| bool | changePrinter (const YCPValue &value) |
| bool | newPrinter (const YCPValue &value) |
Private Attributes | |
| string | Name |
| bool | Default |
| string | Info |
| string | Location |
| string | Uri |
| string | State |
| string | StateMessage |
| bool | Shared |
| bool | Accepting |
| string | BannerStart |
| string | BannerEnd |
| set< string > | AllowUsers |
| set< string > | DenyUsers |
| string | ppd |
| map< string, string > | options |
| bool | saved |
This contains one entry from the printers.conf file
| PrinterEntry::PrinterEntry | ( | ) | [inline] |
Default constructor.
| PrinterEntry::~PrinterEntry | ( | ) | [inline] |
Destructor.
| void PrinterEntry::setSaved | ( | ) | [inline] |
| void PrinterEntry::clearSaved | ( | ) | [inline] |
| bool PrinterEntry::isSaved | ( | ) | [inline] |
| PrinterEntry::CREATE_SET | ( | Name | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Default | , | |
| bool | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Shared | , | |
| bool | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Info | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Location | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Uri | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | State | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | StateMessage | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | Accepting | , | |
| bool | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | BannerStart | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | BannerEnd | , | |
| string | ||||
| ) |
| PrinterEntry::CREATE_SET | ( | ppd | , | |
| string | ||||
| ) |
| void PrinterEntry::addAllowUsers | ( | const string | u | ) | [inline] |
add* functions to add items to set/map
| u | username. |
| void PrinterEntry::addDenyUsers | ( | const string | u | ) | [inline] |
| void PrinterEntry::addOption | ( | const string | name, | |
| const string | value | |||
| ) | [inline] |
Add or change option
| name | Name of the option. | |
| value | Value of the option. |
| void PrinterEntry::delAllowUsers | ( | const string | u | ) | [inline] |
delete user from AllowUsers
| u | username. |
| void PrinterEntry::delDenyUsers | ( | const string | u | ) | [inline] |
delete user from DenyUsers
| void PrinterEntry::delOption | ( | const string | s | ) | [inline] |
delete option
| s | Option name to delete. |
| string PrinterEntry::getPrinter | ( | ) | const [inline] |
Get printer name.
| const char* PrinterEntry::getPrinter_str | ( | ) | const [inline] |
Get printer name.
| map<string,string>& PrinterEntry::getOptions | ( | ) | [inline] |
Get reference to the map of the options.
| void PrinterEntry::dump | ( | ) | const |
Dump values, for debugging purposes.
| YCPValue PrinterEntry::Read | ( | ) | const |
Convert PrinterEntry to YCPValue
| bool PrinterEntry::changePrinter | ( | const YCPValue & | value | ) |
Helper function for Write. Update printer definition in cups system. Updates printer entry (this). Saves only changed items.
| value | New value of PrinterEntry. |
| bool PrinterEntry::newPrinter | ( | const YCPValue & | value | ) |
Add new printer. Replace
string PrinterEntry::Name [private] |
bool PrinterEntry::Default [private] |
string PrinterEntry::Info [private] |
string PrinterEntry::Location [private] |
string PrinterEntry::Uri [private] |
string PrinterEntry::State [private] |
string PrinterEntry::StateMessage [private] |
bool PrinterEntry::Shared [private] |
bool PrinterEntry::Accepting [private] |
string PrinterEntry::BannerStart [private] |
string PrinterEntry::BannerEnd [private] |
set<string> PrinterEntry::AllowUsers [private] |
set<string> PrinterEntry::DenyUsers [private] |
string PrinterEntry::ppd [private] |
map<string,string> PrinterEntry::options [private] |
bool PrinterEntry::saved [private] |
This value indicates if printer was saved in PrintersConf::Write. PrintersConf::Write clears saved for all printers. PrintersConf::Write sets saved for each printers it saves. Printers that do not have saved bit set were not saved and must be deleted.
1.5.0