DIRECTORY AlpineInternal USING[FileHandle, FileInstanceHandle, TransHandle], AlpineEnvironment USING[AccessRights, Conversation, FileID, LockOption, RecoveryOption, ReferencePattern, VolumeID], FileInstance USING[Handle, GetFileHandle, GetFileID, GetLockMode, GetTransHandle, GetVolumeID, GetVolumeIDAndFileID, Register, SetLockMode, Unregister], OpenFileMap, OpenFileMapPrivate USING[OpenFileObject]; OpenFileMapObjectImpl: CEDAR MONITOR LOCKS handle USING handle: Handle IMPORTS FI: FileInstance EXPORTS AlpineInternal, OpenFileMap = BEGIN OPEN AE: AlpineEnvironment, AI: AlpineInternal, OFMP: OpenFileMapPrivate; Handle: TYPE = REF OpenFileObject; OpenFileObject: PUBLIC TYPE = OFMP.OpenFileObject; ChangeTransaction: PUBLIC ENTRY PROCEDURE [handle: Handle, trans: AI.TransHandle] = BEGIN -- errors defined in OpenFileMap: none. fileInsHandle: FI.Handle _ FI.Register[trans, FI.GetVolumeID[handle.fileInsHandle], FI.GetFileID[handle.fileInsHandle]]; FI.Unregister[handle.fileInsHandle]; handle.fileInsHandle _ fileInsHandle; END; GetTransHandle: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [trans: AI.TransHandle] = BEGIN -- errors defined in OpenFileMap: none. RETURN[FI.GetTransHandle[handle.fileInsHandle]]; END; GetFileInstanceHandle: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [fileHandle: AI.FileInstanceHandle] = BEGIN -- errors defined in OpenFileMap: none. RETURN[handle.fileInsHandle]; END; GetFileHandle: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [fileHandle: AI.FileHandle] = BEGIN -- errors defined in OpenFileMap: none. RETURN[FI.GetFileHandle[handle.fileInsHandle]]; END; GetConversation: PUBLIC PROCEDURE [handle: Handle] RETURNS [conversation: AE.Conversation] = BEGIN -- errors defined in OpenFileMap: none. RETURN[handle.conversation]; END; GetVolumeID: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [volumeID: AE.VolumeID] = BEGIN -- errors defined in OpenFileMap: none. RETURN[FI.GetVolumeID[handle.fileInsHandle]]; END; GetFileID: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [fileID: AE.FileID] = BEGIN -- errors defined in OpenFileMap: none. RETURN[FI.GetFileID[handle.fileInsHandle]]; END; GetVolumeIDAndFileID: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [volumeID: AE.VolumeID, fileID: AE.FileID] = BEGIN -- errors defined in OpenFileMap: none. [volumeID, fileID] _ FI.GetVolumeIDAndFileID[handle.fileInsHandle]; END; GetAccessRights: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [access: AE.AccessRights] = BEGIN -- errors defined in this interface: none. RETURN[handle.access]; END; SetAccessRights: PUBLIC ENTRY PROCEDURE [handle: Handle, access: AE.AccessRights] = BEGIN -- errors defined in this interface: none. handle.access _ access; END; GetLockOption: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [lock: AE.LockOption] = BEGIN -- errors defined in this interface: none. lock.ifConflict _ handle.lockOption.ifConflict; lock.mode _ FI.GetLockMode[handle.fileInsHandle]; END; SetLockOption: PUBLIC ENTRY PROCEDURE [handle: Handle, lock: AE.LockOption] = BEGIN -- errors defined in this interface: none. handle.lockOption.ifConflict _ lock.ifConflict; FI.SetLockMode[handle.fileInsHandle, lock.mode]; END; GetRecoveryOption: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [recovery: AE.RecoveryOption] = BEGIN -- errors defined in this interface: none. RETURN[handle.recoveryOption]; END; SetRecoveryOption: PUBLIC ENTRY PROCEDURE [handle: Handle, recovery: AE.RecoveryOption] = BEGIN -- errors defined in this interface: none. handle.recoveryOption _ recovery; END; GetReferencePattern: PUBLIC ENTRY PROCEDURE [handle: Handle] RETURNS [referencePattern: AE.ReferencePattern] = BEGIN -- errors defined in this interface: none. RETURN[handle.referencePattern]; END; SetReferencePattern: PUBLIC ENTRY PROCEDURE [handle: Handle, referencePattern: AE.ReferencePattern] = BEGIN -- errors defined in this interface: none. handle.referencePattern _ referencePattern; END; END. Edit Log Initial: Kolling: November 1, 1982 2:37 pm: an impl module for OpenFileMap. ΖOpenFileMapObjectImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by Kolling on May 17, 1983 3:46 pm Hauser, March 8, 1985 11:02:02 am PST Causes the existing OpenFileObject to be registered with a new transaction trans, including the suitable unregistration/registration calls on FileInstance and FileMap. Access to attributes that can change, but aren't exactly "read/write." Access to immutable attributes. Access to read/write attributes. reads ifConflict from the OpenFileObject and LockMode from the FileInstanceObject. sets ifConflict in the OpenFileObject and LockMode in the FileInstanceObject. Hauser, March 8, 1985 11:01:48 am PST Nodified, added copyright. Κρ˜šœ™Icodešœ Οmœ1™<—šœ™Jšœ™K™%J˜—JšΟk ˜ ˜˜Jšžœ.˜3—˜šžœ@˜EJ˜——˜ šžœL˜QJ˜9——J˜ ˜Jšžœ˜J˜J˜——š œžœžœžœžœ˜FJšžœžœ˜Jšžœ˜%J˜J˜—Jš žœžœžœžœžœ˜OJ˜Jšœžœžœ˜"Jšœžœžœžœ˜3J˜J˜J˜Jšœ§™§J˜š Οnœžœžœž œžœ˜TJšžœΟc(˜/šœžœ žœžœ#˜SJšžœ"˜$—Jšžœ"˜$J˜%Jšžœ˜J˜J˜J˜—JšœF™FJ˜J˜š Ÿœžœžœž œžœ˜Hšžœ˜Jšžœ (˜/Jšžœžœ'˜0Jšžœ˜J˜J˜——š Ÿœžœžœž œžœ ˜Tšžœ˜Jšžœ (˜/Jšžœ˜Jšžœ˜J˜J˜——š Ÿ œžœžœž œžœ ˜Lšžœ˜Jšžœ (˜/Jšžœžœ&˜/Jšžœ˜J˜J˜J˜——Jšœ™J˜J˜šŸœžœž œžœ˜Jšžœ˜Jšžœ (˜/Jšžœ˜Jšžœ˜J˜J˜——š Ÿ œžœžœž œžœ ˜Hšžœ ˜Jšžœ (˜/Jšžœžœ$˜-Jšžœ˜J˜J˜——š Ÿ œžœžœž œžœ žœ ˜QJšžœ (˜/Jšžœžœ"˜+Jšžœ˜J˜J˜—š Ÿœžœžœž œžœ ˜Qšžœžœ ˜!Jšžœ (˜/Jšœžœ,˜CJšžœ˜J˜J˜J˜——Jšœ ™ J˜J˜š Ÿœžœžœž œžœ ˜Išžœ˜Jšžœ +˜1Jšžœ˜Jšžœ˜J˜J˜——š Ÿœžœžœž œžœ˜SJšžœ +˜1J˜Jšžœ˜J˜J˜—JšœR™RJ˜š Ÿ œžœžœž œžœžœ˜VJšžœ +˜1J˜/Jšœ žœ#˜1Jšžœ˜J˜J˜—JšœM™MJ˜š Ÿ œžœžœž œžœ˜MJšžœ +˜1J˜/Jšžœ.˜0Jšžœ˜J˜J˜—š Ÿœžœžœž œžœ ˜Mšžœ˜Jšžœ +˜1Jšžœ˜Jšžœ˜J˜J˜——šŸœžœžœž œ˜Dšžœ˜Jšžœ +˜1J˜!Jšžœ˜J˜J˜——š Ÿœžœžœž œžœ˜Wšžœ˜Jšžœ +˜1Jšžœ˜ Jšžœ˜J˜J˜——šŸœžœžœž œ#˜Nšžœ˜Jšžœ +˜1J˜+Jšžœ˜J˜J˜J˜J˜——Jšžœ˜˜J˜J˜—J˜K™%K™—K™—…—Ι