-- Copyright (C) 1985 by Xerox Corporation. All rights reserved. -- Stub file was translated on December 18, 1985 12:09:34 pm PST by Lupine of May 23, 1985 8:38:08 am PDT -- Source interface ThParty came from file ThParty.bcd, which was created on December 18, 1985 12:09:29 pm PST with version stamp 336#76#25545106204 from source of December 17, 1985 12:43:02 pm PST. -- The RPC stub modules for ThParty are: -- ThPartyRpcControl.mesa; -- ThPartyRpcClientImpl.mesa; -- ThPartyRpcBinderImpl.mesa; -- ThPartyRpcServerImpl.mesa. -- The parameters for this translation are: -- Target language = Cedar -- Default parameter passing = VALUE -- Deallocate server heap arguments = TRUE -- Inline RpcServerImpl dispatcher stubs = TRUE -- Declare signals = TRUE -- 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, Lark, RefID, RPC, Thrush, ThSmartsRpcControl, ThParty, ThPartyRpcControl 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]--, Rope --USING SOME OF [InlineFlatten, Length, NewText, Text]--, VM --USING SOME OF [AddressForPageNumber, PageCount, PageNumber, -- PageNumberForAddress, PagesForWords]--; ThPartyRpcClientImpl: MONITOR IMPORTS RpcPrivate: RPCLupine, Lupine: LupineRuntime, Atom, PrincOpsUtils, Rope EXPORTS ThParty, ThPartyRpcControl SHARES ThParty, ThPartyRpcControl, Rope = BEGIN OPEN ThParty, RpcControl: ThPartyRpcControl, RpcPublic: RPC; -- Standard remote binding routines. bound: BOOLEAN ← FALSE; myInterface: RpcPrivate.ImportHandle; paramZones: RpcPublic.Zones ← RpcPublic.standardZones; ImportInterface: PUBLIC ENTRY SAFE PROCEDURE [ interfaceName: RpcPublic.InterfaceName, parameterStorage: RpcPublic.Zones ] = TRUSTED BEGIN ENABLE UNWIND => NULL; IsNull: PROCEDURE [string: Rope.ROPE] RETURNS [BOOLEAN] = INLINE {RETURN[string.Length[] = 0]}; myInterface ← RpcPrivate.ImportInterface [ interface: [ type: IF ~IsNull[interfaceName.type] THEN interfaceName.type ELSE "ThParty~336#76#25545106204", instance: interfaceName.instance, version: interfaceName.version ], localOnly: RpcControl.InterMdsCallsOnly, stubProtocol: RpcControl.LupineProtocolVersion ]; 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 ]; bound ← TRUE; END; UnimportInterface: PUBLIC ENTRY SAFE PROCEDURE = TRUSTED BEGIN ENABLE UNWIND => NULL; IF ~bound THEN Lupine.BindingError; myInterface ← RpcPrivate.UnimportInterface[myInterface]; paramZones ← RpcPublic.standardZones; bound ← FALSE; END; -- Remote public procedure stubs. CreateConversation: PUBLIC SAFE PROCEDURE [shhh: SHHH, credentials: Credentials, state: Thrush.StateInConv, urgency: Thrush.CallUrgency, alertKind: Thrush.AlertKind, subject: Thrush.ROPE] RETURNS [nb: NB, convEvent: Thrush.ConvEvent] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← CreateConversation, credentials (1): Credentials, state (9): Thrush.StateInConv]; 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: myInterface, localConversation: shhh]; argPkt↑ ← [credentials: credentials, state: state]; BEGIN -- Marshal urgency: Thrush.CallUrgency to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[urgency, pkt, pktLength]; END; -- Marshal urgency. BEGIN -- Marshal alertKind: Thrush.AlertKind to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[alertKind, pkt, pktLength]; END; -- Marshal alertKind. BEGIN -- Marshal subject: Thrush.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[subject, pkt, pktLength, TRUE]; END; -- Marshal subject. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal convEvent: Thrush.ConvEvent from pkt.data[pktLength]. [convEvent, pktLength] ← UnmarshalThrushDotConvEvent[pkt, pktLength]; END; -- Unmarshal convEvent. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, convEvent]; END; -- UNWIND. END; -- CreateConversation. Alert: PUBLIC SAFE PROCEDURE [shhh: SHHH, credentials: Credentials, calledPartyID: PartyID, comment: ROPE] RETURNS [nb: NB] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Alert, credentials (1): Credentials, calledPartyID (9): PartyID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 11; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shhh]; argPkt↑ ← [credentials: credentials, calledPartyID: calledPartyID]; BEGIN -- Marshal comment: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[comment, pkt, pktLength, TRUE]; END; -- Marshal comment. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb]; END; -- UNWIND. END; -- Alert. Advance: PUBLIC SAFE PROCEDURE [shhh: SHHH, credentials: Credentials, state: Thrush.StateInConv, reportToAll: BOOL, reason: Thrush.Reason, comment: ROPE] RETURNS [nb: NB, convEvent: Thrush.ConvEvent] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Advance, credentials (1): Credentials, state (9): Thrush.StateInConv, reportToAll (10): BOOL]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 11; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shhh]; argPkt↑ ← [credentials: credentials, state: state, reportToAll: reportToAll]; BEGIN -- Marshal reason: Thrush.Reason to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[reason, pkt, pktLength]; END; -- Marshal reason. BEGIN -- Marshal comment: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[comment, pkt, pktLength, TRUE]; END; -- Marshal comment. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal convEvent: Thrush.ConvEvent from pkt.data[pktLength]. [convEvent, pktLength] ← UnmarshalThrushDotConvEvent[pkt, pktLength]; END; -- Unmarshal convEvent. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, convEvent]; END; -- UNWIND. END; -- Advance. GetConversationInfo: PUBLIC SAFE PROCEDURE [shh: SHHH, convID: ConversationID] RETURNS [nb: NB, cInfo: ConversationInfo] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetConversationInfo, convID (1): ConversationID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [convID: convID]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal cInfo: ConversationInfo from pkt.data[pktLength]. pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: @cInfo, dataLength: SIZE[ConversationInfo], alwaysOnePkt: FALSE]; -- Restore garbled REFs to NIL following copy. BEGIN OPEN record: cInfo; LOOPHOLE[record.subject, LONG POINTER] ← NIL; LOOPHOLE[record.urgency, LONG POINTER] ← NIL; LOOPHOLE[record.alertKind, LONG POINTER] ← NIL; END; -- OPEN record: cInfo. BEGIN OPEN record: cInfo; BEGIN -- Unmarshal record.subject: ROPE from pkt.data[pktLength]. [record.subject, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal record.subject. BEGIN -- Unmarshal record.urgency: Thrush.CallUrgency from -- pkt.data[pktLength]. [record.urgency, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal record.urgency. BEGIN -- Unmarshal record.alertKind: Thrush.AlertKind from -- pkt.data[pktLength]. [record.alertKind, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal record.alertKind. END; -- OPEN record: cInfo. END; -- Unmarshal cInfo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, cInfo]; END; -- UNWIND. END; -- GetConversationInfo. GetPartyInfo: PUBLIC SAFE PROCEDURE [shh: SHHH, credentials: Credentials, nameReq: NameReq, allParties: BOOL] RETURNS [nb: NB, pInfo: PartyInfo] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetPartyInfo, credentials (1): Credentials, allParties (9): BOOL]; 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: myInterface, localConversation: shh]; argPkt↑ ← [credentials: credentials, allParties: allParties]; BEGIN -- Marshal nameReq: NameReq to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[nameReq, pkt, pktLength]; END; -- Marshal nameReq. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal pInfo: PartyInfo from pkt.data[pktLength]. [pInfo, pktLength] ← UnmarshalPartyInfo[pkt, pktLength]; END; -- Unmarshal pInfo. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, pInfo]; END; -- UNWIND. END; -- GetPartyInfo. GetKeyTable: PUBLIC SAFE PROCEDURE [shh: SHHH, credentials: Credentials] RETURNS [nb: NB, keyTable: Lark.KeyTable] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetKeyTable, credentials (1): Credentials]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 9; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [credentials: credentials]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal keyTable: Lark.KeyTable from pkt.data[pktLength]. [keyTable, pktLength] ← UnmarshalLarkDotKeyTable[pkt, pktLength]; END; -- Unmarshal keyTable. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, keyTable]; END; -- UNWIND. END; -- GetKeyTable. DescribeParty: PUBLIC SAFE PROCEDURE [partyID: Thrush.PartyID, nameReq: NameReq] RETURNS [nb: NB, description: Thrush.ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← DescribeParty, partyID (1): Thrush.PartyID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface]; argPkt↑ ← [partyID: partyID]; BEGIN -- Marshal nameReq: NameReq to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[nameReq, pkt, pktLength]; END; -- Marshal nameReq. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. BEGIN -- Unmarshal description: Thrush.ROPE from pkt.data[pktLength]. [description, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal description. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, description]; END; -- UNWIND. END; -- DescribeParty. GetParty: PUBLIC SAFE PROCEDURE [shh: SHHH, partyID: PartyID, rName: ROPE, type: Thrush.PartyType] RETURNS [nb: NB, newPartyID: PartyID] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetParty, partyID (1): PartyID]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ newPartyID (0): PartyID]; 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 ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [partyID: partyID]; BEGIN -- Marshal rName: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[rName, pkt, pktLength, TRUE]; END; -- Marshal rName. BEGIN -- Marshal type: Thrush.PartyType to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[type, pkt, pktLength]; END; -- Marshal type. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 2; BEGIN -- OnePkt. -- Move statics from pkt now. [newPartyID: newPartyID] ← resPkt↑; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, newPartyID]; END; -- OnePkt. END; -- UNWIND. END; -- GetParty. GetPartyFromNumber: PUBLIC SAFE PROCEDURE [shh: SHHH, partyID: PartyID, phoneNumber: Thrush.ROPE, description: ROPE] RETURNS [nb: NB, newPartyID: PartyID] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetPartyFromNumber, partyID (1): PartyID]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ newPartyID (0): PartyID]; 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 ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [partyID: partyID]; BEGIN -- Marshal phoneNumber: Thrush.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[phoneNumber, pkt, pktLength, TRUE]; END; -- Marshal phoneNumber. BEGIN -- Marshal description: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[description, pkt, pktLength, TRUE]; END; -- Marshal description. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 2; BEGIN -- OnePkt. -- Move statics from pkt now. [newPartyID: newPartyID] ← resPkt↑; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, newPartyID]; END; -- OnePkt. END; -- UNWIND. END; -- GetPartyFromNumber. GetPartyFromFeepNum: PUBLIC SAFE PROCEDURE [shh: SHHH, partyID: PartyID, feepNum: Thrush.ROPE] RETURNS [nb: NB, newPartyID: PartyID] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetPartyFromFeepNum, partyID (1): PartyID]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ newPartyID (0): PartyID]; 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 ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [partyID: partyID]; BEGIN -- Marshal feepNum: Thrush.ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[feepNum, pkt, pktLength, TRUE]; END; -- Marshal feepNum. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 2; BEGIN -- OnePkt. -- Move statics from pkt now. [newPartyID: newPartyID] ← resPkt↑; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, newPartyID]; END; -- OnePkt. END; -- UNWIND. END; -- GetPartyFromFeepNum. GetCurrentParty: PUBLIC SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS [nb: NB, partyID: Thrush.PartyID] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetCurrentParty, smartsID (1): SmartsID]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ partyID (0): Thrush.PartyID]; 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 ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [smartsID: smartsID]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 2; BEGIN -- OnePkt. -- Move statics from pkt now. [partyID: partyID] ← resPkt↑; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, partyID]; END; -- OnePkt. END; -- UNWIND. END; -- GetCurrentParty. GetNumbersForRName: PUBLIC SAFE PROCEDURE [shh: SHHH, rName: ROPE] RETURNS [fullRName: ROPE, number: ROPE, homeNumber: ROPE] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← GetNumbersForRName]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+102]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 1; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+102]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt.transferIndex ← GetNumbersForRName; BEGIN -- Marshal rName: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[rName, pkt, pktLength, TRUE]; END; -- Marshal rName. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 102, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal fullRName: ROPE from pkt.data[pktLength]. [fullRName, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal fullRName. BEGIN -- Unmarshal number: ROPE from pkt.data[pktLength]. [number, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal number. BEGIN -- Unmarshal homeNumber: ROPE from pkt.data[pktLength]. [homeNumber, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal homeNumber. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+102]; RETURN[fullRName, number, homeNumber]; END; -- UNWIND. END; -- GetNumbersForRName. Register: PUBLIC SAFE PROCEDURE [shh: SHHH, rName: ROPE, type: Thrush.PartyType, clonePartyID: PartyID, interface: SmartsInterfaceName, properties: SmartsProperties] RETURNS [nb: NB, credentials: Credentials] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Register, clonePartyID (1): PartyID]; ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [ credentials (0): Credentials]; 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 ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [clonePartyID: clonePartyID]; BEGIN -- Marshal rName: ROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[rName, pkt, pktLength, TRUE]; END; -- Marshal rName. BEGIN -- Marshal type: Thrush.PartyType to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[type, pkt, pktLength]; END; -- Marshal type. BEGIN -- Marshal interface: SmartsInterfaceName to pkt.data[pktLength]. pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength, dataAdr: @interface, dataLength: SIZE[SmartsInterfaceName], alwaysOnePkt: FALSE]; BEGIN OPEN record: interface; BEGIN -- Marshal record.type: ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[record.type, pkt, pktLength, TRUE]; END; -- Marshal record.type. BEGIN -- Marshal record.instance: ShortROPE to pkt.data[pktLength]. pktLength ← Lupine.MarshalRope[record.instance, pkt, pktLength, TRUE]; END; -- Marshal record.instance. END; -- OPEN record: interface. END; -- Marshal interface. BEGIN -- Marshal properties: SmartsProperties to pkt.data[pktLength]. pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength, dataAdr: @properties, dataLength: SIZE[SmartsProperties], alwaysOnePkt: FALSE]; BEGIN OPEN record: properties; BEGIN -- Marshal record.role: SmartsRole to pkt.data[pktLength]. pktLength ← Lupine.MarshalAtom[record.role, pkt, pktLength]; END; -- Marshal record.role. END; -- OPEN record: properties. END; -- Marshal properties. [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 8; BEGIN -- OnePkt. -- Move statics from pkt now. [credentials: credentials] ← resPkt↑; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb, credentials]; END; -- OnePkt. END; -- UNWIND. END; -- Register. CheckIn: PUBLIC SAFE PROCEDURE [shh: SHHH, credentials: Credentials] RETURNS [nb: NB] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← CheckIn, credentials (1): Credentials]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 9; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [credentials: credentials]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb]; END; -- UNWIND. END; -- CheckIn. Deregister: PUBLIC SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS [nb: NB] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Deregister, smartsID (1): SmartsID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [smartsID: smartsID]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb]; END; -- UNWIND. END; -- Deregister. Enable: PUBLIC SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS [nb: Thrush.NB] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Enable, smartsID (1): SmartsID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [smartsID: smartsID]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: Thrush.NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb]; END; -- UNWIND. END; -- Enable. Disable: PUBLIC SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS [nb: Thrush.NB] = TRUSTED BEGIN ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [ transferIndex (0): RpcControl.ProcedureIndex ← Disable, smartsID (1): SmartsID]; pkt: RpcPrivate.RPCPkt = RpcPrivate.GetPkt[space: RpcPrivate.Alloc[RpcPrivate.pktOverhead+254]]; argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0]; pktLength: RpcPrivate.DataLength ← 3; lastPkt: BOOLEAN; BEGIN ENABLE UNWIND => RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RpcPrivate.StartCall[callPkt: pkt, interface: myInterface, localConversation: shh]; argPkt↑ ← [smartsID: smartsID]; [returnLength: , lastPkt: lastPkt] ← RpcPrivate.Call[ pkt: pkt, callLength: pktLength, maxReturnLength: 254, signalHandler: ClientDispatcher]; pktLength ← 0; BEGIN -- Unmarshal nb: Thrush.NB from pkt.data[pktLength]. [nb, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal nb. Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength]; RpcPrivate.DeAlloc[LOOPHOLE[pkt], RpcPrivate.pktOverhead+254]; RETURN[nb]; END; -- UNWIND. END; -- Disable. -- Remote public signals and errors. -- 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 ENDCASE => RETURN[Lupine.DispatchingError[]]; END; -- ClientDispatcher -- Public signal and error dispatcher stubs. -- Marshall/Unmarshal procedures. UnmarshalPartyInfo: PROC[pkt: RpcPrivate.RPCPkt, pktLength0: RpcPrivate.DataLength] RETURNS[value: ThParty.PartyInfo, pktLength: RpcPrivate.DataLength] = BEGIN pktLength ← pktLength0; { BEGIN -- Unmarshal value↑: ThParty.PartyInfoSeq from pkt.data[pktLength]. recordIsNIL: Lupine.NilHeader; IF pktLength+3 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength: pktLength]; recordIsNIL ← pkt.data[pktLength]; pktLength ← pktLength+1; IF recordIsNIL THEN value ← NIL ELSE BEGIN seqLength: Lupine.SequenceHeader; seqLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑; pktLength ← pktLength + 2; value ← (paramZones.gc.NEW[ThParty.PartyInfoSeq[Lupine.SHORT[seqLength]]]); pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: LOOPHOLE[value], dataLength: SIZE[ThParty.PartyInfoSeq[LENGTH[DESCRIPTOR[value↑]]]], alwaysOnePkt: FALSE]; -- Restore garbled REFs to NIL following copy. BEGIN OPEN record: value↑; FOR element2: NAT IN [FIRST[NAT]..FIRST[NAT]+LENGTH[DESCRIPTOR[record.parties]]) DO BEGIN OPEN record: record.parties[element2]; LOOPHOLE[record.type, LONG POINTER] ← NIL; LOOPHOLE[record.name, LONG POINTER] ← NIL; END; -- OPEN record: record.parties[element2]. ENDLOOP; -- FOR element2. END; -- OPEN record: value↑. BEGIN OPEN record: value↑; BEGIN -- Unmarshal record.parties: SEQUENCE len: NAT OF ThParty.PartyInfoSpec -- from pkt.data[pktLength]. -- The sequence's length was carried by its record. FOR element3: NAT IN [FIRST[NAT]..FIRST[NAT]+LENGTH[DESCRIPTOR[record.parties]]) DO BEGIN -- Unmarshal record.parties[element3]: ThParty.PartyInfoSpec -- from pkt.data[pktLength]. pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: @record.parties[element3], dataLength: SIZE[ThParty.PartyInfoSpec], alwaysOnePkt: FALSE]; -- Restore garbled REFs to NIL following copy. BEGIN OPEN record: record.parties[element3]; LOOPHOLE[record.type, LONG POINTER] ← NIL; LOOPHOLE[record.name, LONG POINTER] ← NIL; END; -- OPEN record: record.parties[element3]. BEGIN OPEN record: record.parties[element3]; BEGIN -- Unmarshal record.type: Thrush.PartyType from -- pkt.data[pktLength]. [record.type, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal record.type. BEGIN -- Unmarshal record.name: Thrush.ROPE from pkt.data[pktLength]. [record.name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE]; END; -- Unmarshal record.name. END; -- OPEN record: record.parties[element3]. END; -- Unmarshal record.parties[element3]. ENDLOOP; -- FOR element3. END; -- Unmarshal record.parties. END; -- OPEN record: value↑. END; -- IF recordIsNIL. END; -- Unmarshal value↑. };END; UnmarshalThrushDotConvEvent: PROC[pkt: RpcPrivate.RPCPkt, pktLength0: RpcPrivate.DataLength] RETURNS[value: Thrush.ConvEvent, pktLength: RpcPrivate.DataLength] = BEGIN pktLength ← pktLength0; { isNIL: Lupine.NilHeader; IF pktLength+1 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength: pktLength]; isNIL ← pkt.data[pktLength]; pktLength ← pktLength+1; IF isNIL THEN value ← NIL ELSE BEGIN value ← (paramZones.gc.NEW[Thrush.ConvEventBody]); BEGIN -- Unmarshal value↑: Thrush.ConvEventBody from pkt.data[pktLength]. pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: LOOPHOLE[value], dataLength: SIZE[Thrush.ConvEventBody], alwaysOnePkt: FALSE]; -- Restore garbled REFs to NIL following copy. BEGIN OPEN record: value↑; LOOPHOLE[record.reason, LONG POINTER] ← NIL; LOOPHOLE[record.comment, LONG POINTER] ← NIL; END; -- OPEN record: value↑. BEGIN OPEN record: value↑; BEGIN -- Unmarshal record.reason: Thrush.Reason from pkt.data[pktLength]. [record.reason, pktLength] ← Lupine.UnmarshalAtom[pkt, pktLength]; END; -- Unmarshal record.reason. BEGIN -- Unmarshal record.comment: Rope.ROPE from pkt.data[pktLength]. [record.comment, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE]; END; -- Unmarshal record.comment. END; -- OPEN record: value↑. END; -- Unmarshal value↑. END; -- IF isNIL. };END; UnmarshalLarkDotKeyTable: PROC[pkt: RpcPrivate.RPCPkt, pktLength0: RpcPrivate.DataLength] RETURNS[value: Lark.KeyTable, pktLength: RpcPrivate.DataLength] = BEGIN pktLength ← pktLength0; { BEGIN -- Unmarshal value↑: Lark.KeyTableBody from pkt.data[pktLength]. recordIsNIL: Lupine.NilHeader; IF pktLength+3 > RpcPrivate.maxDataLength THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength: pktLength]; recordIsNIL ← pkt.data[pktLength]; pktLength ← pktLength+1; IF recordIsNIL THEN value ← NIL ELSE BEGIN seqLength: Lupine.SequenceHeader; seqLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑; pktLength ← pktLength + 2; value ← (paramZones.gc.NEW[Lark.KeyTableBody[Lupine.SHORT[seqLength]]]); pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength, dataAdr: LOOPHOLE[value], dataLength: SIZE[Lark.KeyTableBody[LENGTH[DESCRIPTOR[value↑]]]], alwaysOnePkt: FALSE]; END; -- IF recordIsNIL. END; -- Unmarshal value↑. };END; -- No module initialization. END. -- ThPartyRpcClientImpl.