Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CupsCalls.h File Reference

#include <Y2.h>
#include <set>
#include <string>
#include <cups/ipp.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)
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)


Function Documentation

bool deleteClass const char *  name  ) 
 

bool deletePrinter const char *  name  ) 
 

Delete printer.

Parameters:
name Printer name.
Returns:
True if successful.

YCPList getClasses string  hostname  ) 
 

string getDefaultDest  ) 
 

Get default destination.

Returns:
Name of printer.

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.

Parameters:
host host name to check
what_to_get one of CUPS_GET_PRINTERS and CUPS_GET_CLASSES
ret printer names will be added here
Returns:
success state

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.

Parameters:
d Name of default destination.
Returns:
Success state.

bool setDefaultDestLocal const char *  d  ) 
 

Set default destination for client-only.

Parameters:
d Name of default destination.
Returns:
Success state.

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
 

Modify or add printer. If any of the params is NULL, it is not set.

Parameters:
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.

Parameters:
name Name of the printer.
opt YCPMap of options.
defls Is this printer default printer?

char* TOLOWER char *  src  ) 
 


Generated on Thu Nov 17 21:25:17 2005 for yast2-printer by doxygen 1.3.6