-- Copyright (C) 1986 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on August 25, 1986 5:42:59 pm PDT by Lupine of February 22, 1986 5:15:54 pm PST
-- Source interface VoiceRopeServer came from file VoiceRopeServer.bcd, which was created on August 25, 1986 4:34:28 pm PDT with version stamp 54#122#37523225122 from source of August 25, 1986 4:34:23 pm PDT.

-- The RPC stub modules for VoiceRopeServer are:
--   VoiceRopeServerRpcControl.mesa;
--   VoiceRopeServerRpcClientImpl.mesa;
--   VoiceRopeServerRpcBinderImpl.mesa;
--   VoiceRopeServerRpcServerImpl.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
  RefID,
  Rope,
  Thrush,
  VoiceRopeServer,
  RPC USING [defaultInterfaceName, EncryptionKey, InterfaceName, Principal,
      standardZones, VersionRange, Zones],
  RPCLupineExtras USING [RPCHost, noHost];


VoiceRopeServerRpcControl: DEFINITIONS
  SHARES  VoiceRopeServer
  = BEGIN OPEN VoiceRopeServer, RpcPublic: RPC, RpcPrivateExtras: RPCLupineExtras;


-- 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,
        hostHint: RpcPrivateExtras.RPCHost←RpcPrivateExtras.noHost];

  UnimportInterface: 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,
        hostHint: RpcPrivateExtras.RPCHost←RpcPrivateExtras.noHost]
    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 [
      Record: SAFE PROCEDURE [shhh: Thrush.SHHH, credentials: Thrush.Credentials,
          serviceID: RefID.ID, intID: CARD, queueIt: BOOL] RETURNS [nb:
          Thrush.NB, voiceRope: VoiceRope],
      Play: SAFE PROCEDURE [shhh: Thrush.SHHH, voiceRope: VoiceRope,
          credentials: Thrush.Credentials, serviceID: RefID.ID, intID:
          CARD, queueIt: BOOL] RETURNS [nb: Thrush.NB],
      Stop: SAFE PROCEDURE [shhh: Thrush.SHHH, credentials: Thrush.Credentials,
          serviceID: RefID.ID] RETURNS [nb: Thrush.NB],
      Retain: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope, class:
          InterestClass, refID: Rope.ROPE, other: Rope.ROPE] RETURNS [nb:
          Thrush.NB],
      Forget: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope, class:
          InterestClass, refID: Rope.ROPE] RETURNS [nb: Thrush.NB],
      GetByInterest: SAFE PROCEDURE [shhh: Thrush.SHHH, class: InterestClass,
          refID: Rope.ROPE] RETURNS [nb: Thrush.NB, voiceRope: VoiceRope],
      Cat: SAFE PROCEDURE [shhh: Thrush.SHHH, vr1: VoiceRope, vr2:
          VoiceRope, vr3: VoiceRope, vr4: VoiceRope, vr5: VoiceRope] RETURNS
          [nb: Thrush.NB, new: VoiceRope],
      Substr: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope, start:
          INT, len: INT] RETURNS [nb: Thrush.NB, new: VoiceRope],
      Replace: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope, start:
          INT, len: INT, with: VoiceRope] RETURNS [nb: Thrush.NB, new:
          VoiceRope],
      Length: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope] RETURNS
          [nb: Thrush.NB, len: INT],
      DescribeRope: SAFE PROCEDURE [shhh: Thrush.SHHH, vr: VoiceRope,
          minSilence: INT] RETURNS [nb: Thrush.NB, length: INT, noise:
          IntervalSpecs],
      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),
      Record (4), Play (5), Stop (6), Retain (7), Forget (8), GetByInterest
      (9), Cat (10), Substr (11), Replace (12), Length (13), DescribeRope
      (14)};

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


END.  -- VoiceRopeServerRpcControl.