<> <> <> <> <> <> <> <> <> DIRECTORY AlpineEnvironment, Basics USING [bytesPerWord, logBytesPerWord], File USING [OldFP, nullOldFP, nullVolumeID, PageCount, VolumeID, wordsPerPage], Rope USING [ROPE], RPC USING [Conversation, Principal, ShortROPE]; OldAlpineEnvironment: DEFINITIONS = BEGIN OPEN AE: AlpineEnvironment; <> Principal: TYPE = RPC.Principal; -- a Grapevine individual FileStore: TYPE = Principal; -- an Alpine instance RName: TYPE = RPC.ShortROPE; -- an arbitrary Grapevine RName OwnerName: TYPE = RPC.ShortROPE; -- an Alpine owner, not necessarily an RName AccessList: TYPE = LIST OF RName; Conversation: TYPE = RPC.Conversation; <> VolOrVolGroupID: TYPE = File.VolumeID; VolumeID: TYPE = AE.VolumeID; VolumeGroupID: TYPE = AE.VolumeGroupID; nullVolumeID: VolumeID = [File.nullVolumeID]; -- the ID of no volume nullVolumeGroupID: VolumeGroupID = [File.nullVolumeID]; -- the ID of no volume group FileID: TYPE = File.OldFP; -- volume-relative ID of a file nullFileID: FileID = File.nullOldFP; -- the ID of no file UniversalFile: TYPE = AE.UniversalFile; nullUniversalFile: UniversalFile = [volumeID: nullVolumeID, fileID: nullFileID]; PageNumber: TYPE = INT; -- should be [0..maxPagesPerFile] PageCount: TYPE = INT; PageRun: TYPE = AE.PageRun; maxPagesPerFile: INT = File.PageCount.LAST; wordsPerPage: CARDINAL = File.wordsPerPage; bytesPerPage: CARDINAL = wordsPerPage * Basics.bytesPerWord; logWordsPerPage: CARDINAL = 8; -- ugh! logBytesPerPage: CARDINAL = logWordsPerPage + Basics.logBytesPerWord; <> Property: TYPE = AE.Property; PropertyValuePair: TYPE = AE.PropertyValuePair; ByteCount: TYPE = INT; maxStringNameChars: CARDINAL = 100; -- max length of any string appearing in a property FileVersion: TYPE = INT; <> OpenFileID: TYPE = AE.OpenFileID; -- represents a single client's access to a single file under a single transaction. Unique only within a single Alpine instance. nullOpenFileID: OpenFileID = LOOPHOLE[LONG[0]]; -- ID of no open file AccessRights: TYPE = AE.AccessRights; LockMode: TYPE = AE.LockMode [ none .. intendWrite ]; LockOption: TYPE = AE.LockOption; RecoveryOption: TYPE = AE.RecoveryOption; ReferencePattern: TYPE = AE.ReferencePattern; <> OwnerProperty: TYPE = AE.OwnerProperty; OwnerPropertyValuePair: TYPE = AE.OwnerPropertyValuePair; nullRootFile: UniversalFile = [nullVolumeID, nullFileID]; OwnerPropertySet: TYPE = PACKED ARRAY OwnerProperty OF FalseBool; FalseBool: TYPE = BOOLEAN _ FALSE; allOwnerProperties: OwnerPropertySet = ALL [TRUE]; <> TransID: TYPE = AE.TransID; -- globally permanently unique capability for a transaction nullTransIDRep: ARRAY [0..SIZE[TransID]) OF UNSPECIFIED = [0,0,0,0,0,0,0,0,0]; nullTransID: TransID = LOOPHOLE[nullTransIDRep]; -- ID of no transaction Outcome: TYPE = AE.Outcome; CommitOrAbort: TYPE = Outcome [abort .. commit]; WorkerState: TYPE = AE.WorkerState; <> NeededAccess: TYPE = AE.NeededAccess; -- when access is denied, indicates the access control list in which client's membership was required but not present OperationFailure: TYPE = AE.OperationFailure; LockFailure: TYPE = { conflict, -- lock cannot immediately be set because a conflicting lock is already set by another transaction timeout}; -- lock cannot be set even after waiting a long time, perhaps due to undetected deadlock UnknownType: TYPE = AlpineEnvironment.UnknownType; <> String: TYPE = Rope.ROPE; END. <> <> <<>>