XNSFilingAttributes.mesa
Copyright Ó 1990 by Xerox Corporation. All rights reserved.
Bill Jackson (bj), May 25, 1990 6:49 pm PDT
DIRECTORY
BasicTime USING [GMT, nullGMT],
FilingP10V5 USING [ControlSequence, FilterType, ScopeSequence],
FilingAttributesP10V5 USING [AccessList, AttributeSequence, AttributeValue, FileID, InterpretedAttributeType, nullFileID, Ordering, Position, User],
Rope USING [ROPE];
XNSFilingAttributes:
CEDAR
DEFINITIONS ~ {
OPEN FilingP10V5, FilingAttributesP10V5, Rope;
Some handy conversion types
Interpreted: TYPE ~ InterpretedAttributeType [checksum..subtreeSizeLimit];
InterpretedRange: TYPE ~ CARD32[Interpreted.FIRST.ORD..Interpreted.LAST.ORD];
Well-known constants
nullAttributes: FilingAttributesP10V5.AttributeSequence;
nullControls: FilingP10V5.ControlSequence;
Support things
BuildScope: PROC [filterType: FilingP10V5.FilterType, rope: ROPE, type: CARD32]
RETURNS [scope: FilingP10V5.ScopeSequence];
BuildAttribute: PROC [name: ROPE, type: CARD32, time: BasicTime.GMT ← BasicTime.nullGMT, timeType: CARD32 ← 0] RETURNS [attributes: AttributeSequence];
BuildDirectoryAttribute: PROC [nameR: ROPE]
RETURNS [attributes: AttributeSequence];
BuildStoreAttributes: PROC [file: ROPE, vers: CARDINAL, created: BasicTime.GMT]
RETURNS [attributes: AttributeSequence];
Attribute Encapsulation
EncapsulateAccessList: PROC [accessList: AccessList] RETURNS [value: AttributeValue];
DecapsulateAccessList: PROC [value: AttributeValue] RETURNS [accessList: AccessList];
EncapsulateFileID: PROC [fileID: FileID] RETURNS [value: AttributeValue];
DecapsulateFileID: PROC [value: AttributeValue] RETURNS [fileID: FileID];
EncapsulateOrdering: PROC [ordering: Ordering] RETURNS [value: AttributeValue];
DecapsulateOrdering: PROC [value: AttributeValue] RETURNS [ordering: Ordering];
EncapsulatePosition: PROC [position: Position] RETURNS [value: AttributeValue];
DecapsulatePosition: PROC [value: AttributeValue] RETURNS [position: Position];
EncapsulateUser: PROC [name: ROPE] RETURNS [value: AttributeValue];
DecapsulateUser: PROC [value: AttributeValue] RETURNS [user: User];
Generic (immuatable?)
EncapsulateBoolean: PROC [b: BOOL] RETURNS [value: AttributeValue];
DecapsulateBoolean: PROC [value: AttributeValue] RETURNS [b: BOOL];
EncapsulateCard16: PROC [i: CARD16] RETURNS [value: AttributeValue];
DecapsulateCard16: PROC [value: AttributeValue] RETURNS [i: CARD16];
EncapsulateCard32: PROC [i: CARD32] RETURNS [value: AttributeValue];
DecapsulateCard32: PROC [value: AttributeValue] RETURNS [i: CARD32];
EncapsulateRope: PROC [name: ROPE] RETURNS [value: AttributeValue];
DecapsulateRope: PROC [value: AttributeValue] RETURNS [rope: ROPE];
DecapsulateRefText: PROC [value: AttributeValue] RETURNS [rope: REF TEXT];
EncapsulateBytes: PROC [bytes: LONG POINTER, rope: ROPE];
EncapsulateNull: PROC RETURNS [value: AttributeValue];
xx
InfoFromAttributeSequence: PROC [attributes: AttributeSequence]
RETURNS [vers: CARD ← 0, bytes: INT ← -1, created: BasicTime.GMT ← BasicTime.nullGMT, fileType: CARD ← 0, pathName: REF TEXT ← NIL, fID: FileID ← nullFileID, isDir: BOOL ← FALSE, numKids: CARD ← 0];
}.