Print
printerManager

(HANDLE appSession, Printer defaultPrinter, OUTPUT INTEGER numActivePrinters)

Manage the printer master table.

Author:
John Green, January 1997
Parameters:
appSession - Handle to the application session persistent procedure.
defaultPrinter - The default printer for this manager.
numActivePrinters - Output the number of printerswhere disabled is set to false.

Method Summary
PROCEDURE disablePrinter (CHARACTER note, OUTPUT LOGICAL wasDisabled)
           Disable a printer.
Printer FUNCTION findAvailablePrinter (PrintDocument document)
           Find an available printer appropriate for a document.
INT64 FUNCTION findByName (CHARACTER name)
           Find a printer ID by printer name.
PROCEDURE submit (Printer printer, PrintDocument document)
           Submit a PrintDocument to a Printer.
 

Method Detail

disablePrinter

PROCEDURE disablePrinter(CHARACTER note, OUTPUT LOGICAL wasDisabled)
Disable a printer.

A disabled printer cannot have jobs submitted to it.
Parameters:
note - The user's message attached to the printer, to tellother users why the printer has been disabled.
wasDisabled - Was the printer already disabled?

findAvailablePrinter

FUNCTION Printer findAvailablePrinter(PrintDocument document)
Find an available printer appropriate for a document.

Parameters:
printDocument - The PrintDocument which the printer must be capable of printing.
Returns:
An available Printer, null if none available.

findByName

FUNCTION INT64 findByName(CHARACTER name)
Find a printer ID by printer name.

Parameters:
name - The printer name or enough of the name to find it uniquely.
Returns:
The printer ID if found uniquely, otherwise zero.

submit

PROCEDURE submit(Printer printer, PrintDocument document)
Submit a PrintDocument to a Printer.