PSExecControlImpl.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
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
Proc for getting NSString from XMessage key
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];
activityCheck and helpProc are NIL;
proc is called whenever "Print Service" command is entered at TTY.
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.