<> <> <> <> <> <> <> <> DIRECTORY AlpineEnvironment; AlpineFile: DEFINITIONS = BEGIN AccessList: TYPE = AlpineEnvironment.AccessList; AccessRights: TYPE = AlpineEnvironment.AccessRights; Conversation: TYPE = AlpineEnvironment.Conversation; FileID: TYPE = AlpineEnvironment.FileID; LockOption: TYPE = AlpineEnvironment.LockOption; OpenFileID: TYPE = AlpineEnvironment.OpenFileID; OwnerName: TYPE = AlpineEnvironment.OwnerName; PageCount: TYPE = AlpineEnvironment.PageCount; PageNumber: TYPE = AlpineEnvironment.PageNumber; RecoveryOption: TYPE = AlpineEnvironment.RecoveryOption; ReferencePattern: TYPE = AlpineEnvironment.ReferencePattern; String: TYPE = AlpineEnvironment.String; TransID: TYPE = AlpineEnvironment.TransID; UniversalFile: TYPE = AlpineEnvironment.UniversalFile; VolOrVolGroupID: TYPE = AlpineEnvironment.VolOrVolGroupID; VolumeID: TYPE = AlpineEnvironment.VolumeID; <> Open: PROCEDURE [conversation: Conversation, transID: TransID, universalFile: UniversalFile, access: AccessRights _ readOnly, lock: LockOption _ [intendRead, wait], recoveryOption: RecoveryOption _ log, referencePattern: ReferencePattern _ random] RETURNS [openFileID: OpenFileID, fileID: FileID]; <> <> <> <> Create: PROCEDURE [conversation: Conversation, transID: TransID, volumeID: VolOrVolGroupID, owner: OwnerName, initialSize: PageCount, recoveryOption: RecoveryOption _ log, referencePattern: ReferencePattern _ random] RETURNS [openFileID: OpenFileID, universalFile: UniversalFile]; <> <> <> <> <> <<>> <> <<1. The OpenFileID is no longer known to Alpine because it has been closed (either explicitly or as a result of committing or aborting the transaction).>> <<2. The file it refers to has been deleted by this transaction, perhaps using a different OpenFileID.>> Close: PROCEDURE [conversation: Conversation, openFileID: OpenFileID]; <> <> Delete: PROCEDURE [conversation: Conversation, openFileID: OpenFileID]; <> <> <> GetUniversalFile: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [universalFile: UniversalFile]; <> GetTransID: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [transID: TransID]; <> GetAccessRights: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [access: AccessRights]; <> GetLockOption: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [lock: LockOption]; <> <> SetLockOption: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, lock: LockOption]; <> <> GetRecoveryOption: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [recoveryOption: RecoveryOption]; <> GetReferencePattern: PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS [referencePattern: ReferencePattern]; <> SetReferencePattern: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, referencePattern: ReferencePattern]; <> <> <> <<>> PageRun: TYPE = AlpineEnvironment.PageRun; PageBuffer: TYPE = LONG DESCRIPTOR FOR ARRAY OF WORD; VALUEPageBuffer: TYPE = PageBuffer; RESULTPageBuffer: TYPE = PageBuffer; maxPagesPerRun: CARDINAL = LAST[CARDINAL]/AlpineEnvironment.wordsPerPage; -- This is all that can be described with a DESCRIPTOR (PageBuffer). The restriction applies only to ReadPages and WritePages. ReadPages: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, pageBuffer: RESULTPageBuffer, lock: LockOption _ [read, wait]]; <> <> WritePages: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, pageBuffer: VALUEPageBuffer, lock: LockOption _ [write, wait]]; <> <> LockPages: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, lock: LockOption _ [read, wait]]; <> <> UnlockPages: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun]; <> <> <<>> <> Property: TYPE = AlpineEnvironment.Property; PropertyValuePair: TYPE = AlpineEnvironment.PropertyValuePair; PropertySet: TYPE = PACKED ARRAY Property OF FalseBool; FalseBool: TYPE = BOOLEAN _ FALSE; allProperties: PropertySet = ALL [TRUE]; ByteCount: TYPE = AlpineEnvironment.ByteCount; FileVersion: TYPE = AlpineEnvironment.FileVersion; ReadProperties: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, desiredProperties: PropertySet _ allProperties, lock: LockOption _ [read, wait]] RETURNS [properties: LIST OF PropertyValuePair]; <> <> WriteProperties: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, properties: LIST OF PropertyValuePair, lock: LockOption _ [write, wait]]; <> <> <> <> UnlockVersion: PROCEDURE [conversation: Conversation, openFileID: OpenFileID]; <> <> IncrementVersion: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, increment: LONG INTEGER]; <> <> GetSize: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, lock: LockOption _ [read, wait]] RETURNS [size: PageCount]; <> <> SetSize: PROCEDURE [conversation: Conversation, openFileID: OpenFileID, size: PageCount, lock: LockOption _ [write, wait]]; <> <> <> <> UnlockFile: PROCEDURE [conversation: Conversation, openFileID: OpenFileID]; <> <> <> AccessFailed: ERROR [missingAccess: AlpineEnvironment.NeededAccess]; LockFailed: ERROR [why: AlpineEnvironment.LockFailure]; OperationFailed: ERROR [why: AlpineEnvironment.OperationFailure]; StaticallyInvalid: ERROR; <> Unknown: ERROR [what: AlpineEnvironment.UnknownType]; PossiblyDamaged: SIGNAL; END. <> <> <<>>