222. Spooler

Some utility functions for spooler settings

222.1. Summary of Module Globals

List of Global Functions

  • AdjustServices - Adjust services for runlevel, set them to state needed for writing

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

  • GetAvailableQueues - List all available queues (local and remote)

  • GetSystemForbiddenNames - Get list of names that are forbidden by the currently used spooler

  • Initialize - Initialize current spooler

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

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

  • StopServices - stop currently running printer spooler service

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

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

  • chooseSpooler - Shows a question to a user what spooler he wants.

  • getSpoolSystem - Test which spooling system is most probably used.

  • getSpoolerItems - get RadioButtonGroup for spooler selection

  • restartServices - Restart printer daemon

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

  • testSupportedQueue - Test whether currently used spooler supports queue type

  • testSupportedQueueBySpooler - Test whether spooler supports queue type

List of Global Variables

    222.2. Global Functions

    222.2.1. AdjustServices

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

    Function parameters

    • boolean have_some_queue

    Return value

    • boolean - true on success

    222.2.2. Get

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

    Return value

    • string - currently used spooler

    222.2.3. GetAvailableQueues

    List all available queues (local and remote)

    Return value

    • list<string> - a list of strings all available queues

    222.2.4. GetSystemForbiddenNames

    Get list of names that are forbidden by the currently used spooler

    Return value

    • list - a list of strings -- these strings are not allowed as queue names.

    222.2.5. Initialize

    Initialize current spooler

    Return value

    • boolean - true on success

    222.2.6. RestartIfNeeded

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

    Function parameters

    • boolean showPopup

    Return value

    • void

    222.2.7. Set

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

    Function parameters

    • string spooler_type

    Return value

    • void

    222.2.8. StopServices

    stop currently running printer spooler service

    Return value

    • void

    222.2.9. checkSpoolSystem

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

    Return value

    • string - spooler

    222.2.10. checkSpoolSystemNoDialog

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

    Return value

    • string - spooler

    222.2.11. chooseSpooler

    Shows a question to a user what spooler he wants.

    Function parameters

    • string msg

    • string abort_msg

    Return value

    • symbol - specifying users selecion (cups, cups_client, exit)

    222.2.12. getSpoolSystem

    Test which spooling system is most probably used.

    Return value

    • integer - with some bits set:<br> 1 if lpd is installed<br> 2 if cups is installed<br> (therefore 0 if none is installed)<br> (therefore 3 if both are installed)<br> 4 if only iprint is installed<br> 256 is added if the instalation doesn't seem to be complete

    222.2.13. getSpoolerItems

    get RadioButtonGroup for spooler selection

    Function parameters

    • string spooler

    • boolean none

    Return value

    • term - RadioButtonGroup widget

    222.2.14. restartServices

    Restart printer daemon

    Function parameters

    • boolean have_some_queue

    Return value

    • boolean - true on success

    222.2.15. switchTo

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

    Function parameters

    • string to

    Return value

    • void

    222.2.16. testSupportedQueue

    Test whether currently used spooler supports queue type

    Function parameters

    • string queue

    Return value

    • boolean - true if supports

    222.2.17. testSupportedQueueBySpooler

    Test whether spooler supports queue type

    Function parameters

    • string queue

    • string spooler

    Return value

    • boolean - true if supports

    222.3. Global Variables

    222.4. Module Requirements

    222.4.1. Module Imports

    • CUPS
    • CommandLine
    • FileUtils
    • Label
    • Mode
    • Package
    • PackageAI
    • PackageCallbacksInit
    • PackageSystem
    • Popup
    • Printerdb
    • Report
    • Service

    222.4.2. Module Includes