-- Stub file  was translated on July 13, 1984 6:26:13 pm PDT by Lupine of July 13, 1984 6:17:44 pm PDT
-- Source interface Lark came from file Lark.bcd, which was created on March 22, 1984 5:24:03 pm PST with version stamp 363#357#6104565341 from source of December 19, 1983 1:34:23 pm PST.

-- The RPC stub modules for Lark are:
--   LarkRpcControl.mesa;
--   LarkRpcClientImpl.mesa;
--   LarkRpcBinderImpl.mesa;
--   LarkRpcServerImpl.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 = 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
  DESFace,
  PupTypes,
  RPC,
  RPCPkt,
  Lark;


LarkRpcControl: DEFINITIONS
  SHARES  Lark
  = BEGIN OPEN Lark, RpcPublic: RPC;


-- Public RPC types and constants.

  InterfaceName: TYPE = RpcPublic.InterfaceName;
  VersionRange: TYPE = RpcPublic.VersionRange;
  Principal: TYPE = RpcPublic.Principal;
  EncryptionKey: TYPE = RpcPublic.EncryptionKey;
  Zones: TYPE = RpcPublic.Zones;
  
  defaultInterfaceName: InterfaceName = RpcPublic.defaultInterfaceName;
  standardZones: Zones = RpcPublic.standardZones;


-- Standard remote binding routines.

  ImportInterface: SAFE PROCEDURE [
        interfaceName: InterfaceName ← defaultInterfaceName,
        parameterStorage: Zones ← standardZones ];

  UnimportInterface: SAFE PROCEDURE;

  ExportInterface: SAFE PROCEDURE [
        interfaceName: InterfaceName ← defaultInterfaceName,
        user: Principal,
        password: EncryptionKey,
        parameterStorage: Zones ← standardZones ];

  UnexportInterface: SAFE PROCEDURE;


-- Dynamic instantiation and binding.

  ImportNewInterface: SAFE PROCEDURE [
        interfaceName: InterfaceName ← defaultInterfaceName,
        parameterStorage: Zones ← standardZones ]
    RETURNS [interfaceRecord: InterfaceRecord];

  -- NewInterfaceRecord is necessary for Cedar clients who want to
  -- manufacture a private interface instance, because
  -- RpcBindingImpl has finalization on type InterfaceRecord.
  NewInterfaceRecord: SAFE PROCEDURE
    RETURNS [interfaceRecord: InterfaceRecord];

  InterfaceRecord: TYPE = REF InterfaceRecordObject;

  InterfaceRecordObject: TYPE = RECORD [
      Reset: SAFE PROCEDURE [shh: SHHH, rName: ROPE],
      GenerateTones: SAFE PROCEDURE [shh: SHHH, f1: Hertz, f2: Hertz,
          modulation: Hertz, on: Milliseconds, off: Milliseconds, repetitions:
          CARDINAL, waveTable: CARDINAL, queueIt: BOOLEAN, notify: CommandEvent]
          RETURNS [ok: BOOLEAN],
      Feep: SAFE PROCEDURE [shh: SHHH, on: Milliseconds, off: Milliseconds,
          waveTable: CARDINAL, queueIt: BOOLEAN, notify: CommandEvent,
          events: CommandEvents] RETURNS [ok: BOOLEAN],
      Commands: SAFE PROCEDURE [shh: SHHH, events: CommandEvents],
      Connect: SAFE PROCEDURE [shh: SHHH, specs: ConnectionSpec],
      Disconnect: SAFE PROCEDURE [shh: SHHH, buffer: VoiceBuffer],
      PleaseRegister: SAFE PROCEDURE [shh: SHHH],
      WhatIsStatus: SAFE PROCEDURE [shh: SHHH, which: CARDINAL] RETURNS
          [next: CARDINAL, events: StatusEvents],
      WhatAreConnections: SAFE PROCEDURE [shh: SHHH, which: CARDINAL]
          RETURNS [next: CARDINAL, specs: ConnectionSpec],
      WhatAreTones: SAFE PROCEDURE [shh: SHHH] RETURNS [BOOLEAN],
      SetKeyTable: SAFE PROCEDURE [shh: SHHH, table: KeyTable],
      CommandString: SAFE PROCEDURE [shh: SHHH, device: Device, commands:
          ROPE],
      PleaseLogin: SAFE PROCEDURE [shh: SHHH] RETURNS [will: BOOL],
      EchoSupression: SAFE PROCEDURE [shh: SHHH, echo: EchoParameters],
      SetHostNumber: SAFE PROCEDURE [shh: SHHH, host: Machine],
      lupineDetails: PRIVATE REF LupineDetailsObject←NIL];

  LupineDetailsObject: PRIVATE TYPE;

 -- Definitions for the stubs.
 
 LupineProtocolVersion: PUBLIC VersionRange = [first: 1, last: 1];
 
 InterMdsCallsOnly: PUBLIC BOOLEAN = FALSE;

  ProcedureIndex: PRIVATE TYPE = MACHINE DEPENDENT {
      LupineUnusedIndex (0), LupineLastIndex (3),
      Reset (4), GenerateTones (5), Feep (6), Commands (7), Connect (8),
      Disconnect (9), PleaseRegister (10), WhatIsStatus (11), WhatAreConnections
      (12), WhatAreTones (13), SetKeyTable (14), CommandString (15), PleaseLogin
      (16), EchoSupression (17), SetHostNumber (18)};

  SignalIndex: PRIVATE TYPE = MACHINE DEPENDENT {
      LupineUnusedIndex (0), LupineLastIndex (3)};


END.  -- LarkRpcControl.