PSExecInternal.mesa
Copyright (C) Xerox Corporation 1983, 1984, 1985, 1986. All rights reserved.
Last edited by Jacks 13-Dec-85 16:49:21
Tim Diebert: October 23, 1986 1:44:57 pm PDT
Ruseli Binsol: December 8, 1986 9:41:18 am PST
<<Procedures shared by all PSExec*Impl modules.>>
DIRECTORY
CHNameP2V0 USING [Name],
NSExec USING [ClientStatus, ExecProc, Handle, StopMode],
NSString USING [String],
PSExecMessages USING [Key],
XMessage USING [StringArray];
PSExecInternal: CEDAR DEFINITIONS = BEGIN
OPEN CHName: CHNameP2V0;
==== ==== ====
COPIED TYPES:
==== ==== ====
==== ==== ====
TYPES:
==== ==== ====
KeyList: TYPE = REF KeyListRep;
KeyListRep: TYPE ~ RECORD [keys: SEQUENCE cnt: CARDINAL OF PSExecMessages.Key];
ChoiceList: TYPE ~ REF XMessage.StringArray;
RegCode: TYPE = {
ok, --operation successful
aborted, --unable to complete operation
checkClearinghouse --operation recorded in stable data, but there is a question as to whether the change was properly recorded at the Clearinghouse
};
==== ==== ====
VARIABLES:
==== ==== ====
printServiceName: CHName.Name; --Fully qualified name of the Print Service; may be NIL.
developmentMode: BOOLEAN; --set TRUE if server is booted with development switch
==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
NSEXEC CLIENT PROCS:
These procedures are parameters in the call to NSExec.CreateClient.
NSExec.ExecProc: TYPE = PROCEDURE [exec: Handle]--
==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Initialize: PROCEDURE [exec: NSExec.Handle, normal: BOOLEAN];
Start: NSExec.ExecProc;
Stop: PROCEDURE [exec: NSExec.Handle, stopMode: NSExec.StopMode];
Expunge: NSExec.ExecProc; --called when print service is being permanently removed from a server. This proc should delete any data files created during runtime, but will not be needed after the print service is permanently removed.
Name: PROCEDURE [nameProc: PROCEDURE [clientName: NSString.String]];
returns the name of the print service by calling nameProc with the appropriate string.
Status: PROCEDURE [statusProc: PROCEDURE [status: NSExec.ClientStatus, comment: NSString.String]];
returns the print service status and a short comment about that status by calling statusProc.
PrintServiceCommand: NSExec.ExecProc; --called whenever "Print Service" command is entered at Services Executive.
==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
COMMAND PROCESSING ROUTINES:
NSExec.ExecProc: TYPE = PROCEDURE [exec: Handle]--
==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
DisplayDocuments: NSExec.ExecProc;
CancelDocuments: NSExec.ExecProc;
StartQueuingAndPrinting: NSExec.ExecProc;
StopQueuingAndPrinting: NSExec.ExecProc;
StartPrinting: NSExec.ExecProc;
StopPrinting: NSExec.ExecProc;
StartQueuing: NSExec.ExecProc;
StopQueuing: NSExec.ExecProc;
StartDiagnostic: NSExec.ExecProc;
ShutDownPrinter: NSExec.ExecProc;
WakeUpPrinter: NSExec.ExecProc;
ResetStatistics: NSExec.ExecProc;
RenamePrintService: NSExec.ExecProc;
DisplayFonts: NSExec.ExecProc;
DisplayTestPatterns: NSExec.ExecProc;
DeleteFonts: NSExec.ExecProc;
DeleteTestPatterns: NSExec.ExecProc;
InstallFromFloppy: NSExec.ExecProc;
PrintTestPattern: NSExec.ExecProc;
SetParameters: NSExec.ExecProc;
PutPrinterDisplay: NSExec.ExecProc;
GetPrinterDisplay: NSExec.ExecProc;
SetTargetPrintService: NSExec.ExecProc;
SetTrace: NSExec.ExecProc;
DisplayPrintServiceStatus: NSExec.ExecProc;
QueryTargetPrintService: NSExec.ExecProc;
==== ==== ==== ====
SUPPORT ROUTINES:
==== ==== ==== ====
DisplayCount: PROCEDURE [exec: NSExec.Handle, count: CARDINAL,
msg: PSExecMessages.Key];
ExpandKeyAndPrint: PROCEDURE [exec: NSExec.Handle, template: PSExecMessages.Key, stringArray: ChoiceList];
ExpandArrayAndPrint: PROCEDURE [exec: NSExec.Handle, template: NSString.String,
stringArray: ChoiceList];
ExpandArrayAndPrintAsync: PROCEDURE [template: NSString.String,
stringArray: ChoiceList];
GetList: PROCEDURE [length: CARDINAL, keys: KeyList, stringArray: ChoiceList];
Get a list of messages defined by keys from the msg file and put the strings in stringArray. NOTE: 'keys' and 'stringArray' must be as long as 'length'
Print: PROCEDURE [exec: NSExec.Handle, message: NSString.String];
DeleteServiceFromClearinghouse: PROCEDURE [exec: NSExec.Handle]
RETURNS
[code: RegCode];
RegisterServiceAtClearinghouse: PROCEDURE [exec: NSExec.Handle]
RETURNS [code: RegCode, serviceName: CHName.Name ← [NIL, NIL, NIL]];
END. --PSExecInternal
LOG
date - who - what
24-Oct-83 18:00:00 - Jacks - Created because PSTTYExecImpl had to be split up.
5-Dec-83 14:38:14 - Jacks - Added ExpandArrayAndPrint.
9-Jan-84 13:29:04 - Jacks - Added command processing routines from PSTTYExecCImpl and PSTTYExecDImpl.
12-Jan-84 18:15:25 - Jacks - Removed SelectTestPattern.
18-Jan-84 16:40:08 - Jacks - Converted to 8.0 SCS.
7-Feb-84 11:37:51 - Jacks - Removed SetRegistration.
23-Feb-84 21:29:24 - Jacks - Added ttyHeap, PutPrinterDisplay and GetPrinterDisplay.
3-Apr-84 18:41:41 - Jacks - Added Exec.Handle's to support routines.
3-Oct-84 11:26:37 - Jacks - Renamed from PSTTYExecInternal to PSExecInternal; Added ExpandArrayAndPrintAsync, DeleteServiceFromClearinghouse and RegisterAsyncMessageProc; added all PSExecAImpl exec procs; added all NSExec client procs.
28-Feb-85 15:20:54 - Jacks - Added SetTargetPrintService and QueryTargetPrintService; renamed ttyHeap to execHeap.
14-Jun-85 16:53:17 - Jacks - Added copyright notice.
18-Jul-85 10:18:52 - Jacks - Converted to new message interface; added GetList.
13-Dec-85 16:48:30 - Jacks - ExecMessages renamed to PSExecMessages.