-- Copyright (C) 1986 by Xerox Corporation. All rights reserved. -- Stub file was translated on April 18, 1986 12:26:00 pm PST by Lupine of May 23, 1985 8:38:08 am PDT -- Source interface ComputeServerCallbacks came from file ComputeServerCallbacks.bcd, which was created on April 18, 1986 12:25:46 pm PST with version stamp 30#377#27632646066 from source of April 18, 1986 12:25:33 pm PST. -- The RPC stub modules for ComputeServerCallbacks are: -- ComputeServerCallbacksRpcControl.mesa; -- ComputeServerCallbacksRpcClientImpl.mesa; -- ComputeServerCallbacksRpcBinderImpl.mesa; -- ComputeServerCallbacksRpcServerImpl.mesa. -- The parameters for this translation are: -- Target language = Cedar -- Default parameter passing = VALUE -- Deallocate server heap arguments = TRUE -- Inline RpcServerImpl dispatcher stubs = FALSE -- Declare signals = FALSE -- Warn about short POINTER ("MDS") allocations = TRUE -- Maximum number of dynamic heap NEWs = 50, MDS NEWs = 50 -- Acceptable parameter protocols = VersionRange[1..1]. DIRECTORY BasicTime, FS, IO, Pup, Rope, RPC, UserCredentials, ComputeServerCallbacks, ComputeServerCallbacksRpcControl USING [InterfaceRecord, InterMdsCallsOnly, LupineProtocolVersion, ProcedureIndex, SignalIndex], RPCLupine --USING SOME OF [Alloc, Call, DataLength, DeAlloc, Dispatcher, -- GetPkt, GetStubPkt, ImportHandle, ImportInterface, maxDataLength, -- maxPrincipalLength, maxShortStringLength, pktOverhead, ReceiveExtraPkt, -- SendPrelimPkt, StartCall, StartSignal, StubPkt, UnimportInterface]--, LupineRuntime --USING SOME OF [BindingError, CheckPktLength, CopyFromPkt, -- CopyFromMultiplePkts, CopyToPkt, CopyToMultiplePkts, defaultZones, -- DispatchingError, FinishThisPkt, ListHeader, MarshalingError, -- MarshalingExprError, MarshalAtom, MarshalRope, NilHeader, ProtocolError, -- RopeHeader, RpcPktDoubleWord, RuntimeError, SequenceHeader, SHORT, -- StartNextPkt, StringHeader, StubPktDoubleWord, TranslationError, -- UnmarshalingError, UnmarshalingExprError, UnmarshalAtom, UnmarshalRope, -- WordsForChars]--, Atom --USING SOME OF [GetPName, MakeAtom]--, PrincOpsUtils --USING SOME OF [Enter, Exit]--, VM --USING SOME OF [AddressForPageNumber, PageCount, PageNumber, -- PageNumberForAddress, PagesForWords]--; ComputeServerCallbacksRpcClientImpl: MONITOR IMPORTS ComputeServerCallbacks, RpcPrivate: RPCLupine, Lupine: LupineRuntime, Atom, PrincOpsUtils, Rope EXPORTS ComputeServerCallbacksRpcControl SHARES ComputeServerCallbacks, ComputeServerCallbacksRpcControl, Rope = BEGIN OPEN ComputeServerCallbacks, RpcControl: ComputeServerCallbacksRpcControl, RpcPublic: RPC; -- Standard remote binding routines. ImportInterface: PUBLIC ENTRY SAFE PROCEDURE [ interface: RpcControl.InterfaceRecord, interfaceName: RpcPublic.InterfaceName, parameterStorage: RpcPublic.Zones ] = TRUSTED BEGIN ENABLE UNWIND => NULL; IsNull: PROCEDURE [string: Rope.ROPE] RETURNS [BOOLEAN] = INLINE {RETURN[string.Length[] = 0]}; interface↑ ← [Error: Error, clientStubrGeneric: clientStubrGeneric, clientStubrSetDefaultWDir: clientStubrSetDefaultWDir, clientStubrGetDefaultWDir: clientStubrGetDefaultWDir, clientStubrExpandName: clientStubrExpandName, clientStubrFileInfo: clientStubrFileInfo, clientStubrStartEnumerateForInfo: clientStubrStartEnumerateForInfo, clientStubrNextEnumerateForInfo: clientStubrNextEnumerateForInfo, clientStubrStartEnumerateForNames: clientStubrStartEnumerateForNames, clientStubrNextEnumerateForNames: clientStubrNextEnumerateForNames, clientStubrDoneEnumerate: clientStubrDoneEnumerate, clientStubrOpen: clientStubrOpen, clientStubrCreate: clientStubrCreate, clientStubrOpenOrCreate: clientStubrOpenOrCreate, clientStubrGetClass: clientStubrGetClass, clientStubrSameFile: clientStubrSameFile, clientStubrGetName: clientStubrGetName, clientStubrGetInfo: clientStubrGetInfo, clientStubrSetPageCount: clientStubrSetPageCount, clientStubrSetByteCountAndCreatedTime: clientStubrSetByteCountAndCreatedTime, clientStubrRead: clientStubrRead, clientStubrWrite: clientStubrWrite, clientStubrClose: clientStubrClose, clientStubrCopy: clientStubrCopy, clientStubrDelete: clientStubrDelete, clientStubrRename: clientStubrRename, clientStubrSetKeep: clientStubrSetKeep, clientStubrBoolean: clientStubrBoolean, clientStubrNumber: clientStubrNumber, clientStubrToken: clientStubrToken, clientStubrListOfTokens: clientStubrListOfTokens, clientStubrLine: clientStubrLine, clientStubrGetProfileName: clientStubrGetProfileName, clientStubrGetState: clientStubrGetState, clientStubrGet: clientStubrGet, clientStubOpenDebugStream: clientStubOpenDebugStream, clientStubOpenSourceViewer: clientStubOpenSourceViewer]; interface.myInterface ← RpcPrivate.ImportInterface [ interface: [ type: IF ~IsNull[interfaceName.type] THEN interfaceName.type ELSE "ComputeServerCallbacks~30#377#27632646066", instance: interfaceName.instance, version: interfaceName.version ], localOnly: RpcControl.InterMdsCallsOnly, stubProtocol: RpcControl.LupineProtocolVersion ]; interface.paramZones ← [ gc: IF parameterStorage.gc # NIL THEN parameterStorage.gc ELSE Lupine.defaultZones.gc, heap: IF parameterStorage.heap # NIL THEN parameterStorage.heap ELSE Lupine.defaultZones.heap, mds: IF parameterStorage.mds # NIL THEN parameterStorage.mds ELSE Lupine.defaultZones.mds ]; interface.bound ← TRUE; END; -- Remote public procedure stubs. clientStubrGeneric: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, requestCode: ATOM, requestString: ROPE] RETURNS [resultCode: ATOM, resultString: ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGeneric]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 1; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt.transferIndex ← rGeneric; BEGIN -- Marshal requestCode: ATOM to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[requestCode, pkt, pktLength]; END; -- Marshal requestCode. BEGIN -- Marshal requestString: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[requestString, pkt, pktLength, FALSE]; END; -- Marshal requestString. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal resultCode: ATOM from pkt.data[pktLength]. [resultCode, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal resultCode. BEGIN -- Unmarshal resultString: ROPE from pkt.data[pktLength]. [resultString, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal resultString. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[resultCode, resultString]; END; -- UNWIND. END; -- rGeneric. clientStubrSetDefaultWDir: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, dir: RPC.ShortROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rSetDefaultWDir]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+35]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 1; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+35]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt.transferIndex ← rSetDefaultWDir; BEGIN -- Marshal dir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[dir, pkt, pktLength, TRUE]; END; -- Marshal dir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+35]; RETURN[]; END; -- UNWIND. END; -- rSetDefaultWDir. clientStubrGetDefaultWDir: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord]RETURNS [anonP1id3742549: RPC.ShortROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetDefaultWDir]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+34]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 1; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+34]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt.transferIndex ← rGetDefaultWDir; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 34, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal anonP1id3742549: RPC.ShortROPE from pkt.data[pktLength]. [anonP1id3742549, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal anonP1id3742549. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+34]; RETURN[anonP1id3742549]; END; -- UNWIND. END; -- rGetDefaultWDir. clientStubrExpandName: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, name: ROPE, wDir: RPC.ShortROPE] RETURNS [fullFName: ROPE, cp: FS.ComponentPositions, dirOmitted: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rExpandName]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ cp (0): FS.ComponentPositions, dirOmitted (12): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 1; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt.transferIndex ← rExpandName; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 13; BEGIN -- OnePkt. -- Move statics from pkt now. [cp: cp, dirOmitted: dirOmitted] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, cp, dirOmitted]; END; -- OnePkt. END; -- UNWIND. END; -- rExpandName. clientStubrFileInfo: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, name: ROPE, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, wDir: RPC.ShortROPE] RETURNS [fullFName: ROPE, attachedTo: ROPE, keep: CARDINAL, bytes: INT, created: BasicTime.GMT] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rFileInfo, wantedCreatedTime (1): BasicTime.GMT, remoteCheck (3): BOOLEAN]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ keep (0): CARDINAL, bytes (1): INT, created (3): BasicTime.GMT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [wantedCreatedTime: wantedCreatedTime, remoteCheck: remoteCheck]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 5; BEGIN -- OnePkt. -- Move statics from pkt now. [keep: keep, bytes: bytes, created: created] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. BEGIN -- Unmarshal attachedTo: ROPE from pkt.data[pktLength]. [attachedTo, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal attachedTo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, attachedTo, keep, bytes, created]; END; -- OnePkt. END; -- UNWIND. END; -- rFileInfo. clientStubrStartEnumerateForInfo: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, pattern: ROPE, wDir: RPC.ShortROPE] RETURNS [fullFName: ROPE, attachedTo: ROPE, created: BasicTime.GMT, bytes: INT, keep: CARDINAL, continue: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rStartEnumerateForInfo, listenerPupAddress (1): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ created (0): BasicTime.GMT, bytes (2): INT, keep (4): CARDINAL, continue (5): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; BEGIN -- Marshal pattern: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[pattern, pkt, pktLength, FALSE]; END; -- Marshal pattern. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 6; BEGIN -- OnePkt. -- Move statics from pkt now. [created: created, bytes: bytes, keep: keep, continue: continue] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. BEGIN -- Unmarshal attachedTo: ROPE from pkt.data[pktLength]. [attachedTo, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal attachedTo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, attachedTo, created, bytes, keep, continue]; END; -- OnePkt. END; -- UNWIND. END; -- rStartEnumerateForInfo. clientStubrNextEnumerateForInfo: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] RETURNS [fullFName: ROPE, attachedTo: ROPE, created: BasicTime.GMT, bytes: INT, keep: CARDINAL, continue: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rNextEnumerateForInfo, listenerPupAddress (1): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ created (0): BasicTime.GMT, bytes (2): INT, keep (4): CARDINAL, continue (5): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 6; BEGIN -- OnePkt. -- Move statics from pkt now. [created: created, bytes: bytes, keep: keep, continue: continue] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. BEGIN -- Unmarshal attachedTo: ROPE from pkt.data[pktLength]. [attachedTo, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal attachedTo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, attachedTo, created, bytes, keep, continue]; END; -- OnePkt. END; -- UNWIND. END; -- rNextEnumerateForInfo. clientStubrStartEnumerateForNames: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, pattern: ROPE, wDir: RPC.ShortROPE] RETURNS [fullFName: ROPE, continue: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rStartEnumerateForNames, listenerPupAddress (1): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ continue (0): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; BEGIN -- Marshal pattern: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[pattern, pkt, pktLength, FALSE]; END; -- Marshal pattern. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 1; BEGIN -- OnePkt. -- Move statics from pkt now. [continue: continue] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, continue]; END; -- OnePkt. END; -- UNWIND. END; -- rStartEnumerateForNames. clientStubrNextEnumerateForNames: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] RETURNS [fullFName: ROPE, continue: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rNextEnumerateForNames, listenerPupAddress (1): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ continue (0): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 1; BEGIN -- OnePkt. -- Move statics from pkt now. [continue: continue] ← resPkt↑; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, continue]; END; -- OnePkt. END; -- UNWIND. END; -- rNextEnumerateForNames. clientStubrDoneEnumerate: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rDoneEnumerate, listenerPupAddress (1): Pup.Address]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+4] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RETURN[]; END; -- rDoneEnumerate. clientStubrOpen: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: ROPE, lock: FS.Lock, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, wDir: RPC.ShortROPE, forceRemoteOpen: BOOL] RETURNS [globalNameToOpen: ROPE, openFile: OpenFile] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rOpen, listenerPupAddress (1): Pup.Address, lock (4): FS.Lock, wantedCreatedTime (5): BasicTime.GMT, remoteCheck (7): BOOLEAN, forceRemoteOpen (8): BOOL]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ openFile (0): OpenFile]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 9; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, lock: lock, wantedCreatedTime: wantedCreatedTime, remoteCheck: remoteCheck, forceRemoteOpen: forceRemoteOpen]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 2; BEGIN -- OnePkt. -- Move statics from pkt now. [openFile: openFile] ← resPkt↑; BEGIN -- Unmarshal globalNameToOpen: ROPE from pkt.data[pktLength]. [globalNameToOpen, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal globalNameToOpen. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[globalNameToOpen, openFile]; END; -- OnePkt. END; -- UNWIND. END; -- rOpen. clientStubrCreate: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: ROPE, setPages: BOOLEAN, pages: INT, setKeep: BOOLEAN, keep: CARDINAL, wDir: RPC.ShortROPE] RETURNS [anonP1id3742907: OpenFile] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rCreate, listenerPupAddress (1): Pup.Address, setPages (4): BOOLEAN, pages (5): INT, setKeep (7): BOOLEAN, keep (8): CARDINAL]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ anonP1id3742907 (0): OpenFile]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 9; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, setPages: setPages, pages: pages, setKeep: setKeep, keep: keep]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 2, signalHandler: ClientDispatcher]; [anonP1id3742907: anonP1id3742907] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 2]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[anonP1id3742907]; END; -- UNWIND. END; -- rCreate. clientStubrOpenOrCreate: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: ROPE, keep: CARDINAL, pages: INT, wDir: RPC.ShortROPE] RETURNS [anonP1id3742946: OpenFile] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rOpenOrCreate, listenerPupAddress (1): Pup.Address, keep (4): CARDINAL, pages (5): INT]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ anonP1id3742946 (0): OpenFile]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 7; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, keep: keep, pages: pages]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 2, signalHandler: ClientDispatcher]; [anonP1id3742946: anonP1id3742946] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 2]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[anonP1id3742946]; END; -- UNWIND. END; -- rOpenOrCreate. clientStubrGetClass: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile] RETURNS [anonP1id3742970: ATOM] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetClass, listenerPupAddress (1): Pup.Address, file (4): OpenFile]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal anonP1id3742970: ATOM from pkt.data[pktLength]. [anonP1id3742970, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal anonP1id3742970. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[anonP1id3742970]; END; -- UNWIND. END; -- rGetClass. clientStubrSameFile: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file1: OpenFile, file2: OpenFile] RETURNS [anonP1id3742999: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rSameFile, listenerPupAddress (1): Pup.Address, file1 (4): OpenFile, file2 (6): OpenFile]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ anonP1id3742999 (0): BOOLEAN]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+8] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 8; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file1: file1, file2: file2]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 1, signalHandler: ClientDispatcher]; [anonP1id3742999: anonP1id3742999] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 1]; RETURN[anonP1id3742999]; END; -- rSameFile. clientStubrGetName: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile] RETURNS [fullFName: ROPE, attachedTo: ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetName, listenerPupAddress (1): Pup.Address, file (4): OpenFile]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal fullFName: ROPE from pkt.data[pktLength]. [fullFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal fullFName. BEGIN -- Unmarshal attachedTo: ROPE from pkt.data[pktLength]. [attachedTo, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal attachedTo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[fullFName, attachedTo]; END; -- UNWIND. END; -- rGetName. clientStubrGetInfo: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile] RETURNS [keep: CARDINAL, pages: INT, bytes: INT, created: BasicTime.GMT, lock: FS.Lock] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetInfo, listenerPupAddress (1): Pup.Address, file (4): OpenFile]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ keep (0): CARDINAL, pages (1): INT, bytes (3): INT, created (5): BasicTime.GMT, lock (7): FS.Lock]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+8] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 8, signalHandler: ClientDispatcher]; [keep: keep, pages: pages, bytes: bytes, created: created, lock: lock] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 8]; RETURN[keep, pages, bytes, created, lock]; END; -- rGetInfo. clientStubrSetPageCount: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile, pages: INT] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rSetPageCount, listenerPupAddress (1): Pup.Address, file (4): OpenFile, pages (6): INT]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+8] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 8; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file, pages: pages]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RETURN[]; END; -- rSetPageCount. clientStubrSetByteCountAndCreatedTime: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile, bytes: INT, created: BasicTime.GMT] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rSetByteCountAndCreatedTime, listenerPupAddress (1): Pup.Address, file (4): OpenFile, bytes (6): INT, created (8): BasicTime.GMT]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+10] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 10; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file, bytes: bytes, created: created]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RETURN[]; END; -- rSetByteCountAndCreatedTime. clientStubrRead: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile, from: INT, nPages: INT, pageBuffer: RESULTPageBuffer] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rRead, listenerPupAddress (1): Pup.Address, file (4): OpenFile, from (6): INT, nPages (8): INT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 10; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file, from: from, nPages: nPages]; BEGIN -- Marshal pageBuffer: RESULTPageBuffer to pkt.data[pktLength]. Lupine.RpcPktDoubleWord[pkt, pktLength]↑ ← (IF BASE[pageBuffer]=NIL THEN 0 ELSE LENGTH[pageBuffer]); pktLength ← pktLength + 2; IF BASE[pageBuffer] # NIL THEN NULL; -- Call by result, send length only. END; -- Marshal pageBuffer. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal pageBuffer: RESULTPageBuffer from pkt.data[pktLength]. DescriptorType: TYPE = RECORD [SEQUENCE COMPUTED CARDINAL OF WORD]; descLength: Lupine.SequenceHeader; IF pktLength+2 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength: pktLength]; descLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑; pktLength ← pktLength + 2; IF descLength # (IF BASE[pageBuffer]=NIL THEN 0 ELSE LENGTH[pageBuffer]) THEN Lupine.UnmarshalingError; NULL; -- Call by var or result, use existing descriptor. pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: BASE[pageBuffer], dataLength: SIZE[WORD]*LENGTH[pageBuffer], alwaysOnePkt: FALSE]; END; -- Unmarshal pageBuffer. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- rRead. clientStubrWrite: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile, to: INT, nPages: INT, pageBuffer: VALUEPageBuffer] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rWrite, listenerPupAddress (1): Pup.Address, file (4): OpenFile, to (6): INT, nPages (8): INT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 10; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file, to: to, nPages: nPages]; BEGIN -- Marshal pageBuffer: VALUEPageBuffer to pkt.data[pktLength]. IF pktLength+2 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength]; Lupine.RpcPktDoubleWord[pkt, pktLength]↑ ← (IF BASE[pageBuffer]=NIL THEN 0 ELSE LENGTH[pageBuffer]); pktLength ← pktLength + 2; IF BASE[pageBuffer] # NIL THEN pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength, dataAdr: BASE[pageBuffer], dataLength: SIZE[WORD]*LENGTH[pageBuffer], alwaysOnePkt: FALSE]; END; -- Marshal pageBuffer. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- rWrite. clientStubrClose: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, file: OpenFile] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rClose, listenerPupAddress (1): Pup.Address, file (4): OpenFile]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+6] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, file: file]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RETURN[]; END; -- rClose. clientStubrCopy: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, from: ROPE, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, attach: BOOLEAN, wDir: RPC.ShortROPE] RETURNS [toFName: ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rCopy, listenerPupAddress (1): Pup.Address, setKeep (4): BOOLEAN, keep (5): CARDINAL, wantedCreatedTime (6): BasicTime.GMT, remoteCheck (8): BOOLEAN, attach (9): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 10; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, setKeep: setKeep, keep: keep, wantedCreatedTime: wantedCreatedTime, remoteCheck: remoteCheck, attach: attach]; BEGIN -- Marshal from: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[from, pkt, pktLength, FALSE]; END; -- Marshal from. BEGIN -- Marshal to: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[to, pkt, pktLength, FALSE]; END; -- Marshal to. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal toFName: ROPE from pkt.data[pktLength]. [toFName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal toFName. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[toFName]; END; -- UNWIND. END; -- rCopy. clientStubrDelete: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: ROPE, wantedCreatedTime: BasicTime.GMT, wDir: RPC.ShortROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rDelete, listenerPupAddress (1): Pup.Address, wantedCreatedTime (4): BasicTime.GMT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, wantedCreatedTime: wantedCreatedTime]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- rDelete. clientStubrRename: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, from: ROPE, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime: BasicTime.GMT, wDir: RPC.ShortROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rRename, listenerPupAddress (1): Pup.Address, setKeep (4): BOOLEAN, keep (5): CARDINAL, wantedCreatedTime (6): BasicTime.GMT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 8; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, setKeep: setKeep, keep: keep, wantedCreatedTime: wantedCreatedTime]; BEGIN -- Marshal from: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[from, pkt, pktLength, FALSE]; END; -- Marshal from. BEGIN -- Marshal to: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[to, pkt, pktLength, FALSE]; END; -- Marshal to. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- rRename. clientStubrSetKeep: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: ROPE, keep: CARDINAL, wDir: RPC.ShortROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rSetKeep, listenerPupAddress (1): Pup.Address, keep (4): CARDINAL]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 5; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, keep: keep]; BEGIN -- Marshal name: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal wDir: RPC.ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[wDir, pkt, pktLength, TRUE]; END; -- Marshal wDir. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- rSetKeep. clientStubrBoolean: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, key: Rope.ROPE, default: BOOLEAN] RETURNS [value: BOOLEAN] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rBoolean, listenerPupAddress (1): Pup.Address, default (4): BOOLEAN]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ value (0): BOOLEAN]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 5; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, default: default]; BEGIN -- Marshal key: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[key, pkt, pktLength, FALSE]; END; -- Marshal key. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 1, signalHandler: ClientDispatcher]; [value: value] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 1]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[value]; END; -- UNWIND. END; -- rBoolean. clientStubrNumber: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, key: Rope.ROPE, default: INT] RETURNS [value: INT] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rNumber, listenerPupAddress (1): Pup.Address, default (4): INT]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ value (0): INT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, default: default]; BEGIN -- Marshal key: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[key, pkt, pktLength, FALSE]; END; -- Marshal key. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 2, signalHandler: ClientDispatcher]; [value: value] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 2]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[value]; END; -- UNWIND. END; -- rNumber. clientStubrToken: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, key: Rope.ROPE, default: Rope.ROPE] RETURNS [value: Rope.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rToken, listenerPupAddress (1): Pup.Address]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; BEGIN -- Marshal key: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[key, pkt, pktLength, FALSE]; END; -- Marshal key. BEGIN -- Marshal default: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[default, pkt, pktLength, FALSE]; END; -- Marshal default. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal value: Rope.ROPE from pkt.data[pktLength]. [value, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal value. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[value]; END; -- UNWIND. END; -- rToken. clientStubrListOfTokens: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, key: Rope.ROPE, default: LIST OF Rope.ROPE] RETURNS [value: LIST OF Rope.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rListOfTokens, listenerPupAddress (1): Pup.Address]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; BEGIN -- Marshal key: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[key, pkt, pktLength, FALSE]; END; -- Marshal key. BEGIN -- Marshal default: LIST OF Rope.ROPE to pkt.data[pktLength]. thisNode1: LIST OF Rope.ROPE; listLength: Lupine.ListHeader ← 0; FOR thisNode1 ← default, thisNode1.rest UNTIL thisNode1 = NIL DO listLength ← listLength + 1; ENDLOOP; IF pktLength+2 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength]; Lupine.RpcPktDoubleWord[pkt, pktLength]↑ ← listLength; pktLength ← pktLength + 2; FOR thisNode1 ← default, thisNode1.rest UNTIL thisNode1 = NIL DO BEGIN -- Marshal thisNode1.first: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[thisNode1.first, pkt, pktLength, FALSE]; END; -- Marshal thisNode1.first. ENDLOOP; -- FOR thisNode1. END; -- Marshal default. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal value: LIST OF Rope.ROPE from pkt.data[pktLength]. lastNode: LIST OF Rope.ROPE ← (value ← NIL); listLength: Lupine.ListHeader; IF pktLength+2 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength: pktLength]; listLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑; pktLength ← pktLength + 2; WHILE listLength > 0 DO thisNode1: LIST OF Rope.ROPE = interface.paramZones.gc.CONS[--DefaultValue--,NIL]; BEGIN -- Unmarshal thisNode1.first: Rope.ROPE from pkt.data[pktLength]. [thisNode1.first, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal thisNode1.first. IF lastNode # NIL THEN lastNode ← (lastNode.rest ← thisNode1) ELSE lastNode ← (value ← thisNode1); listLength ← listLength - 1; ENDLOOP; -- WHILE listLength > 0. END; -- Unmarshal value. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[value]; END; -- UNWIND. END; -- rListOfTokens. clientStubrLine: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, key: Rope.ROPE, default: Rope.ROPE] RETURNS [value: Rope.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rLine, listenerPupAddress (1): Pup.Address]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; BEGIN -- Marshal key: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[key, pkt, pktLength, FALSE]; END; -- Marshal key. BEGIN -- Marshal default: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[default, pkt, pktLength, FALSE]; END; -- Marshal default. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal value: Rope.ROPE from pkt.data[pktLength]. [value, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal value. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[value]; END; -- UNWIND. END; -- rLine. clientStubrGetProfileName: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] RETURNS [anonP1id3743547: Rope.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetProfileName, listenerPupAddress (1): Pup.Address]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal anonP1id3743547: Rope.ROPE from pkt.data[pktLength]. [anonP1id3743547, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal anonP1id3743547. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[anonP1id3743547]; END; -- UNWIND. END; -- rGetProfileName. clientStubrGetState: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] RETURNS [anonP1id3743566: UserCredentials.State] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGetState, listenerPupAddress (1): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ anonP1id3743566 (0): UserCredentials.State]; pktBuffer: ARRAY [1..RpcPrivate.pktOverhead+4] OF WORD; pkt: RpcPrivate.StubPkt = RpcPrivate.GetStubPkt[space: @pktBuffer]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 1, signalHandler: ClientDispatcher]; [anonP1id3743566: anonP1id3743566] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 1]; RETURN[anonP1id3743566]; END; -- rGetState. clientStubrGet: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address] RETURNS [name: Rope.ROPE, password: Rope.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← rGet, listenerPupAddress (1): Pup.Address]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 4; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal name: Rope.ROPE from pkt.data[pktLength]. [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal name. BEGIN -- Unmarshal password: Rope.ROPE from pkt.data[pktLength]. [password, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal password. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[name, password]; END; -- UNWIND. END; -- rGet. clientStubOpenDebugStream: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, newListenerPupAddress: Pup.Address, name: Rope.ROPE, serverMachine: Rope.ROPE] RETURNS [byteStreamOK: BOOL] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← OpenDebugStream, listenerPupAddress (1): Pup.Address, newListenerPupAddress (4): Pup.Address]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ byteStreamOK (0): BOOL]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 7; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, newListenerPupAddress: newListenerPupAddress]; BEGIN -- Marshal name: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. BEGIN -- Marshal serverMachine: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[serverMachine, pkt, pktLength, FALSE]; END; -- Marshal serverMachine. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 1, signalHandler: ClientDispatcher]; [byteStreamOK: byteStreamOK] ← resPkt↑; Lupine.CheckPktLength[pkt: pkt, pktLength: 1]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[byteStreamOK]; END; -- UNWIND. END; -- OpenDebugStream. clientStubOpenSourceViewer: PUBLIC SAFE PROCEDURE [interface: RpcControl.InterfaceRecord, listenerPupAddress: Pup.Address, name: Rope.ROPE, index: INT] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← OpenSourceViewer, listenerPupAddress (1): Pup.Address, index (4): INT]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 6; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: interface.myInterface]; argPkt↑ ← [listenerPupAddress: listenerPupAddress, index: index]; BEGIN -- Marshal name: Rope.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[name, pkt, pktLength, FALSE]; END; -- Marshal name. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 0, signalHandler: ClientDispatcher]; Lupine.CheckPktLength[pkt: pkt, pktLength: 0]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[]; END; -- UNWIND. END; -- OpenSourceViewer. --Remote public signals and errors are imported from the interface. -- Public signal and error dispatcher. ClientDispatcher: --PROCEDURE [pkt: RPCPkt, callLength: DataLength, -- lastPkt: BOOLEAN, localConversation: Conversation] RETURNS [returnLength: -- DataLength]-- RpcPrivate.Dispatcher = BEGIN SELECT LOOPHOLE[pkt.data[0], RpcControl.SignalIndex] FROM Error => RETURN[ ErrorStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt, localConversation: localConversation]]; ENDCASE => RETURN[Lupine.DispatchingError[]]; END; -- ClientDispatcher -- Public signal and error dispatcher stubs. ErrorStub: --ERROR [error: FS.ErrorDesc]-- RpcPrivate.Dispatcher = INLINE BEGIN error: FS.ErrorDesc; pktLength: RpcPrivate.DataLength ← 1; BEGIN -- Unmarshal error: FS.ErrorDesc from pkt.data[pktLength]. pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: @error, dataLength: SIZE[FS.ErrorDesc], alwaysOnePkt: FALSE]; -- Restore garbled REFs to NIL following copy. BEGIN OPEN record: error; LOOPHOLE[record.code, LONG POINTER] ← NIL; LOOPHOLE[record.explanation, LONG POINTER] ← NIL; END; -- OPEN record: error. BEGIN OPEN record: error; BEGIN -- Unmarshal record.code: ATOM from pkt.data[pktLength]. [record.code, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal record.code. BEGIN -- Unmarshal record.explanation: ROPE from pkt.data[pktLength]. [record.explanation, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal record.explanation. END; -- OPEN record: error. END; -- Unmarshal error. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; ERROR Error[error]; END; -- ErrorStub. -- Marshall/Unmarshal procedures. -- No module initialization. END. -- ComputeServerCallbacksRpcClientImpl.