MailTransportP17V5AuxImpl.Mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Generated by Willie-sue.pa at February 13, 1989 6:28:33 pm PST
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
DIRECTORY
Convert,
Rope,
MailTransportP17V5,
AuthenticationP14V2Aux,
CHNameP2V0Aux,
MailTransportP17V5Aux;
MailTransportP17V5AuxImpl: CEDAR PROGRAM
IMPORTS Convert, Rope, AuthenticationP14V2Aux, CHNameP2V0Aux
EXPORTS MailTransportP17V5Aux ~ {
OPEN MailTransportP17V5, MailTransportP17V5Aux;
ROPE: TYPE ~ Rope.ROPE;
ExposeGatewaySpecInfo: PUBLIC PROC [arg: GatewaySpecInfo, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAttribute[arg.body[i], (level+1)]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposePerChoiceKind: PUBLIC PROC [arg: PerChoiceKind, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
whole => res ¬ "whole";
broken => res ¬ "broken";
ENDCASE => ERROR
};
ExposeTransferProblem: PUBLIC PROC [arg: TransferProblem, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
aborted => res ¬ "aborted";
ENDCASE => ERROR
};
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, "]"];
};
ExposeReportType: PUBLIC PROC [arg: ReportType, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
none => res ¬ "none";
nonDeliveryOnly => res ¬ "nonDeliveryOnly";
all => res ¬ "all";
unknown => res ¬ "unknown";
ENDCASE => ERROR
};
ExposeAttribute: PUBLIC PROC [arg: Attribute, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "type~", arg.type, ", "];
res ¬ Rope.Cat[res, "value~", arg.value, "]"];
};
ExposeSessionProblem: PUBLIC PROC [arg: SessionProblem, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
invalidHandle => res ¬ "invalidHandle";
wrongState => res ¬ "wrongState";
ENDCASE => ERROR
};
ExposeRNameKind: PUBLIC PROC [arg: RNameKind, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
xns => res ¬ "xns";
gateway => res ¬ "gateway";
ENDCASE => ERROR
};
ExposeWillingness: PUBLIC PROC [arg: Willingness, 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, "]"];
};
ExposeOptionalEnvItemSeq: PUBLIC PROC [arg: OptionalEnvItemSeq, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeEnvelopeItem[arg.body[i], (level+1)]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposeMessageID: PUBLIC PROC [arg: MessageID, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..5) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposePerChoice: PUBLIC PROC [arg: PerChoice, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ Rope.Cat["PerChoice(", ExposePerChoiceKind[arg.type, (level+1)], "): "];
WITH arg SELECT FROM
it: REF PerChoiceObject.whole => {
res ¬ Rope.Concat[res, it.whole] };
it: REF PerChoiceObject.broken => {
res ¬ Rope.Concat[res, ExposeBrokenName[it.broken, (level+1)]] };
ENDCASE => ERROR
};
ExposeBrokenName: PUBLIC PROC [arg: BrokenName, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "given~", arg.given, ", "];
res ¬ Rope.Cat[res, "initials~", arg.initials, ", "];
res ¬ Rope.Cat[res, "family~", arg.family, ", "];
res ¬ Rope.Cat[res, "generation~", arg.generation, "]"];
};
ExposeBPSeq: PUBLIC PROC [arg: BPSeq, 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, "]"];
};
ExposeOtherProblem: PUBLIC PROC [arg: OtherProblem, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
cantExpedite => res ¬ "cantExpedite";
malformedMessage => res ¬ "malformedMessage";
incorrectContentsSize => res ¬ "incorrectContentsSize";
last => res ¬ "last";
ENDCASE => ERROR
};
ExposeInvalidNameList: PUBLIC PROC [arg: InvalidNameList, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeInvalidName[arg.body[i], (level+1)]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
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)], "]"];
};
ExposeAccessProblem: PUBLIC PROC [arg: AccessProblem, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
accessRightsInsufficient => res ¬ "accessRightsInsufficient";
accessRightsIndeterminate => res ¬ "accessRightsIndeterminate";
deliverySlotInUse => res ¬ "deliverySlotInUse";
noSuchDeliverySlot => res ¬ "noSuchDeliverySlot";
deliverySlotIndeterminate => res ¬ "deliverySlotIndeterminate";
wrongService => res ¬ "wrongService";
ENDCASE => ERROR
};
ExposePostingData: PUBLIC PROC [arg: PostingData, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "recipients~", ExposeRecipientList[arg.recipients, (level+1)], ", "];
res ¬ Rope.Cat[res, "contentsType~", Convert.RopeFromCard[arg.contentsType], ", "];
res ¬ Rope.Cat[res, "contentsSize~", Convert.RopeFromCard[arg.contentsSize], ", "];
res ¬ Rope.Cat[res, "bodyPartTypesSequence~", ExposeBPSeq[arg.bodyPartTypesSequence, (level+1)], "]"];
};
ExposeEnvelopeItem: PUBLIC PROC [arg: EnvelopeItem, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "type~", Convert.RopeFromCard[arg.type], ", "];
res ¬ Rope.Cat[res, "value~", ExposeOpaque[arg.value, (level+1)], "]"];
};
ExposeInvalidName: PUBLIC PROC [arg: InvalidName, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "id~", Convert.RopeFromCard[arg.id], ", "];
res ¬ Rope.Cat[res, "invalidReason~", ExposeInvalidReason[arg.invalidReason, (level+1)], "]"];
};
ExposeOrgUnits: PUBLIC PROC [arg: OrgUnits, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, arg.body[i]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposeRecipientList: PUBLIC PROC [arg: RecipientList, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeRecipient[arg.body[i], (level+1)]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposeRName: PUBLIC PROC [arg: RName, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ Rope.Cat["RName(", ExposeRNameKind[arg.type, (level+1)], "): "];
WITH arg SELECT FROM
it: REF RNameObject.xns => {
res ¬ Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.xns, (level+1)]] };
it: REF RNameObject.gateway => {
res ¬ Rope.Concat[res, ExposeGatewayRecord[it.gateway, (level+1)]] };
ENDCASE => ERROR
};
ExposeServiceProblem: PUBLIC PROC [arg: ServiceProblem, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
cannotAuthenticate => res ¬ "cannotAuthenticate";
serviceFull => res ¬ "serviceFull";
serviceUnavailable => res ¬ "serviceUnavailable";
mediumFull => res ¬ "mediumFull";
ENDCASE => ERROR
};
ExposeOpaque: PUBLIC PROC [arg: Opaque, 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, "]"];
};
ExposeEnvelope: PUBLIC PROC [arg: Envelope, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ¬ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeEnvelopeItem[arg.body[i], (level+1)]];
ENDLOOP;
res ¬ Rope.Concat[res, "]"];
};
ExposeRecipient: PUBLIC PROC [arg: Recipient, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "name~", ExposeRName[arg.name, (level+1)], ", "];
res ¬ Rope.Cat[res, "recipientID~", Convert.RopeFromCard[arg.recipientID], ", "];
res ¬ Rope.Cat[res, "report~", ExposeReportType[arg.report, (level+1)], "]"];
};
ExposeGatewayRecord: PUBLIC PROC [arg: GatewayRecord, level: NAT] RETURNS [res: ROPE] ~ {
res ¬ "[";
res ¬ Rope.Cat[res, "country~", arg.country, ", "];
res ¬ Rope.Cat[res, "adminDomain~", arg.adminDomain, ", "];
res ¬ Rope.Cat[res, "privateDomain~", arg.privateDomain, ", "];
res ¬ Rope.Cat[res, "organization~", arg.organization, ", "];
res ¬ Rope.Cat[res, "organizationalUnits~", ExposeOrgUnits[arg.organizationalUnits, (level+1)], ", "];
res ¬ Rope.Cat[res, "personal~", ExposePerChoice[arg.personal, (level+1)], ", "];
res ¬ Rope.Cat[res, "gatewaySpecificInformation~", ExposeGatewaySpecInfo[arg.gatewaySpecificInformation, (level+1)], "]"];
};
ExposeInvalidReason: PUBLIC PROC [arg: InvalidReason, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
noSuchRecipient => res ¬ "noSuchRecipient";
noMailboxForRecipient => res ¬ "noMailboxForRecipient";
illegalName => res ¬ "illegalName";
noDLsAllowed => res ¬ "noDLsAllowed";
reportNotAllowed => res ¬ "reportNotAllowed";
ENDCASE => ERROR
};
}...