-- Stub file AlpineOwnerRpcControl.mesa was translated on  7-Jun-83
    -- 11:45:18 PDT by Lupine of 18-Feb-83 11:25:52 PST.

-- Source interface AlpineOwner came from file AlpineOwner.bcd, which
    -- was created on  7-Jun-83 11:44:53 PDT with version stamp 117#174#6244075503
    -- from source of  2-Apr-83 13:52:55 PST.

-- The RPC stub modules for AlpineOwner are:
    -- AlpineOwnerRpcControl.mesa;
    -- AlpineOwnerRpcClientImpl.mesa;
    -- AlpineOwnerRpcBinderImpl.mesa;
    -- AlpineOwnerRpcServerImpl.mesa.

-- The parameters for this translation are:
    -- Target language = Cedar;
    -- Default parameter passing = VALUE;
    -- Deallocate server heap arguments = TRUE;
    -- Inline RpcServerImpl dispatcher stubs = FALSE;
    -- Maximum number of dynamic heap NEWs = 50, MDS NEWs = 50;
    -- Acceptable parameter protocols = VersionRange[1,1].


DIRECTORY
  AlpineEnvironment,
  AlpineOwner,
  RPC USING [defaultInterfaceName, EncryptionKey, InterfaceName, Principal,
      standardZones, VersionRange, Zones];


AlpineOwnerRpcControl: DEFINITIONS
  SHARES  AlpineOwner
  = BEGIN OPEN AlpineOwner, 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 [
      ReadProperties: PROCEDURE [conversation: Conversation, transID:
	  TransID, volumeGroupID: VolumeGroupID, owner: OwnerName, desiredProperties:
	  OwnerPropertySet] RETURNS [properties: LIST OF OwnerPropertyValuePair],
      WriteProperties: PROCEDURE [conversation: Conversation, transID:
	  TransID, volumeGroupID: VolumeGroupID, owner: OwnerName, properties:
	  LIST OF OwnerPropertyValuePair, enforceTotalQuota: BOOL],
      Create: PROCEDURE [conversation: Conversation, transID: TransID,
	  volumeGroupID: VolumeGroupID, owner: OwnerName, properties: LIST
	  OF OwnerPropertyValuePair, enforceTotalQuota: BOOL] RETURNS [spaceLeftOnVolumeGroup:
	  PageCount],
      Destroy: PROCEDURE [conversation: Conversation, transID: TransID,
	  volumeGroupID: VolumeGroupID, owner: OwnerName],
      ReadNext: PROCEDURE [conversation: Conversation, transID: TransID,
	  volumeGroupID: VolumeGroupID, previousOwner: OwnerName, desiredProperties:
	  OwnerPropertySet] RETURNS [owner: OwnerName, properties: LIST
	  OF OwnerPropertyValuePair],
      ReadDBProperties: PROCEDURE [conversation: Conversation, transID:
	  TransID, volumeGroupID: VolumeGroupID] RETURNS [nOwners: NAT,
	  nEntriesUsed: NAT, nEntries: NAT, totalQuota: PageCount, totalSpaceInUse:
	  PageCount, volumeGroupSize: PageCount],
      ReorganizeDB: PROCEDURE [conversation: Conversation, transID:
	  TransID, volumeGroupID: VolumeGroupID, nEntries: NAT],
      AccessFailed: ERROR [missingAccess: AlpineEnvironment.NeededAccess],
      LockFailed: ERROR [why: AlpineEnvironment.LockFailure],
      OperationFailed: ERROR [why: AlpineEnvironment.OperationFailure],
      StaticallyInvalid: ERROR,
      Unknown: ERROR [what: AlpineEnvironment.UnknownType],
      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),
      ReadProperties (4), WriteProperties (5), Create (6), Destroy (7),
      ReadNext (8), ReadDBProperties (9), ReorganizeDB (10)};

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


    END.  -- AlpineOwnerRpcControl.