#include <Y2.h>#include <set>#include <string>#include <cups/ipp.h>#include <ycp/YCPMap.h>#include <ycp/YCPPath.h>Go to the source code of this file.
Functions | |
| bool | setPrinter (const char *name, const char *info, const char *loc, const char *state, const char *statemsg, const char *bannerstart, const char *bannerend, const char *deviceuri, const set< string >allowusers, const set< string >denyusers, const char *ppd, const char *accepting, const char *shared) |
| bool | deletePrinter (const char *name) |
| const char * | getPPD (const char *name) |
| void | setPrinterOptions (const char *name, YCPMap &options, bool deflt=false) |
| string | getDefaultDest () |
| bool | setDefaultDestLocal (const char *d) |
| bool | setDefaultDest (const char *d) |
| bool | setClass (const char *name, const char *info, const char *loc, const char *state, const char *statemsg, const char *bannerstart, const char *bannerend, const set< string >allowusers, const set< string >denyusers, const char *accepting, const set< string >members) |
| bool | deleteClass (const char *name) |
| bool | getRemoteDestinations (const char *host, YCPList &ret, ipp_op_t what_to_get, bool get_remote) |
| char * | TOLOWER (char *src) |
| YCPList | getPrinters (string hostname) |
| YCPList | getClasses (string hostname) |
| bool deleteClass | ( | const char * | name | ) |
| bool deletePrinter | ( | const char * | name | ) |
Delete printer.
| name | Printer name. |
| YCPList getClasses | ( | string | hostname | ) |
| string getDefaultDest | ( | ) |
Get default destination.
| const char* getPPD | ( | const char * | name | ) |
Get the ppd file for printer/class
When no ppd is assotiated with printer/class, the file is html file that contains info about an error. We must detect it and return 0.
| YCPList getPrinters | ( | string | hostname | ) |
| bool getRemoteDestinations | ( | const char * | host, | |
| YCPList & | ret, | |||
| ipp_op_t | what_to_get, | |||
| bool | get_remote | |||
| ) |
Get printers on remote host.
| host | host name to check | |
| what_to_get | one of CUPS_GET_PRINTERS and CUPS_GET_CLASSES | |
| ret | printer names will be added here |
| bool setClass | ( | const char * | name, | |
| const char * | info, | |||
| const char * | loc, | |||
| const char * | state, | |||
| const char * | statemsg, | |||
| const char * | bannerstart, | |||
| const char * | bannerend, | |||
| const set< string > | allowusers, | |||
| const set< string > | denyusers, | |||
| const char * | accepting, | |||
| const set< string > | members | |||
| ) |
| bool setDefaultDest | ( | const char * | d | ) |
Set default destination.
| d | Name of default destination. |
| bool setDefaultDestLocal | ( | const char * | d | ) |
Set default destination for client-only.
| d | Name of default destination. |
| bool setPrinter | ( | const char * | name, | |
| const char * | info, | |||
| const char * | loc, | |||
| const char * | state, | |||
| const char * | statemsg, | |||
| const char * | bannerstart, | |||
| const char * | bannerend, | |||
| const char * | deviceuri, | |||
| const set< string > | allowusers, | |||
| const set< string > | denyusers, | |||
| const char * | ppd, | |||
| const char * | accepting, | |||
| const char * | shared | |||
| ) |
Modify or add printer. If any of the params is NULL, it is not set.
| name | Printer name. | |
| info | Printer info. | |
| loc | Printer location. | |
| state | Printer state. | |
| statemsg | Description of printer state. | |
| bannerstart | Banner | |
| bannerend | Banner | |
| deviceuri | ||
| allowusers | ||
| denyusers | ||
| ppd | ||
| accepting |
| 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? |
| char* TOLOWER | ( | char * | src | ) |
1.5.0