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; 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 }; printServiceName: CHName.Name; --Fully qualified name of the Print Service; may be NIL. developmentMode: BOOLEAN; --set TRUE if server is booted with development switch 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]]; Status: PROCEDURE [statusProc: PROCEDURE [status: NSExec.ClientStatus, comment: NSString.String]]; PrintServiceCommand: NSExec.ExecProc; --called whenever "Print Service" command is entered at Services Executive. 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; 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]; 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. ψ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 <> ==== ==== ==== COPIED TYPES: ==== ==== ==== ==== ==== ==== TYPES: ==== ==== ==== ==== ==== ==== VARIABLES: ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== NSEXEC CLIENT PROCS: These procedures are parameters in the call to NSExec.CreateClient. NSExec.ExecProc: TYPE = PROCEDURE [exec: Handle]-- ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== returns the name of the print service by calling nameProc with the appropriate string. returns the print service status and a short comment about that status by calling statusProc. ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== COMMAND PROCESSING ROUTINES: NSExec.ExecProc: TYPE = PROCEDURE [exec: Handle]-- ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== SUPPORT ROUTINES: ==== ==== ==== ==== 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' ΚB˜codešœ™KšœL™LKšœ'™'K™,K™.K™K™1K™—K˜šΟk ˜ Kšœ œ˜Kšœœ,˜8Kšœ œ ˜Kšœœ˜Kšœ œ˜—K˜šΠlnœœ œ˜)KšœΟnœ ˜K˜Kšœ™Kšœœ™ Kšœ™K™K˜Kšœ™Kšœ™Kšœ™K˜Kšœ œœ ˜Kš œ œœœœœ˜OK˜Kšœ œœ˜,K˜šœ œ˜KšœΟc˜Kšœ  ˜'Kšœ €˜“K˜—K˜Kšœ™Kšœ ™ Kšœ™K˜Kšœ 8˜WKšœœ 6˜PK˜KšœE™EKšœ™KšœC™CKšœ2™2KšœE™EK˜KšŸ œ œœ˜=K˜KšŸœ˜K˜KšŸœ œ2˜AK˜KšŸœ Ξ˜θK˜šŸœ œ  œ ˜DKš V™VK˜—šŸœ œ œ:˜bKš ]™]K˜—KšŸœ K˜qK˜Kšœ6™6Kšœ™Kšœ2™2Kšœ6™6K˜KšŸœ˜"KšŸœ˜!KšŸœ˜)KšŸœ˜(KšŸ œ˜KšŸ œ˜KšŸ œ˜KšŸ œ˜KšŸœ˜!KšŸœ˜!KšŸ œ˜KšŸœ˜!KšŸœ˜$K˜KšŸ œ˜KšŸœ˜%KšŸ œ˜KšŸœ˜$KšŸœ˜#KšŸœ˜"K˜KšŸ œ˜KšŸœ˜#KšŸœ˜#KšŸœ˜'KšŸœ˜K˜KšŸœ˜+KšŸœ˜)K˜Kšœ™Kšœ™Kšœ™K˜KšŸ œ œœ˜XKšŸœ œN˜jKšŸœ œK˜iKšŸœ œ6˜YšŸœ œ œ*˜NKšœ˜™˜—KšŸœ œ1˜AK˜KšŸœ œœ˜XKš Ÿœ œœ-œœœ˜„K˜Kšœ ˜K˜Kš˜—K˜˜NK˜6K˜e—K˜7šœ.œ˜2K˜4—˜TK˜DK˜λ—K˜rK˜4K˜OK˜D—…—ά