-- Stub file  was translated on  September 13, 1983 4:34 pm by Lupine of  September 13, 1983 4:16 pm
-- Source interface LupineMarshalTest came from file LupineMarshalTest.bcd, which was created on  September 12, 1983 5:15 pm with version stamp 234#313#4263372323 from source of July 7, 1982 11:31 am.

-- The RPC stub modules for LupineMarshalTest are:
--   LupineMarshalTestRpcControl.mesa;
--   LupineMarshalTestRpcClientImpl.mesa;
--   LupineMarshalTestRpcBinderImpl.mesa;
--   LupineMarshalTestRpcServerImpl.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 = FALSE
--   Warn about short POINTER ("MDS") allocations = FALSE
--   Maximum number of dynamic heap NEWs = 50, MDS NEWs = 50
--   Acceptable parameter protocols = VersionRange[1..1].


DIRECTORY
  Rope,
  LupineMarshalTest,
  RPC USING [defaultInterfaceName, EncryptionKey, InterfaceName, Principal,
      standardZones, VersionRange, Zones];


LupineMarshalTestRpcControl: DEFINITIONS
  SHARES  LupineMarshalTest
  = BEGIN OPEN LupineMarshalTest, 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 [
      Null: PROCEDURE,
      One: PROCEDURE [one: INTEGER] RETURNS [a: INTEGER],
      Four: PROCEDURE [one: INTEGER, two: INTEGER, three: INTEGER,
          four: INTEGER] RETURNS [a: INTEGER, b: INTEGER, c: INTEGER, d:
          INTEGER],
      Ten: PROCEDURE [one: INTEGER, two: INTEGER, three: INTEGER, four:
          INTEGER, five: INTEGER, six: INTEGER, seven: INTEGER, eight:
          INTEGER, nine: INTEGER, ten: INTEGER] RETURNS [a: INTEGER, b:
          INTEGER, c: INTEGER, d: INTEGER, e: INTEGER, f: INTEGER, g: INTEGER,
          h: INTEGER, i: INTEGER, j: INTEGER],
      Signal: SIGNAL [in: INTEGER] RETURNS [out: INTEGER],
      SignalTest: PROCEDURE [in: INTEGER, action: SignalAction] RETURNS
          [out: INTEGER],
      TenArray: PROCEDURE [in: Array10] RETURNS [out: Array10],
      FortyArray: PROCEDURE [in: Array40] RETURNS [out: Array40],
      HundredArray: PROCEDURE [in: Array100] RETURNS [out: Array100],
      SimpleArithmetic: PROCEDURE [pad: VARArithmetic],
      FillArray: PROCEDURE [in: INTEGER, out: RESULTArray],
      ReadPages: PROCEDURE [item: Item, buffer: RESULTPages],
      CreateList: PROCEDURE [in: LONG INTEGER, length: INTEGER] RETURNS
          [out: IntList],
      StringCopy: PROCEDURE [in: ReadonlyString, out: VARString],
      CharToVariantString: PROCEDURE [char: CHARACTER, length: INTEGER,
          type: StringType, makeNil: BOOLEAN] RETURNS [StringSelection],
      BitsToSequence: PROCEDURE [in: BitDescriptor] RETURNS [out: REF
          READONLY BitSequence],
      PuntStringsToAtoms: SIGNAL,
      StringsToAtoms: PROCEDURE [in: StringList] RETURNS [out: AtomList],
      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),
      Null (4), One (5), Four (6), Ten (7), SignalTest (8), TenArray (9),
      FortyArray (10), HundredArray (11), SimpleArithmetic (12), FillArray
      (13), ReadPages (14), CreateList (15), StringCopy (16), CharToVariantString
      (17), BitsToSequence (18), StringsToAtoms (19)};

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


END.  -- LupineMarshalTestRpcControl.