-- AlpineUserFileBinderPacifierImpl.mesa
-- Last edited by
-- Kolling on April 27, 1983 3:16 pm
DIRECTORY
AlpineEnvironment,
AlpineFile,
File,
FileTypes;
AlpineUserFileBinderPacifierImpl: PROGRAM
EXPORTS AlpineFile =
BEGIN
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;
RecoveryOption: TYPE = AlpineEnvironment.RecoveryOption;
ReferencePattern: TYPE = AlpineEnvironment.ReferencePattern;
TransID: TYPE = AlpineEnvironment.TransID;
VolOrVolGroupID: TYPE = AlpineEnvironment.VolOrVolGroupID;
VolumeID: TYPE = AlpineEnvironment.VolumeID;
-- AlpineFile:
Open: PUBLIC PROCEDURE[conversation: Conversation, transID: TransID, volumeID:
VolumeID, fileID: FileID, access: AccessRights ← readOnly, lock: LockOption ← [intendRead,
wait], recoveryOption: RecoveryOption ← log, referencePattern: ReferencePattern ← random]
RETURNS [openFileID: OpenFileID] = BEGIN ERROR; END;
standardFile: File.Type = FileTypes.tUntypedFile;
Create: PUBLIC PROCEDURE[conversation: Conversation, transID: TransID, volumeID:
VolOrVolGroupID, owner: OwnerName, initialSize: PageCount, type: File.Type ← standardFile,
recoveryOption: RecoveryOption ← log, referencePattern: ReferencePattern ← random]
RETURNS [openFileID: OpenFileID] = BEGIN ERROR; END;
Close: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID] = BEGIN ERROR; END;
Delete: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID] = BEGIN ERROR; END;
GetVolumeID: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [volumeID: VolumeID] = BEGIN ERROR; END;
GetFileID: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID] RETURNS
[fileID: FileID] = BEGIN ERROR; END;
GetTransID: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [transID: TransID] = BEGIN ERROR; END;
GetAccessRights: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [access: AccessRights] = BEGIN ERROR; END;
GetLockOption: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [lock: LockOption] = BEGIN ERROR; END;
SetLockOption: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
lock: LockOption] = BEGIN ERROR; END;
GetRecoveryOption: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [recoveryOption: RecoveryOption] = BEGIN ERROR; END;
GetReferencePattern: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID]
RETURNS [referencePattern: ReferencePattern] = BEGIN ERROR; END;
SetReferencePattern: PUBLIC PROCEDURE[conversation: Conversation, openFileID:
OpenFileID, referencePattern: ReferencePattern] = BEGIN ERROR; END;
PageRun: TYPE = AlpineEnvironment.PageRun;
PageBuffer: TYPE = LONG DESCRIPTOR FOR ARRAY OF WORD;
VALUEPageBuffer: TYPE = PageBuffer;
RESULTPageBuffer: TYPE = PageBuffer;
maxPagesPerRun: CARDINAL = LAST[CARDINAL]/AlpineEnvironment.wordsPerPage;
ReadPages: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
pageRun: PageRun, pageBuffer: RESULTPageBuffer, lock: LockOption ← [read, wait]] = BEGIN ERROR; END;
WritePages: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
pageRun: PageRun, pageBuffer: VALUEPageBuffer, lock: LockOption ← [write, wait]] = BEGIN ERROR; END;
LockPages: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
pageRun: PageRun, lock: LockOption ← [read, wait]] = BEGIN ERROR; END;
UnlockPages: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
pageRun: PageRun] = BEGIN ERROR; END;
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: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
desiredProperties: PropertySet ← allProperties, lock: LockOption ← [read, wait]] RETURNS
[properties: LIST OF PropertyValuePair] = BEGIN ERROR; END;
WriteProperties: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
properties: LIST OF PropertyValuePair, lock: LockOption ← [write, wait]] = BEGIN ERROR; END;
UnlockVersion: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID] = BEGIN ERROR; END;
IncrementVersion: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID,
increment: LONG INTEGER] = BEGIN ERROR; END;
GetSize: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID, lock:
LockOption ← [read, wait]] RETURNS [size: PageCount] = BEGIN ERROR; END;
SetSize: PUBLIC PROCEDURE[conversation: Conversation, openFileID: OpenFileID, size:
PageCount, lock: LockOption ← [write, wait]] = BEGIN ERROR; END;
END.