Printing spooler library.
|
modules/Spooler.ycp
|
|
Some utility functions for spooler settings
|
|
|
|
Printer library exported functions. What else?!?
Imports
- CUPS
- CommandLine
- Label
- Mode
- Package
- PackageAI
- PackageCallbacksInit
- PackageSystem
- Popup
- Printerdb
- Report
- Service
Global Functions
Local Variables
Local Functions
|
|
|
Currently used spooler, cups or unknown (means none installed)
|
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
Get the currently used spooler
FIXME TODO if not known, detect
- Return value:
|
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,
or current) |
|
none |
boolean show leaving current status |
- Return value:
|
global chooseSpooler (string msg, string abort_msg) -> symbol
|
|
Shows a question to a user what spooler he wants.
- Parameters:
|
msg |
string to be displayed |
|
abort_msg |
label of abort button |
- Return value:
|
|
specifying users selecion (cups, cups_client, exit) |
|
global GetSystemForbiddenNames () -> list
|
|
Get list of names that are forbidden by the currently used spooler
- Return value:
|
|
a list 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" "cups_client" |
|
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:
|
global checkSpoolSystemNoDialog () -> string
|
|
Check what spool system is installed. Don't ask user.
- Return value:
|
global checkSpoolSystem () -> string
|
|
Check what spool system is installed. Ask user if needed and install spooler if wanted.
- Return value:
|
global testSupportedQueueBySpooler (string queue, string spooler) -> boolean
|
|
Test whether spooler supports queue type
- Parameters:
|
queue |
string queue type (eg. parallel) |
|
spooler |
string spooler name ("cups") |
- Return value:
|
global testSupportedQueue (string queue) -> boolean
|
|
Test whether currently used spooler supports queue type
- Parameters:
|
queue |
string queue type (eg. parallel) |
- Return value:
|
global restartServices (boolean have_some_queue) -> boolean
|
|
Restart printer daemon
- Parameters:
|
have_some_queue |
true if at least one queue was configured |
- Return value:
|
global GetAvailableQueues () -> list<string>
|
|
List all available queues (local and remote)
- Return value:
|
|
a list of strings all available queues |
|
global Initialize () -> boolean
|
|
Initialize current spooler
- Return value:
|