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
12-Jan-84 18:15:25 - Jacks - Removed SelectTestPattern.
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.