YaST2 Developers Documentation: Printer configuration

Printer configuration

modules/CUPS.ycp
Data and functions related only to CUPS

This module has an unstable interface.

Printer library exported functions. What else?!?

Imports

  • Arch
  • Label
  • Package
  • Printerlib
  • Report
  • Service
  • SuSEFirewall

Global Variables

Global Functions

Local Variables

local supported_uri_types -> list<string>

List of supported URI schemess

global cups_servers -> list<string>

List of detected CUPS servers

global usb_dev_names -> symbol

Use CUPS-like USB devices names `always, `never, `serial

global cups_installation -> symbol

Type of cups installation. nil: unknown `server: server `client: client

global server_hostname -> string

If this is only cups client station, server host name is here.

global cups_server_settings -> map<string,list<string> >

Settings of CUPS server

global cups_server_permissions -> map<string,map<string, list<string> > >

Settings of CUPS server

global server_default -> boolean

When configuring client, using server's default queue?

global LoadServerHostName () -> void

Read client.conf host name to server_hostname

global SaveServerHostName () -> boolean

Save client.conf host name host name

Return value:
true on success
global ClientRead () -> string

Read settings of CUPS client-only

Return value:
default queue name (empty if server-default is used, nil on fail) TODO error handling
global InstallationType () -> symbol

If only client is installed or remote server to use is set, returns 1, if this is real server installation, returns 0 Also sets server_hostname and cups_installation

Return value:
`client or `server
global SaveCupsClient (string default_queue) -> boolean

Save CUPS client-only configuration

Parameters:
default_queue string default queue name
Return value:
true on success
global ReadCupsSettings () -> boolean

Reads CUPS server settings from /etc/cups/cupsd.conf file

Return value:
true on success
global WriteCupsSettings () -> boolean

Writes CUPS server settings to /etc/cups/cupsd.conf file

Return value:
true on success
global WriteQueue (map entry) -> boolean

Write configuration to CUPS

Parameters:
entry map of printer entry
Return value:
true if successfull
global GetAvailableQueues () -> list<string>

List all available queues (local and remote)

Return value:
a list of strings all available queues
global getBannerList () -> list<string>

Get list of possible banners for CUPS server

Return value:
a list banners names
global DetectCupsUsbDevicesInfo () -> list<list<string> >

Detect information about USB devices using the CUPS USB backend Also store this information to Printerlib module

Return value:
a list of detected devices
global GetCupsUsbDevices () -> list<string>

Get all CUPS-like USB device names

Return value:
a list of CUPS USB device names
global GetProblematicCupsUsbDevices () -> list<string>

Get problematic CUPS USB devices names

Return value:
a list of strings with problematic device names
global WaitForCupsListeiningFinish () -> void

Wait until listening to CUPS IPP broadcasts finishes

global ListenCupsServers () -> list

Get hosts available on local network via listening to IPP broadcasts

Return value:
Sorted list of hosts
global StopListenCupsServers () -> void

Immediatelly stop listenning to IPP broadcasts via the script

global ProposeClientOnly () -> void

Propose Client only with a CUPS server listen_remote_ipp must have neen started befor this function is called

global ProposeServerSettings () -> void

Propose the CUPS server settings

global GetSystemForbiddenNames () -> list<string>

Get the list of queue names that are forbidden by the spooler

Return value:
a list of forbidden queue names
global GetSupportedUriTypes () -> list<string>

Get URI Types supported by CUPS

Return value:
a list of supported URI types
global StartDaemon () -> void

start CUPS server and don't wait until initialization finishes