-- Copyright (C) 1986 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on September 13, 1986 12:10:47 pm PDT by Lupine of February 22, 1986 5:15:54 pm PST
-- Source interface RemoteFingerOps came from file RemoteFingerOps.bcd, which was created on September 13, 1986 12:10:19 pm PDT with version stamp 210#207#22632575164 from source of September 12, 1986 3:05:03 pm PDT.

-- The RPC stub modules for RemoteFingerOps are:
--   RemoteFingerOpsRpcControl.mesa;
--   RemoteFingerOpsRpcClientImpl.mesa;
--   RemoteFingerOpsRpcBinderImpl.mesa;
--   RemoteFingerOpsRpcServerImpl.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
  FingerLog,
  RemoteFingerOps,
  RemoteFingerOpsRpcControl USING [InterMdsCallsOnly, LupineProtocolVersion,
      ProcedureIndex, SignalIndex],
  RPC USING [EncryptionKey, InterfaceName, Principal, standardZones,
      Zones],
  RPCLupine --USING SOME OF [Call, DataLength, Dispatcher, ExportHandle,
      -- ExportInterface, GetStubPkt, maxDataLength, maxPrincipalLength,
      -- maxShortStringLength, pktOverhead, ReceiveExtraPkt, SendPrelimPkt,
      -- StartCall, StartSignal, StubPkt, UnexportInterface]--,
  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]--,
  Rope --USING SOME OF [InlineFlatten, Length, NewText, Text]--;


RemoteFingerOpsRpcServerImpl: MONITOR
  IMPORTS RemoteFingerOps, RpcPrivate: RPCLupine, Lupine: LupineRuntime,
      Atom, Rope
  EXPORTS RemoteFingerOpsRpcControl
  SHARES  RemoteFingerOps, RemoteFingerOpsRpcControl, Rope
  = BEGIN OPEN RemoteFingerOps, RpcControl: RemoteFingerOpsRpcControl,
      RpcPublic: RPC;


