-- AlpFile.mesa -- Last edited by -- Kolling on May 2, 1983 12:30 pm DIRECTORY AlpineEnvironment USING[AccessRights, FileID, LockFailure, LockOption, NeededAccess, OpenFileID, OperationFailure, OwnerName, PageCount, PageRun, PropertyValuePair, RecoveryOption, ReferencePattern, UnknownType, VolOrVolGroupID, VolumeID], AlpineFile USING[allProperties, PropertySet, RESULTPageBuffer, standardFile, VALUEPageBuffer], AlpTransaction USING[Handle], File USING[Type]; AlpFile: DEFINITIONS = BEGIN AccessRights: TYPE = AlpineEnvironment.AccessRights; allProperties: PropertySet = AlpineFile.allProperties; FileID: TYPE = AlpineEnvironment.FileID; LockOption: TYPE = AlpineEnvironment.LockOption; OpenFileID: TYPE = AlpineEnvironment.OpenFileID; OwnerName: TYPE = AlpineEnvironment.OwnerName; PageCount: TYPE = AlpineEnvironment.PageCount; PageRun: TYPE = AlpineEnvironment.PageRun; PropertySet: TYPE = AlpineFile.PropertySet; PropertyValuePair: TYPE = AlpineEnvironment.PropertyValuePair; RecoveryOption: TYPE = AlpineEnvironment.RecoveryOption; ReferencePattern: TYPE = AlpineEnvironment.ReferencePattern; RESULTPageBuffer: TYPE = AlpineFile.RESULTPageBuffer; standardFile: File.Type = AlpineFile.standardFile; VALUEPageBuffer: TYPE = AlpineFile.VALUEPageBuffer; VolOrVolGroupID: TYPE = AlpineEnvironment.VolOrVolGroupID; VolumeID: TYPE = AlpineEnvironment.VolumeID; AccessFailed: ERROR [missingAccess: AlpineEnvironment.NeededAccess]; LockFailed: ERROR [why: AlpineEnvironment.LockFailure]; OperationFailed: ERROR [why: AlpineEnvironment.OperationFailure]; StaticallyInvalid: ERROR; Unknown: ERROR [what: AlpineEnvironment.UnknownType]; PossiblyDamaged: SIGNAL; Handle: TYPE = REF Object; Object: TYPE = RECORD[ trans: AlpTransaction.Handle, openFileID: OpenFileID]; -- in addition to the errors documented for the corresponding Alpine procedures, all of the procedures defined in this interface can also error RPC.CallFailed[RPC.CallFailure]. Open: PROCEDURE[transHandle: AlpTransaction.Handle, volumeID: VolumeID, fileID: FileID, access: AccessRights _ readOnly, lock: LockOption _ [intendRead, wait], recoveryOption: RecoveryOption _ log, referencePattern: ReferencePattern _ random, zone: ZONE _ NIL] RETURNS[handle: Handle]; Create: PROCEDURE[transHandle: AlpTransaction.Handle, volumeID: VolOrVolGroupID, owner: OwnerName, initialSize: PageCount, type: File.Type _ standardFile, recoveryOption: RecoveryOption _ log, referencePattern: ReferencePattern _ random, zone: ZONE _ NIL] RETURNS[handle: Handle]; Close: PROCEDURE[handle: Handle]; Delete: PROCEDURE[handle: Handle]; ReadPages: PROCEDURE[handle: Handle, pageRun: PageRun, pageBuffer: RESULTPageBuffer, lock: LockOption _ [read, wait]]; WritePages: PROCEDURE[handle: Handle, pageRun: PageRun, pageBuffer: VALUEPageBuffer, lock: LockOption _ [write, wait]]; ReadProperties: PROCEDURE[handle: Handle, desiredProperties: PropertySet _ allProperties, lock: LockOption _ [read, wait]] RETURNS[properties: LIST OF PropertyValuePair]; WriteProperties: PROCEDURE[handle: Handle, properties: LIST OF PropertyValuePair, lock: LockOption _ [write, wait]]; LockPages: PROCEDURE[handle: Handle, pageRun: PageRun, lock: LockOption _ [read, wait]]; UnlockPages: PROCEDURE[handle: Handle, pageRun: PageRun]; GetAccessRights: PROCEDURE[handle: Handle] RETURNS[access: AccessRights]; GetFileID: PROCEDURE[handle: Handle] RETURNS[fileID: FileID]; GetLockOption: PROCEDURE[handle: Handle] RETURNS[lock: LockOption]; SetLockOption: PROCEDURE[handle: Handle, lock: LockOption]; GetRecoveryOption: PROCEDURE[handle: Handle] RETURNS[recoveryOption: RecoveryOption]; GetReferencePattern: PROCEDURE[handle: Handle] RETURNS[referencePattern: ReferencePattern]; SetReferencePattern: PROCEDURE[handle: Handle, referencePattern: ReferencePattern]; GetSize: PROCEDURE[handle: Handle, lock: LockOption _ [read, wait]] RETURNS[size: PageCount]; SetSize: PROCEDURE[handle: Handle, size: PageCount, lock: LockOption _ [write, wait]]; GetVolumeID: PROCEDURE[handle: Handle] RETURNS[volumeID: VolumeID]; UnlockVersion: PROCEDURE[handle: Handle]; IncrementVersion: PROCEDURE[handle: Handle, increment: INT]; END. Edit Log Initial: Kolling: February 14, 1983 5:08 pm: package to aid clients, in conjunction with AlpInstance and AlpTransaction.