DIRECTORY CHPIDs USING [ps], NetMgtServiceSupport USING [RegisterService], NSExec USING [AssignClientID, ClientID, ClientProcs, Command, CreateClient], NSString USING [String], PSExec, PSExecInternal USING [Expunge, Initialize, Name, Start, Status, Stop, PrintServiceCommand], PSExecMessages USING [Key], PSKMessages USING [GetHandle], Runtime USING [GetBcdTime], ServicesPFOptions USING [ps], XMessage USING [Get, Handle], XString USING [ReaderBody]; PSExecControlImpl: CEDAR PROGRAM IMPORTS NetMgtServiceSupport, NSExec, PSExecInternal, PSKMessages, Runtime, XMessage EXPORTS PSExec SHARES XString = BEGIN clientProcs: NSExec.ClientProcs _ [ init: PSExecInternal.Initialize, start: PSExecInternal.Start, stop: PSExecInternal.Stop, unload: NIL, --Not implemented by SCS in 8.0. expunge: PSExecInternal.Expunge, --called when print service is being permanently removed from a server logon: , logoff: , name: PSExecInternal.Name, --returns the name of the print service status: PSExecInternal.Status--returns the print service status and a short comment about that status ]; clientID: NSExec.ClientID _ NSExec.AssignClientID[]; execMsgs: XMessage.Handle; printService: NSExec.Command; GetClientID: PUBLIC PROCEDURE RETURNS [NSExec.ClientID] = BEGIN RETURN [clientID]; END; --GetPSClientID M: PROCEDURE [key: PSExecMessages.Key] RETURNS [string: NSString.String] = { r: XString.ReaderBody _ XMessage.Get[execMsgs, ORD[key]]; string _ [bytes: LOOPHOLE[r.bytes], length: r.limit, maxlength: r.limit]}; execMsgs _ PSKMessages.GetHandle[exec]; printService _ [ name: M[mPrintService], proc: PSExecInternal.PrintServiceCommand]; NSExec.CreateClient[ id: clientID, command: printService, procs: clientProcs, acronym: M[mPrompt]]; NetMgtServiceSupport.RegisterService[ clientID: clientID, serviceOption: ServicesPFOptions.ps, pid: CHPIDs.ps, bcdTime: Runtime.GetBcdTime[]]; END. --PSExecControlImpl LOG 24-Aug-83 15:54:52 - Jacks - Created as part of PSCommand rework. This is the module that gets called at startup time. 6-Dec-83 10:34:01 - Jacks - Changed stop proc from PSCommand.StopPrintService to PSTTYExec.StopPrintService. 20-Dec-83 13:05:00 - Jacks - Replaced PSKernelMessages with ControlMessages. 27-Jan-84 10:12:21 - Jacks - Converted to 8.0 SCS. 8-May-84 8:49:09 - Jacks - Replaces ControlMessages.mHerald with ServiceNameMessages.keyPS. 9-Jul-84 18:29:29 - Jacks - Added call to NetMgtServiceSupport.RegisterService. 3-Oct-84 16:04:39 - Jacks - Module renamed from PSControlImpl to PSExecControlImpl; procs in PSTTYExec were moved to PSExecInternal; GetPSClientID renamed to GetClientID; got rid of PSControl interface-use PSExec instead. 19-Jun-85 15:54:23 - Jacks - Added copyright notice. 18-Jul-85 15:06:49 - Jacks - Updated to Euclid Services, including XMessage. 6-Nov-85 14:06:56 - Jacks - Call PSKMessages for msg handle. 13-Dec-85 16:47:41 - Jacks - ExecMessages renamed to PSExecMessages. PPSExecControlImpl.mesa Copyright (C) Xerox Corporation 1983, 1984, 1985. All rights reserved. Last edited by Jacks 13-Dec-85 16:47:54 Ruseli Binsol: November 7, 1986 1:47:35 pm PST Proc for getting NSString from XMessage key activityCheck and helpProc are NIL; proc is called whenever "Print Service" command is entered at TTY. Κ˜™J™FJ™'Icode™.—J˜J˜šΟk ˜ Jšœœ˜Jšœœ˜-Jšœœ@˜LJšœ œ ˜J˜JšœœG˜[Jšœœ˜Jšœ œ ˜Jšœœ˜Jšœœ˜Jšœ œ˜Jšœœ˜—J˜šΟnœ ˜ JšœM˜TJšœ˜Jšœ ˜J˜˜#J˜ J˜J˜JšœœΟc ˜-Jšœ!ŸF˜gJ˜JšœŸ'˜BJšœŸH˜eJ˜J˜—J˜4J˜J˜J˜š ž œœ œœ˜?Jšœ œŸ˜'J˜—Jšœ+™+šžœ œ˜&Jšœ˜%Jšœ/œ˜9Jšœœ1˜JJ˜J˜—J˜'˜J˜J˜*Jšœ$™$JšœB™B—J˜˜J˜$J˜)—˜%J˜8J˜/J˜—JšœŸ˜J˜Jš˜—˜wJ˜l—J˜Lšœ.œ˜2J˜\J˜OJ˜ή—J˜5˜LJ˜<—J˜DJ˜—…— lΛ