-- Copyright (C) 1987 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on March 26, 1987 5:07:10 pm PST by Lupine of January 22, 1987 5:37:32 pm PST
-- Source interface OldAlpineDebug came from file OldAlpineDebug.bcd, which was created on March 26, 1987 5:07:02 pm PST with version stamp 61#252#26055555412 from source of January 7, 1987 10:02:53 am PST.

-- The RPC stub modules for OldAlpineDebug are:
--   OldAlpineDebugRpcControl.mesa;
--   OldAlpineDebugRpcClientImpl.mesa;
--   OldAlpineDebugRpcBinderImpl.mesa;
--   OldAlpineDebugRpcServerImpl.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
  OldAlpineEnvironment,
  OldAlpineDebug,
  RPC USING [defaultInterfaceName, EncryptionKey, InterfaceName, Principal,
      standardZones, VersionRange, Zones],
  RPCLupine USING [ImportHandle, noHost, RPCHost];


OldAlpineDebugRpcControl: DEFINITIONS
  SHARES  OldAlpineDebug
  = BEGIN OPEN OldAlpineDebug, 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 [
        interface: InterfaceRecord,
        interfaceName: InterfaceName ← defaultInterfaceName,
        parameterStorage: Zones ← standardZones,
        hostHint: RpcPrivate.RPCHost←RpcPrivate.noHost];


  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 [
          myInterface: RpcPrivate.ImportHandle ← NIL,
      paramZones: RpcPublic.Zones ← RpcPublic.standardZones,
      clientStubReadOwnerFileHeader: PROCEDURE [interface: InterfaceRecord,
          conversation: OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
          volumeGroupID: OldAlpineEnvironment.VolumeGroupID] RETURNS [version:
          NAT, recordedVolGroupID: OldAlpineEnvironment.VolumeGroupID,
          totalQuota: OldAlpineEnvironment.PageCount, quotaLeft: OldAlpineEnvironment.PageCount,
          numberOfOwners: NAT, numberOfOwnerSlotsInUse: NAT, maxNumberOfOwnersAllowed:
          NAT],
      clientStubReadNextOwnerRecord: PROCEDURE [interface: InterfaceRecord,
          conversation: OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
          volumeGroupID: OldAlpineEnvironment.VolumeGroupID, contRecNum:
          INT, desiredProperties: OldAlpineEnvironment.OwnerPropertySet]
          RETURNS [entryEmpty: BOOLEAN, entryValid: BOOLEAN, owner: OldAlpineEnvironment.OwnerName,
          properties: LIST OF OldAlpineEnvironment.OwnerPropertyValuePair,
          nextContRecNum: INT],
      clientStubChangeSpaceForOwner: PROCEDURE [interface: InterfaceRecord,
          conversation: OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
          volumeGroupID: OldAlpineEnvironment.VolumeGroupID, owner: OldAlpineEnvironment.OwnerName,
          nPages: OldAlpineEnvironment.PageCount],
      clientStubReadDBUniversalFile: PROCEDURE [interface: InterfaceRecord,
          volumeGroupID: OldAlpineEnvironment.VolumeGroupID] RETURNS [dBID:
          OldAlpineEnvironment.UniversalFile],
      clientStubReportAccessCacheStats: PROCEDURE[interface: InterfaceRecord]
          RETURNS [nCacheEntries: NAT, statsCacheHit: INT, statsGrapevineAuthorized:
          INT, statsGrapevineNotAuthorized: INT, statsRegServersDown: INT,
          statsIndivGrapeNotAuthorized: INT],
      clientStubReportAccessVolatileStats: PROCEDURE[interface: InterfaceRecord]
          RETURNS [nRegs: INT, nInits: INT, nUnRegs: INT, nReorganizes:
          INT, nEnumAlls: INT, nAllocReqsWin: INT, nAllocReqsLose: INT,
          nDeallocReqs: INT, nRemoveOwner: INT, nEnumFindWin: INT, nEnumFindLose:
          INT, nSetEnums: INT, nActions: INT, nPhaseOnes: INT, nPhaseTwos:
          INT, nAborts: INT],
      clientStubCrashSystem: PROCEDURE [interface: InterfaceRecord,
          conversation: OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID],
      AccessFailed: ERROR [missingAccess: OldAlpineEnvironment.NeededAccess],
      LockFailed: ERROR [why: OldAlpineEnvironment.LockFailure],
      OperationFailed: ERROR [why: OldAlpineEnvironment.OperationFailure],
      StaticallyInvalid: ERROR,
      Unknown: ERROR [what: OldAlpineEnvironment.UnknownType],
      bound: BOOL ← FALSE];

  ReadOwnerFileHeader: PROCEDURE [interface: InterfaceRecord, conversation:
      OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
      volumeGroupID: OldAlpineEnvironment.VolumeGroupID] RETURNS [version:
      NAT, recordedVolGroupID: OldAlpineEnvironment.VolumeGroupID, totalQuota:
      OldAlpineEnvironment.PageCount, quotaLeft: OldAlpineEnvironment.PageCount,
      numberOfOwners: NAT, numberOfOwnerSlotsInUse: NAT, maxNumberOfOwnersAllowed:
      NAT] = INLINE  { RETURN interface.clientStubReadOwnerFileHeader[interface,
      conversation, transID, volumeGroupID]};
   ReadNextOwnerRecord: PROCEDURE [interface: InterfaceRecord, conversation:
      OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
      volumeGroupID: OldAlpineEnvironment.VolumeGroupID, contRecNum: INT,
      desiredProperties: OldAlpineEnvironment.OwnerPropertySet] RETURNS
      [entryEmpty: BOOLEAN, entryValid: BOOLEAN, owner: OldAlpineEnvironment.OwnerName,
      properties: LIST OF OldAlpineEnvironment.OwnerPropertyValuePair,
      nextContRecNum: INT] = INLINE  { RETURN interface.clientStubReadNextOwnerRecord[interface,
      conversation, transID, volumeGroupID, contRecNum, desiredProperties]};
   ChangeSpaceForOwner: PROCEDURE [interface: InterfaceRecord, conversation:
      OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID,
      volumeGroupID: OldAlpineEnvironment.VolumeGroupID, owner: OldAlpineEnvironment.OwnerName,
      nPages: OldAlpineEnvironment.PageCount] = INLINE  { interface.clientStubChangeSpaceForOwner[interface,
      conversation, transID, volumeGroupID, owner, nPages]};
   ReadDBUniversalFile: PROCEDURE [interface: InterfaceRecord, volumeGroupID:
      OldAlpineEnvironment.VolumeGroupID] RETURNS [dBID: OldAlpineEnvironment.UniversalFile]
      = INLINE  { RETURN interface.clientStubReadDBUniversalFile[interface,
      volumeGroupID]};
   ReportAccessCacheStats: PROCEDURE[interface: InterfaceRecord] RETURNS
      [nCacheEntries: NAT, statsCacheHit: INT, statsGrapevineAuthorized:
      INT, statsGrapevineNotAuthorized: INT, statsRegServersDown: INT,
      statsIndivGrapeNotAuthorized: INT] = INLINE  { RETURN interface.clientStubReportAccessCacheStats[interface]};
   ReportAccessVolatileStats: PROCEDURE[interface: InterfaceRecord]
      RETURNS [nRegs: INT, nInits: INT, nUnRegs: INT, nReorganizes: INT,
      nEnumAlls: INT, nAllocReqsWin: INT, nAllocReqsLose: INT, nDeallocReqs:
      INT, nRemoveOwner: INT, nEnumFindWin: INT, nEnumFindLose: INT, nSetEnums:
      INT, nActions: INT, nPhaseOnes: INT, nPhaseTwos: INT, nAborts: INT]
      = INLINE  { RETURN interface.clientStubReportAccessVolatileStats[interface]};
   CrashSystem: PROCEDURE [interface: InterfaceRecord, conversation:
      OldAlpineEnvironment.Conversation, transID: OldAlpineEnvironment.TransID]
      = INLINE  { interface.clientStubCrashSystem[interface, conversation,
      transID]};
 
 -- Definitions for the stubs.
 
 LupineProtocolVersion: PUBLIC VersionRange = [first: 1, last: 1];
 
 InterMdsCallsOnly: PUBLIC BOOLEAN = FALSE;

  ProcedureIndex: PRIVATE TYPE = MACHINE DEPENDENT {
      LupineUnusedIndex (0), LupineLastIndex (3),
      ReadOwnerFileHeader (4), ReadNextOwnerRecord (5), ChangeSpaceForOwner
      (6), ReadDBUniversalFile (7), ReportAccessCacheStats (8), ReportAccessVolatileStats
      (9), CrashSystem (10)};

  SignalIndex: PRIVATE TYPE = MACHINE DEPENDENT {
      LupineUnusedIndex (0), LupineLastIndex (3),
      AccessFailed (4), LockFailed (5), OperationFailed (6), StaticallyInvalid
      (7), Unknown (8)};


END.  -- OldAlpineDebugRpcControl.