-- Standard remote binding routines.

  bound: BOOLEAN ← FALSE;
  myInterface: RpcPrivate.ExportHandle;
  paramZones: RpcPublic.Zones ← RpcPublic.standardZones;

  ExportInterface: PUBLIC ENTRY SAFE PROCEDURE [
        interfaceName: RpcPublic.InterfaceName,
        user: RpcPublic.Principal,
        password: RpcPublic.EncryptionKey,
        parameterStorage: RpcPublic.Zones ] =
    TRUSTED BEGIN ENABLE UNWIND => NULL;
    IsNull: PROCEDURE [string: Rope.ROPE] RETURNS [BOOLEAN] =
      INLINE {RETURN[string.Length[] = 0]};
    IF bound THEN Lupine.BindingError;
    myInterface ← RpcPrivate.ExportInterface [
      interface: [
        type: IF ~IsNull[interfaceName.type]
          THEN interfaceName.type ELSE "RemoteFingerOps~210#207#22632575164",
        instance: interfaceName.instance,
        version: interfaceName.version ],
      user: user,  password: password,
      dispatcher: ServerDispatcher,
      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;

  UnexportInterface: PUBLIC ENTRY SAFE PROCEDURE =
    TRUSTED BEGIN ENABLE UNWIND => NULL;
    IF ~bound THEN Lupine.BindingError;
    myInterface ← RpcPrivate.UnexportInterface[myInterface];
    paramZones ← RpcPublic.standardZones;
    bound ← FALSE;
    END;


-- Public procedure dispatcher and public signal and error catcher.

  ServerDispatcher: --PROCEDURE [pkt: RPCPkt, callLength: DataLength,
      -- lastPkt: BOOLEAN, localConversation: Conversation] RETURNS [returnLength:
      -- DataLength]-- RpcPrivate.Dispatcher =
    BEGIN

    -- Catch public signals.

      ENABLE BEGIN

      END;  -- Catch public signals.


    -- Call public procedures (still in dispatcher).

    SELECT LOOPHOLE[pkt.data[0], RpcControl.ProcedureIndex] FROM
      PlayLog => RETURN[
        PlayLogStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      ENDCASE => RETURN[Lupine.DispatchingError[]];

    END;  -- ServerDispatcher


-- Public procedure dispatcher stubs.

  PlayLogStub: --PROCEDURE [items: LIST OF FingerLog.LogEntry] RETURNS
      -- [success: BOOLEAN]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    items: LIST OF FingerLog.LogEntry;
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        success (0): BOOLEAN];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 1;
    BEGIN  -- Unmarshal items: LIST OF FingerLog.LogEntry from pkt.data[pktLength].
      lastNode: LIST OF FingerLog.LogEntry ← (items ← 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 FingerLog.LogEntry = paramZones.gc.CONS[--DefaultValue--,NIL];
        BEGIN  -- Unmarshal thisNode1.first: FingerLog.LogEntry from
            -- pkt.data[pktLength].
          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 thisNode1.first ← NIL
            ELSE BEGIN
              thisNode1.first ← (paramZones.gc.NEW[FingerLog.LogEntryObject]);
              BEGIN  -- Unmarshal thisNode1.first↑: FingerLog.LogEntryObject
                  -- from pkt.data[pktLength].
                pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength:
                    pktLength, dataAdr: LOOPHOLE[thisNode1.first], dataLength:
                    SIZE[FingerLog.LogEntryObject], alwaysOnePkt: FALSE];
                -- Restore garbled REFs to NIL following copy.
                BEGIN OPEN record: thisNode1.first↑;
                WITH variant: record SELECT FROM
                  StateChange =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.user, LONG POINTER] ← NIL;
                    LOOPHOLE[record.machine, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  UserPropChange =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.user, LONG POINTER] ← NIL;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    LOOPHOLE[record.val, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  MachinePropChange =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.machine, LONG POINTER] ← NIL;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    LOOPHOLE[record.val, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  AddMachineProp =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  AddUserProp =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  DeleteUserProp =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  DeleteMachineProp =>
                    BEGIN OPEN record: variant;
                    LOOPHOLE[record.name, LONG POINTER] ← NIL;
                    END;  -- OPEN record: variant.
                  ENDCASE => NULL;  -- WITH variant: record.
                END;  -- OPEN record: thisNode1.first↑.
                BEGIN OPEN record: thisNode1.first↑;
                WITH variant: record SELECT FROM
                  StateChange =>
                    BEGIN  -- Unmarshal variant: RECORD [event: FingerOps.StateChange,
                        -- user: Rope.ROPE, time: BasicTime.GMT, machine:
                        -- Rope.ROPE] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.user: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.user ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.user ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.user.
                      BEGIN  -- Unmarshal record.machine: Rope.ROPE
                          -- from pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.machine ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.machine ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.machine.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  UserPropChange =>
                    BEGIN  -- Unmarshal variant: RECORD [user: Rope.ROPE,
                        -- name: Rope.ROPE, val: Rope.ROPE, time: BasicTime.GMT]
                        -- from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.user: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.user ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.user ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.user.
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      BEGIN  -- Unmarshal record.val: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.val ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.val ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.val.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  MachinePropChange =>
                    BEGIN  -- Unmarshal variant: RECORD [machine: Rope.ROPE,
                        -- name: Rope.ROPE, val: Rope.ROPE] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.machine: Rope.ROPE
                          -- from pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.machine ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.machine ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.machine.
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      BEGIN  -- Unmarshal record.val: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.val ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.val ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.val.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  AddMachineProp =>
                    BEGIN  -- Unmarshal variant: RECORD [name: Rope.ROPE,
                        -- version: INT] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  AddUserProp =>
                    BEGIN  -- Unmarshal variant: RECORD [name: Rope.ROPE,
                        -- version: INT] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  DeleteUserProp =>
                    BEGIN  -- Unmarshal variant: RECORD [name: Rope.ROPE,
                        -- version: INT] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  DeleteMachineProp =>
                    BEGIN  -- Unmarshal variant: RECORD [name: Rope.ROPE,
                        -- version: INT] from pkt.data[pktLength].
                      BEGIN OPEN record: variant;
                      BEGIN  -- Unmarshal record.name: Rope.ROPE from
                          -- pkt.data[pktLength].
                        ropeIsNIL: Lupine.NilHeader;
                        IF pktLength+2 > RpcPrivate.maxDataLength
                          THEN pktLength ← Lupine.FinishThisPkt[pkt:
                              pkt, pktLength: pktLength];
                        ropeIsNIL ← pkt.data[pktLength];  pktLength
                            ← pktLength+1;
                        IF ropeIsNIL
                          THEN record.name ← NIL
                          ELSE BEGIN
                            ropeLength: Lupine.RopeHeader;
                            textRope: Rope.Text;
                            ropeLength ← pkt.data[pktLength];  pktLength
                                ← pktLength+1;
                            IF ropeLength > LAST[NAT]
                              THEN Lupine.UnmarshalingError;
                            record.name ← textRope ← Rope.NewText[size:
                                ropeLength];
                            pktLength ← Lupine.CopyFromPkt[pkt: pkt,
                                pktLength: pktLength, dataAdr: BASE[DESCRIPTOR[textRope.text]],
                                dataLength: Lupine.WordsForChars[ropeLength],
                                alwaysOnePkt: FALSE];
                            END;  -- IF ropeIsNIL.
                        END;  -- Unmarshal record.name.
                      END;  -- OPEN record: variant.
                      END;  -- Unmarshal variant.
                  ENDCASE => NULL;  -- WITH variant: record.
                END;  -- OPEN record: thisNode1.first↑.
                END;  -- Unmarshal thisNode1.first↑.
              END;  -- IF isNIL.
          END;  -- Unmarshal thisNode1.first.
        IF lastNode # NIL
          THEN lastNode ← (lastNode.rest ← thisNode1)
          ELSE lastNode ← (items ← thisNode1);
        listLength ← listLength - 1;
        ENDLOOP;  -- WHILE listLength > 0.
      END;  -- Unmarshal items.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    [resPkt.success] ← PlayLog[items];
    pktLength ← 1;
    RETURN[returnLength: pktLength];
    END;  -- PlayLogStub.


-- No module initialization.

END.  -- RemoteFingerOpsRpcServerImpl.