SpoolControl.mesa
Copyright (C) Xerox Corporation 1981, 1982, 1983, 1984, 1985, 1986. All rights reserved.
Last modified by Jacks on 22-Jul-85 15:05:21.
Tim Diebert: December 29, 1986 10:13:44 am PST
<<The Print Service's internal interface for Spool Control.>>
DIRECTORY
MarkerControl USING [ClientProcsHandle],
PrintQueue USING [QueueStage],
PSAsyncMsg USING [Proc],
XNS USING [Address];
SpoolControl: CEDAR DEFINITIONS = BEGIN
SpoolStatus: TYPE = RECORD [
enabled: BOOLEAN,
connectionsAllowed: CARDINAL, -- maximum allowable concurrent Courier connections
currentConnections: CARDINAL
];
WaitChoice: TYPE = {wait, dontWait};
TraceLevel: TYPE = {none, mini, verbose};
Init: PROCEDURE [maxConnections: CARDINAL,
markerProcs: MarkerControl.ClientProcsHandle,
putAsyncMsgFromKey: PSAsyncMsg.Proc]
RETURNS [XNS.Address];
Start: PROCEDURE;
Enables spooling and returns. Undoes a Suspend or Stop.
Suspend: PROCEDURE;
Stops ongoing activity and refuses new connection requests.
Stop: PROCEDURE [disposeQ: PrintQueue.QueueStage];
Aborts ongoing activity and refuses new connection requests. Spooling in progress is aborted and the associated QueueObjects are placed in disposeQ.
Stopped: PROCEDURE [wither:WaitChoice ← dontWait] RETURNS[BOOLEAN];
IF wither=wait, returns TRUE when spooling is stopped.
IF wither=dontWait, return immediately.
ModifyTraceLevel: PROCEDURE [trace: TraceLevel];
Connections: PROCEDURE [number: INTEGER];
Add (subtract) number allowable concurrent network connections.
Status: PROCEDURE RETURNS [spoolStatus: SpoolStatus];
==== ==== ==== ==== ====
Communications Control
==== ==== ==== ==== ====
Control: TYPE = RECORD [
abortedQ: PrintQueue.QueueStage ← aborted,
allowConnection, abortCurrent, printingPreempt, resumePrinting: BOOLEANFALSE,
currentConnections: CARDINAL ← 0,
maxConnections: CARDINAL ← 0,
markerProcs: MarkerControl.ClientProcsHandle ← NIL,
putAsyncMsgFromKey: PSAsyncMsg.Proc ← NIL,
trace: TraceLevel ← none];
ControlHandle: TYPE = REF Control;
control: PRIVATE ControlHandle;
ErrorTypes: TYPE = {busy, spoolFull, spoolingDisabled, tooManyConnections};
Error: PRIVATE ERROR [type: ErrorTypes];
==== ==== ==== ==== ====
Control Procs
==== ==== ==== ==== ====
ConnectionClosed: PRIVATE PROCEDURE;
FilterConnection: PRIVATE PROCEDURE;
END.
LOG
February 10, 1981 1:33 PM by J.Beeley Action: Created file.
April 13, 1981 4:10 PM by JB. Upgraded interface to be consistant with other PrintServer control interfaces.
May 28, 1981 4:35 PM by JB. Imported TraceLevel from PSExec.
June 19, 1981 5:03 PM by JB. Added ModifyTraceLevel, System.NetworkAddress.
July 8, 1981 9:15 PM by JB. Defined TraceLevel locally; removed ListQueue, AbortQueue.
September 23, 1981 5:08 PM by JB. Modified to define allocatable queue pages.
15-Sep-82 13:26:26 - JB - Converted for use by Telepress and NSPrint server modules.
19-Oct-82 9:30:06 - JB - Added Volume.PageCount to queue page allocation; change QueuePages to RecalculateQueuePages.
14-Feb-83 14:02:29 - JB - Added 'busy' to ErrorTypes.
5-Aug-83 13:56:43 - Jacks - Changes for PSCommand rework: Changed CommandInterface.TraceLevel to PSState.TraceLevel.
8-Nov-83 9:44:23 - Jacks - Removed PSState.TraceLevel and defined it locally to be consistent with DecomposerControl and MarkerControl.
6-Dec-83 9:36:23 - Jacks - Added PutAsyncMsgFromKey to Init.
19-Dec-83 15:29:24 - Jacks - Removed queue stages from Init and Control; removed trace from Init.
26-Jan-84 22:48:53 - Jacks - Added Cleanup.
8-Nov-84 11:33:42 - Jacks - Removed Cleanup.
13-Jun-85 12:53:33 - Jacks - Added copyright notice.
22-Jul-85 15:05:16 - Jacks - Removed RecalculateQueuePages; removed queuePages and allocatedPages from SpoolStatus; PSAsyncMsg interface change.