<> <> <> <> DIRECTORY Convert, Rope, FilingP10V5, FilingP10V5Aux, AuthenticationP14V2Aux, FilingAttributesP10V5Aux; FilingP10V5AuxImpl: CEDAR PROGRAM IMPORTS Convert, Rope, AuthenticationP14V2Aux, FilingAttributesP10V5Aux EXPORTS FilingP10V5Aux ~ { OPEN FilingP10V5, FilingP10V5Aux; ROPE: TYPE ~ Rope.ROPE; ExposeSecondaryCredentials: PUBLIC PROC [arg: SecondaryCredentials, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["SecondaryCredentials(", ExposeStrength[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF SecondaryCredentialsObject.none => { res _ Rope.Concat[res, ExposeEmptyRecord[it.none, (level+1)]] }; it: REF SecondaryCredentialsObject.simple => { res _ Rope.Concat[res, ExposeSecondary[it.simple, (level+1)]] }; it: REF SecondaryCredentialsObject.strong => { res _ Rope.Concat[res, ExposeEncryptedSecondary[it.strong, (level+1)]] }; ENDCASE => ERROR }; ExposeEmptyRecord: PUBLIC PROC [arg: EmptyRecord, level: NAT] RETURNS [res: ROPE] ~ { res _ "[]"; }; ExposeTransferProblem: PUBLIC PROC [arg: TransferProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM aborted => res _ "aborted"; checksumIncorrect => res _ "checksumIncorrect"; formatIncorrect => res _ "formatIncorrect"; noRendevous => res _ "noRendevous"; wrongDirection => res _ "wrongDirection"; ENDCASE => ERROR }; ExposeByteRange: PUBLIC PROC [arg: ByteRange, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "firstByte~", Convert.RopeFromCard[arg.firstByte], ", "]; res _ Rope.Cat[res, "count~", Convert.RopeFromCard[arg.count], "]"]; }; ExposePatternFilter: PUBLIC PROC [arg: PatternFilter, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "attribute~", FilingAttributesP10V5Aux.ExposeAttribute[arg.attribute, (level+1)], "]"]; }; ExposeDirection: PUBLIC PROC [arg: Direction, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM forward => res _ "forward"; backward => res _ "backward"; ENDCASE => ERROR }; ExposeConnectionProblem: PUBLIC PROC [arg: ConnectionProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM noRoute => res _ "noRoute"; noResponse => res _ "noResponse"; transmissionHardware => res _ "transmissionHardware"; transportTimeout => res _ "transportTimeout"; tooManyLocalConnections => res _ "tooManyLocalConnections"; tooManyRemoteConnections => res _ "tooManyRemoteConnections"; missingCourier => res _ "missingCourier"; missingProgram => res _ "missingProgram"; missingProcedure => res _ "missingProcedure"; protocolMismatch => res _ "protocolMismatch"; parameterInconsistency => res _ "parameterInconsistency"; invalidMessage => res _ "invalidMessage"; returnTimedOut => res _ "returnTimedOut"; otherCallProblem => res _ "otherCallProblem"; ENDCASE => ERROR }; ExposeFilterType: PUBLIC PROC [arg: FilterType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM less => res _ "less"; lessOrEqual => res _ "lessOrEqual"; equal => res _ "equal"; notEqual => res _ "notEqual"; greaterOrEqual => res _ "greaterOrEqual"; greater => res _ "greater"; and => res _ "and"; or => res _ "or"; not => res _ "not"; none => res _ "none"; all => res _ "all"; matches => res _ "matches"; ENDCASE => ERROR }; ExposeScopeSequence: PUBLIC PROC [arg: ScopeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeScope[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeControlType: PUBLIC PROC [arg: ControlType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM lock => res _ "lock"; timeout => res _ "timeout"; access => res _ "access"; ENDCASE => ERROR }; ExposeScope: PUBLIC PROC [arg: Scope, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["Scope(", ExposeScopeType[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF ScopeObject.count => { res _ Rope.Concat[res, Convert.RopeFromCard[it.count]] }; it: REF ScopeObject.depth => { res _ Rope.Concat[res, Convert.RopeFromCard[it.depth]] }; it: REF ScopeObject.direction => { res _ Rope.Concat[res, ExposeDirection[it.direction, (level+1)]] }; it: REF ScopeObject.filter => { res _ Rope.Concat[res, ExposeFilter[it.filter, (level+1)]] }; ENDCASE => ERROR }; ExposeHandle: PUBLIC PROC [arg: Handle, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..2) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeSecondary: PUBLIC PROC [arg: Secondary, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeSecondaryItem[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeSessionToken: PUBLIC PROC [arg: SessionToken, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..2) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeInsertionProblem: PUBLIC PROC [arg: InsertionProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM positionUnavailable => res _ "positionUnavailable"; fileNotUnique => res _ "fileNotUnique"; loopInHierarchy => res _ "loopInHierarchy"; ENDCASE => ERROR }; ExposeFilter: PUBLIC PROC [arg: Filter, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["Filter(", ExposeFilterType[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF FilterObject.less => { res _ Rope.Concat[res, ExposeRelationFilter[it.less, (level+1)]] }; it: REF FilterObject.lessOrEqual => { res _ Rope.Concat[res, ExposeRelationFilter[it.lessOrEqual, (level+1)]] }; it: REF FilterObject.equal => { res _ Rope.Concat[res, ExposeRelationFilter[it.equal, (level+1)]] }; it: REF FilterObject.notEqual => { res _ Rope.Concat[res, ExposeRelationFilter[it.notEqual, (level+1)]] }; it: REF FilterObject.greaterOrEqual => { res _ Rope.Concat[res, ExposeRelationFilter[it.greaterOrEqual, (level+1)]] }; it: REF FilterObject.greater => { res _ Rope.Concat[res, ExposeRelationFilter[it.greater, (level+1)]] }; it: REF FilterObject.and => { res _ Rope.Concat[res, ExposeEmptyRecord[it.and, (level+1)]] }; it: REF FilterObject.or => { res _ Rope.Concat[res, ExposeEmptyRecord[it.or, (level+1)]] }; it: REF FilterObject.not => { res _ Rope.Concat[res, ExposeEmptyRecord[it.not, (level+1)]] }; it: REF FilterObject.none => { res _ Rope.Concat[res, ExposeEmptyRecord[it.none, (level+1)]] }; it: REF FilterObject.all => { res _ Rope.Concat[res, ExposeEmptyRecord[it.all, (level+1)]] }; it: REF FilterObject.matches => { res _ Rope.Concat[res, ExposePatternFilter[it.matches, (level+1)]] }; ENDCASE => ERROR }; ExposeSecondaryItem: PUBLIC PROC [arg: SecondaryItem, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "type~", Convert.RopeFromCard[arg.type], ", "]; res _ Rope.Cat[res, "value~", ExposeSecondaryValueType[arg.value, (level+1)], "]"]; }; ExposeSession: PUBLIC PROC [arg: Session, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "token~", ExposeSessionToken[arg.token, (level+1)], ", "]; res _ Rope.Cat[res, "verifier~", AuthenticationP14V2Aux.ExposeSeqWords[arg.verifier, (level+1)], "]"]; }; ExposeAttributeTypeSequence: PUBLIC PROC [arg: AttributeTypeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeRelationFilter: PUBLIC PROC [arg: RelationFilter, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "attribute~", FilingAttributesP10V5Aux.ExposeAttribute[arg.attribute, (level+1)], ", "]; res _ Rope.Cat[res, "interpretation~", FilingAttributesP10V5Aux.ExposeInterpretation[arg.interpretation, (level+1)], "]"]; }; ExposeEncryptedSecondary: PUBLIC PROC [arg: EncryptedSecondary, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, AuthenticationP14V2Aux.ExposeBlock[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeArgumentProblem: PUBLIC PROC [arg: ArgumentProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM illegal => res _ "illegal"; disallowed => res _ "disallowed"; unreasonable => res _ "unreasonable"; unimplemented => res _ "unimplemented"; duplicated => res _ "duplicated"; missing => res _ "missing"; ENDCASE => ERROR }; ExposeSecondaryValueType: PUBLIC PROC [arg: SecondaryValueType, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeSpaceProblem: PUBLIC PROC [arg: SpaceProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM allocationExceeded => res _ "allocationExceeded"; attributeAreaFull => res _ "attributeAreaFull"; mediumFull => res _ "mediumFull"; ENDCASE => ERROR }; ExposeServiceProblem: PUBLIC PROC [arg: ServiceProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM cannotAuthenticate => res _ "cannotAuthenticate"; serviceFull => res _ "serviceFull"; serviceUnavailable => res _ "serviceUnavailable"; sessionInUse => res _ "sessionInUse"; serviceUnknown => res _ "serviceUnknown"; ENDCASE => ERROR }; ExposeAccessProblem: PUBLIC PROC [arg: AccessProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM accessRightsInsufficient => res _ "accessRightsInsufficient"; accessRightsIndeterminate => res _ "accessRightsIndeterminate"; fileChanged => res _ "fileChanged"; fileDamaged => res _ "fileDamaged"; fileInUse => res _ "fileInUse"; fileNotFound => res _ "fileNotFound"; fileOpen => res _ "fileOpen"; ENDCASE => ERROR }; ExposeScopeType: PUBLIC PROC [arg: ScopeType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM count => res _ "count"; direction => res _ "direction"; filter => res _ "filter"; depth => res _ "depth"; ENDCASE => ERROR }; ExposeStrength: PUBLIC PROC [arg: Strength, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM none => res _ "none"; simple => res _ "simple"; strong => res _ "strong"; ENDCASE => ERROR }; ExposeHandleProblem: PUBLIC PROC [arg: HandleProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM invalid => res _ "invalid"; nullDisallowed => res _ "nullDisallowed"; directoryRequired => res _ "directoryRequired"; ENDCASE => ERROR }; ExposeSecondaryType: PUBLIC PROC [arg: SecondaryType, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeControlTypeSequence: PUBLIC PROC [arg: ControlTypeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeControlType[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeSessionProblem: PUBLIC PROC [arg: SessionProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM tokenInvalid => res _ "tokenInvalid"; serviceAlreadySet => res _ "serviceAlreadySet"; ENDCASE => ERROR }; ExposeControlSequence: PUBLIC PROC [arg: ControlSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeControl[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeLogicFilter: PUBLIC PROC [arg: LogicFilter, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeFilter[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeControl: PUBLIC PROC [arg: Control, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["Control(", ExposeControlType[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF ControlObject.lock => { res _ Rope.Concat[res, ExposeLock[it.lock, (level+1)]] }; it: REF ControlObject.timeout => { res _ Rope.Concat[res, Convert.RopeFromCard[it.timeout]] }; it: REF ControlObject.access => { res _ Rope.Concat[res, FilingAttributesP10V5Aux.ExposeAccessSequence[it.access, (level+1)]] }; ENDCASE => ERROR }; ExposeLock: PUBLIC PROC [arg: Lock, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM lockNone => res _ "lockNone"; share => res _ "share"; exclusive => res _ "exclusive"; ENDCASE => ERROR }; }...