-- Copyright (C) 1987 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on April 4, 1987 3:22:46 pm PST by Lupine of January 22, 1987 5:37:32 pm PST
-- Source interface ThParty came from file ThParty.bcd, which was created on April 4, 1987 3:22:43 pm PST with version stamp 236#213#24101537014 from source of February 26, 1987 4:06:59 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,
  GVBasics,
  IV,
  RefID,
  RPC,
  Thrush,
  ThSmartsRpcControl,
  ThParty,
  RPCLupine USING [ImportHandle, noHost, RPCHost];


ThPartyRpcControl: DEFINITIONS
  SHARES  ThParty
  = BEGIN OPEN ThParty, RpcPublic: RPC, RpcPrivate: RPCLupine;


-- 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: RpcPrivate.RPCHost←RpcPrivate.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: RpcPrivate.RPCHost←RpcPrivate.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 [
      CreateConversation: SAFE PROCEDURE [shhh: SHHH, credentials:
          Credentials, state: Thrush.StateInConv, urgency: Thrush.CallUrgency,
          alertKind: Thrush.AlertKind, reason: Thrush.Reason, comment:
          ROPE, subject: Thrush.ROPE, checkConflict: BOOL] RETURNS [nb:
          NB, convEvent: Thrush.ConvEvent],
      Alert: SAFE PROCEDURE [shhh: SHHH, credentials: Credentials,
          calledPartyID: PartyID, comment: ROPE] RETURNS [nb: NB],
      Advance: SAFE PROCEDURE [shhh: SHHH, credentials: Credentials,
          state: Thrush.StateInConv, reportToAll: BOOL, reason: Thrush.Reason,
          comment: ROPE, bilateral: BOOL] RETURNS [nb: NB, convEvent: Thrush.ConvEvent],
      ReportAction: SAFE PROCEDURE [shhh: SHHH, report: Thrush.ActionReport,
          reportToAll: BOOL, selfOnCompletion: BOOL] RETURNS [nb: NB, numReportsIssued:
          NAT],
      GetConversationInfo: SAFE PROCEDURE [shh: SHHH, convID: ConversationID]
          RETURNS [nb: NB, cInfo: ConversationInfo],
      GetPartyInfo: SAFE PROCEDURE [shh: SHHH, credentials: Credentials,
          nameReq: NameReq, allParties: BOOL] RETURNS [nb: NB, pInfo: PartyInfo],
      DescribeParty: SAFE PROCEDURE [partyID: Thrush.PartyID, nameReq:
          NameReq] RETURNS [nb: NB, description: Thrush.ROPE, type: Thrush.PartyType,
          partner: Thrush.PartyID, visitee: Thrush.PartyID, visitors: LIST
          OF Thrush.PartyID],
      RegisterServiceInterface: SAFE PROCEDURE [shhh: SHHH, credentials:
          Credentials, interfaceSpecPattern: Thrush.InterfaceSpec] RETURNS
          [nb: NB, interfaceSpec: Thrush.InterfaceSpec],
      LookupServiceInterface: SAFE PROCEDURE [shhh: SHHH, credentials:
          Credentials, serviceParty: PartyID, type: RPC.ShortROPE] RETURNS
          [nb: NB, interfaceSpec: Thrush.InterfaceSpec],
      RegisterKey: SAFE PROCEDURE [shh: SHHH, credentials: Credentials,
          key: Thrush.EncryptionKey, reportNewKeys: BOOL] RETURNS [nb:
          NB, keyIndex: [0..15]],
      GetKeyTable: SAFE PROCEDURE [shh: SHHH, credentials: Credentials]
          RETURNS [nb: NB, keyTable: Thrush.KeyTable],
      UnregisterKey: SAFE PROCEDURE [shh: SHHH, credentials: Credentials,
          key: Thrush.EncryptionKey] RETURNS [nb: NB],
      GetParty: SAFE PROCEDURE [shh: SHHH, partyID: PartyID, rName:
          ROPE, type: Thrush.PartyType] RETURNS [nb: NB, newPartyID: PartyID],
      GetPartyFromNumber: SAFE PROCEDURE [shh: SHHH, partyID: PartyID,
          phoneNumber: Thrush.ROPE, description: ROPE] RETURNS [nb: NB,
          newPartyID: PartyID],
      GetPartyFromFeepNum: SAFE PROCEDURE [shh: SHHH, partyID: PartyID,
          feepNum: Thrush.ROPE] RETURNS [nb: NB, newPartyID: PartyID],
      GetCurrentParty: SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID]
          RETURNS [nb: NB, partyID: Thrush.PartyID],
      ReleaseParty: SAFE PROCEDURE [shh: SHHH, partyID: PartyID, targetPartyID:
          PartyID] RETURNS [nb: NB],
      GetNumbersForRName: SAFE PROCEDURE [shh: SHHH, rName: ROPE] RETURNS
          [fullRName: ROPE, number: ROPE, homeNumber: ROPE],
      Register: SAFE PROCEDURE [shh: SHHH, rName: ROPE, type: Thrush.PartyType,
          clonePartyID: PartyID, interface: SmartsInterfaceName, properties:
          SmartsProperties] RETURNS [nb: NB, credentials: Credentials],
      CheckIn: SAFE PROCEDURE [shh: SHHH, credentials: Credentials]
          RETURNS [nb: NB],
      Deregister: SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS
          [nb: NB],
      Enable: SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS
          [nb: Thrush.NB],
      Disable: SAFE PROCEDURE [shh: SHHH, smartsID: SmartsID] RETURNS
          [nb: Thrush.NB],
      Visit: SAFE PROCEDURE [shh: SHHH, visitedParty: PartyID, visitingParty:
          PartyID, visitingPassword: GVBasics.Password] RETURNS [nb: Thrush.NB],
      Unvisit: SAFE PROCEDURE [shh: SHHH, visitedParty: PartyID, visitingParty:
          PartyID, visitingPassword: GVBasics.Password] RETURNS [nb: Thrush.NB],
      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),
      CreateConversation (4), Alert (5), Advance (6), ReportAction (7),
      GetConversationInfo (8), GetPartyInfo (9), DescribeParty (10), RegisterServiceInterface
      (11), LookupServiceInterface (12), RegisterKey (13), GetKeyTable
      (14), UnregisterKey (15), GetParty (16), GetPartyFromNumber (17),
      GetPartyFromFeepNum (18), GetCurrentParty (19), ReleaseParty (20),
      GetNumbersForRName (21), Register (22), CheckIn (23), Deregister
      (24), Enable (25), Disable (26), Visit (27), Unvisit (28)};

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


END.  -- ThPartyRpcControl.