OldVolumeActionsImpl.mesa
Copyright Ó 1985 by Xerox Corporation. All rights reserved.
Last edited by:
Taft on April 10, 1983 5:24 pm
Kolling on March 21, 1983 2:01 pm
Hauser, March 8, 1985 11:11:46 am PST
Carl Hauser, January 8, 1987 2:48:44 pm PST
Loose ends:
This whole module is not well defined; who calls AccessControl.RegisterVolumeGroup and AccessControl.UnRegisterVolumeGroup, and when?
DIRECTORY
OldAlpineEnvironment,
OldAlpineVolume,
AlpineVolume;
OldVolumeActionsImpl: PROGRAM
IMPORTS AV: OldAlpineVolume, AlpineVolume
EXPORTS OldAlpineVolume =
BEGIN OPEN AE: OldAlpineEnvironment;
OldAlpineVolume.
GetGroup: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, lock: AE.LockOption] RETURNS [volumes: LIST OF AE.VolumeID] =
BEGIN
Work: PROC ~ {
volumes ← AlpineVolume.GetGroup[conversation, transID, volumeGroupID, lock];
};
DoWork[Work];
END;
GetNextGroup: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, previousGroup: AE.VolumeGroupID ← AE.nullVolumeGroupID, lock: AE.LockOption] RETURNS [volumeGroupID: AE.VolumeGroupID] =
BEGIN
Work: PROC ~ {
volumeGroupID ← AlpineVolume.GetNextGroup[conversation, transID, previousGroup, lock];
};
DoWork[Work];
END;
GetEnclosingGroup: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeID: AE.VolumeID, lock: AE.LockOption] RETURNS [volumeGroupID: AE.VolumeGroupID] =
BEGIN
Work: PROC ~ {
volumeGroupID ← AlpineVolume.GetEnclosingGroup[conversation, transID, volumeID, lock];
};
DoWork[Work];
END;
Internal procedures.
DoWork: PROC [work: PROC] RETURNS [] ~ {
accessReason: OldAlpineEnvironment.NeededAccess;
unknownWhat: OldAlpineEnvironment.UnknownType;
{
ENABLE {
AlpineVolume.AccessFailed => {accessReason ← missingAccess; GOTO accessFailed};
AlpineVolume.StaticallyInvalid => {GOTO staticallyInvalid};
AlpineVolume.Unknown => {unknownWhat ← what; GOTO unknown};
};
work[];
EXITS
accessFailed => ERROR AV.AccessFailed[accessReason];
staticallyInvalid => ERROR AV.StaticallyInvalid;
unknown => ERROR AV.Unknown[unknownWhat];
};
};
END.
Hauser, March 8, 1985 11:11:29 am PST
Added copyright.