<<>> <> <> <> <> <> DIRECTORY BridgeComm, IO, Rope; BridgeExec: CEDAR DEFINITIONS ~ { <> ROPE: TYPE ~ Rope.ROPE; NetworkStreamPair: TYPE ~ BridgeComm.NetworkStreamPair; <> Register: PROC [ name: ROPE, -- name under which command is registered. createProc: CreateProc, -- proc invoked to instantiate. clientData: REF, -- passed to cmdProc to instantiate. destroyProc: DestroyProc -- proc invoked to act on instances. ]; <> <> CreateSession: PROC [sessionName: ROPE] RETURNS [newSession: Session]; <> DestroySession: PROC [session: Session]; <> SessionNameFromSession: PROC [session: Session] RETURNS [sessionName: ROPE]; SessionIsDead: PROC [session: Session] RETURNS [dead: BOOL]; <> Instance: TYPE ~ REF; -- identifies instance; opaque to BridgeExec package. Session: TYPE ~ REF SessionObject; SessionObject: TYPE; -- identifies session to BridgeExec package; opaque to clients. CreateProc: TYPE ~ PROC [ nsp: NetworkStreamPair, -- streams for communication with host. args: ROPE, -- as sent from host, with leading blanks stripped but no other processing performed. The command name is not included. By convention, args are terminated (rather than separated) by CRs. session: Session, -- session in which this instance is being created. clientData: REF -- the clientData that was passed to AddCommand. ] RETURNS [ instance: Instance -- newly-created instance, or NIL. ]; <<>> DestroyProc: TYPE ~ PROC [ instance: Instance, -- instance to be killed. clientData: REF -- NIL if called by BridgeExec package. ]; CreateInstance: PROC[cmdName: ROPE, nsp: NetworkStreamPair, args: ROPE, session: Session, close: PROC [nsp: NetworkStreamPair]] RETURNS [instance: Instance]; <> DestroyInstance: PROC [session: Session, instance: Instance, clientData: REF ¬ NIL]; <> }...