YaST2 Developers Documentation: Printing spooler library.



functions
files
intro

Printing spooler library.

modules/Spooler.ycp
Some utility functions for spooler settings
Printer library exported functions. What else?!?

Imports

  • CUPS
  • LPRng
  • Label
  • Mode
  • Package
  • PackageCallbacksInit
  • PackageSystem
  • Popup
  • Report
  • Require
  • Service

Global Functions

Local Variables

Local Functions

local spooler -> string

Currently used spooler, cups or lprng

local sys_forbidden_names -> list<string>

Printer's name mustn't be the same as a name of one of the files in the /etc/lpdfilter directory. These are the files. If it is nil, the list hasn't been initialized yet. Use function getSystemForbiddenNames for accessing this list.

local showCupsInitPopup () -> void

display CUPS initialization popup

global Get () -> string

Get the currently used spooler FIXME TODO if not known, detect

Return value:
currently used spooler

global Set (string spooler_type) -> void

Set the spooler that is used FIXME high-level functions should be used instead of this one, this should get local

Parameters:
spooler_type string spooler that is used

global getSpoolerItems (string spooler, boolean none) -> term

get RadioButtonGroup for spooler selection

Parameters:
spooler string currently used spooler (cups, cups-client, lprng or current)
none boolean show leaving current status
Return value:
RadioButtonGroup widget

global chooseSpooler (string msg, string abort_msg) -> symbol

Shows a question to a user whether he wants the LPRng or CUPS spooler.

Parameters:
msg string to be displayed
abort_msg label of abort button
Return value:
specifying users selecion (lprng, cups, exit)

global getSystemForbiddenNames () -> list

Get list of names that are forbidden because they are used as filenames in /etc/lpdfilter

Return value:
of strings -- these strings are not allowed as queue names.

global StopServices () -> void

stop currently running printer spooler service

global getSpoolSystem () -> integer

Test which spooling system is most probably used.

Return value:
with some bits set:
1 if lpd is installed
2 if cups is installed
(therefore 0 if none is installed)
(therefore 3 if both are installed)
256 is added if the instalation doesn't seem to be complete

global switchTo (string to) -> void

Uninstalls print spoolers and installs selected one. Stops all spoolers before installation.

Parameters:
to Spooler to install. Should be one of "cups" "lprng"

global AreDriversInstaller () -> boolean

Check if drivers for current spooler are installed

Return value:
true if all available drivers are installed

global InstallDrivers () -> boolean

Install drivers for current spooler

Return value:
true on success

global RestartIfNeeded (boolean showPopup) -> void

check whether spooler (if needed to be running) runns, if not start it

Parameters:
showPopup boolean true if shall show a popup if needed

global AdjustServices (boolean have_some_queue) -> boolean

Adjust services for runlevel, set them to state needed for writing

Parameters:
have_some_queue true if at least one queue was configured
Return value:
true on success

global checkSpoolSystemNoDialog () -> string

Check what spool system is installed. Don't ask user.

Return value:
spooler

global checkSpoolSystem () -> string

Check what spool system is installed. Ask user if needed and install spooler if wanted.

Return value:
spooler

global testSupportedQueueBySpooler (string queue, string spooler) -> boolean

Test whether spooler supports queue type

Parameters:
queue string queue type (eg. parallel)
spooler string "cups" or "lprng"
Return value:
true if supports

global testSupportedQueue (string queue) -> boolean

Test whether currently used spooler supports queue type

Parameters:
queue string queue type (eg. parallel)
Return value:
true if supports

global restartServices (boolean have_some_queue) -> boolean

Restart printer daemon

Parameters:
have_some_queue true if at least one queue was configured
Return value:
true on success

global GetAvailableQueues () -> list<string>

List all available queues (local and remote)

Return value:
a list of strings all available queues

YaST2 Developers Documentation