MailTransportP17V5ClientImpl.Mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Generated by Willie-sue.pa at February 13, 1989 6:28:35 pm PST
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
DIRECTORY
CrRPC,
CHNameP2V0,
AuthenticationP14V2,
CHOpsP2V3,
BulkDataP0V1,
MailTransportP17V5;
MailTransportP17V5ClientImpl: CEDAR PROGRAM
IMPORTS CrRPC
EXPORTS MailTransportP17V5 ~ {
OPEN MailTransportP17V5;
Errors
TransferError: PUBLIC TransferErrorType ~ CODE;
ServiceError: PUBLIC ServiceErrorType ~ CODE;
SessionError: PUBLIC SessionErrorType ~ CODE;
OtherError: PUBLIC OtherErrorType ~ CODE;
InvalidRecipients: PUBLIC InvalidRecipientsType ~ CODE;
AuthenticationError: PUBLIC AuthenticationErrorType ~ CODE;
AccessError: PUBLIC AccessErrorType ~ CODE;
GetErrorProc
GetError: CrRPC.GetErrorProc ~ {
SELECT errNum FROM
5 => {
problem: TransferProblem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR TransferError[problem]
};
4 => {
problem: ServiceProblem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR ServiceError[problem]
};
7 => {
problem: SessionProblem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR SessionError[problem]
};
6 => {
problem: OtherProblem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR OtherError[problem]
};
3 => {
nameList: InvalidNameList;
nameList ¬ UProc1[h, s];
ERROR InvalidRecipients[nameList]
};
1 => {
problem: AuthenticationP14V2.Problem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR AuthenticationError[problem]
};
0 => {
problem: AccessProblem;
problem ¬ VAL[CrRPC.GetCard16[s]];
ERROR AccessError[problem]
};
ENDCASE => {
ERROR CrRPC.Error[h, remoteError, "Unexpected Remote Error"];
};
};
Remote Procedures --
PostOneBodyPart: PUBLIC PostOneBodyPartType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
FOR i2: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i2]];
ENDLOOP;
MProc3[h, s, session.verifier];
CrRPC.PutCard32[s, bodyPartType];
CrRPC.PutBulkDataSource[h, s, contents];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~8 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
EndRetrieval: PUBLIC EndRetrievalType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
FOR i4: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i4]];
ENDLOOP;
MProc3[h, s, session.verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~6 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
BeginPost: PUBLIC BeginPostType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
MProc5[h, s, envelopeData.recipients];
CrRPC.PutCard32[s, envelopeData.contentsType];
CrRPC.PutCard32[s, envelopeData.contentsSize];
MProc6[h, s, envelopeData.bodyPartTypesSequence];
CrRPC.PutBool[s, postIfInvalidNames];
CrRPC.PutBool[s, allowDLRecipients];
MProc7[h, s, optionalEnvelopeData];
CrRPC.PutCard16[s, ORD[credentials.type]];
MProc3[h, s, credentials.value];
MProc3[h, s, verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
FOR i8: CARDINAL IN [0..2) DO
session.token[i8] ¬ CrRPC.GetCard16[s];
ENDLOOP;
session.verifier ¬ UProc9[h, s];
invalidNames ¬ UProc1[h, s];
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~1 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
AbortRetrieval: PUBLIC AbortRetrievalType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
FOR i10: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i10]];
ENDLOOP;
MProc3[h, s, session.verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~3 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
RetrieveContent: PUBLIC RetrieveContentType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutBulkDataSink[h, s, content];
FOR i11: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i11]];
ENDLOOP;
MProc3[h, s, session.verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~4 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
MailPoll: PUBLIC MailPollType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, deliverySlot.organization];
CrRPC.PutRope[s, deliverySlot.domain];
CrRPC.PutRope[s, deliverySlot.object];
CrRPC.PutCard16[s, ORD[credentials.type]];
MProc3[h, s, credentials.value];
MProc3[h, s, verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
mailPresent ¬ CrRPC.GetBool[s];
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~7 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ServerPoll: PUBLIC ServerPollType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
};
GetResults: CrRPC.GetResultsProc ~ {
willingness ¬ UProc12[h, s];
address ¬ UProc13[h, s];
serverName.organization ¬ CrRPC.GetRope[s];
serverName.domain ¬ CrRPC.GetRope[s];
serverName.object ¬ CrRPC.GetRope[s];
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~0 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
RetrieveEnvelope: PUBLIC RetrieveEnvelopeType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
FOR i14: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i14]];
ENDLOOP;
MProc3[h, s, session.verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
empty ¬ CrRPC.GetBool[s];
envelope ¬ UProc15[h, s];
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~5 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
BeginRetrieval: PUBLIC BeginRetrievalType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, deliverySlot.organization];
CrRPC.PutRope[s, deliverySlot.domain];
CrRPC.PutRope[s, deliverySlot.object];
CrRPC.PutCard16[s, ORD[credentials.type]];
MProc3[h, s, credentials.value];
MProc3[h, s, verifier];
};
GetResults: CrRPC.GetResultsProc ~ {
FOR i16: CARDINAL IN [0..2) DO
session.token[i16] ¬ CrRPC.GetCard16[s];
ENDLOOP;
session.verifier ¬ UProc9[h, s];
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~2 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
EndPost: PUBLIC EndPostType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
FOR i17: CARDINAL IN [0..2) DO
CrRPC.PutCard16[s, session.token[i17]];
ENDLOOP;
MProc3[h, s, session.verifier];
CrRPC.PutBool[s, abortPost];
};
GetResults: CrRPC.GetResultsProc ~ {
FOR i18: CARDINAL IN [0..5) DO
messageID[i18] ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
CrRPC.Call[h~h, remotePgm~17, remotePgmVersion~5, remoteProc~9 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Unmarshal / Marshal Procs --
MProc3: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: AuthenticationP14V2.SeqWords] ~ {
CrRPC.PutCard16[s, val.length];
FOR i19: CARDINAL IN [0..val.length) DO
CrRPC.PutCard16[s, val.body[i19]];
ENDLOOP;
};
UProc9: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: AuthenticationP14V2.SeqWords] ~ {
{
length21: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[AuthenticationP14V2.SeqWordsObject[length21]];
FOR i20: CARDINAL IN [0..length21) DO
res.body[i20] ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
};
MProc6: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: BPSeq] ~ {
CrRPC.PutCard16[s, val.length];
FOR i22: CARDINAL IN [0..val.length) DO
CrRPC.PutCard32[s, val.body[i22]];
ENDLOOP;
};
UProc1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: InvalidNameList] ~ {
{
length24: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[InvalidNameListObject[length24]];
FOR i23: CARDINAL IN [0..length24) DO
res.body[i23].id ¬ CrRPC.GetCard16[s];
res.body[i23].invalidReason ¬ VAL[CrRPC.GetCard16[s]];
ENDLOOP;
};
};
UProc15: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Envelope] ~ {
{
length26: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[EnvelopeObject[length26]];
FOR i25: CARDINAL IN [0..length26) DO
res.body[i25].type ¬ CrRPC.GetCard32[s];
res.body[i25].value ¬ UProc27[h, s];
ENDLOOP;
};
};
MProc7: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: OptionalEnvItemSeq] ~ {
CrRPC.PutCard16[s, val.length];
FOR i28: CARDINAL IN [0..val.length) DO
CrRPC.PutCard32[s, val.body[i28].type];
MProc29[h, s, val.body[i28].value];
ENDLOOP;
};
MProc29: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Opaque] ~ {
CrRPC.PutCard16[s, val.length];
FOR i30: CARDINAL IN [0..val.length) DO
CrRPC.PutCard16[s, val.body[i30]];
ENDLOOP;
};
MProc5: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: RecipientList] ~ {
CrRPC.PutCard16[s, val.length];
FOR i31: CARDINAL IN [0..val.length) DO
MProc32[h, s, val.body[i31].name];
CrRPC.PutCard16[s, val.body[i31].recipientID];
CrRPC.PutCard16[s, ORD[val.body[i31].report]];
ENDLOOP;
};
MProc32: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: RName] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val SELECT FROM
it: REF RNameObject.xns => {
CrRPC.PutRope[s, it­.xns.organization];
CrRPC.PutRope[s, it­.xns.domain];
CrRPC.PutRope[s, it­.xns.object];
};
it: REF RNameObject.gateway => {
CrRPC.PutRope[s, it­.gateway.country];
CrRPC.PutRope[s, it­.gateway.adminDomain];
CrRPC.PutRope[s, it­.gateway.privateDomain];
CrRPC.PutRope[s, it­.gateway.organization];
MProc34[h, s, it­.gateway.organizationalUnits];
MProc35[h, s, it­.gateway.personal];
MProc36[h, s, it­.gateway.gatewaySpecificInformation];
};
ENDCASE;
};
UProc13: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: CHOpsP2V3.NetworkAddressList] ~ {
{
length38: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[CHOpsP2V3.NetworkAddressListObject[length38]];
FOR i37: CARDINAL IN [0..length38) DO
FOR i39: CARDINAL IN [0..6) DO
res.body[i37][i39] ¬ CrRPC.GetCard16[s];
ENDLOOP;
ENDLOOP;
};
};
MProc35: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: PerChoice] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val SELECT FROM
it: REF PerChoiceObject.whole => {
CrRPC.PutRope[s, it­.whole];
};
it: REF PerChoiceObject.broken => {
CrRPC.PutRope[s, it­.broken.given];
CrRPC.PutRope[s, it­.broken.initials];
CrRPC.PutRope[s, it­.broken.family];
CrRPC.PutRope[s, it­.broken.generation];
};
ENDCASE;
};
UProc12: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Willingness] ~ {
{
length42: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[WillingnessObject[length42]];
FOR i41: CARDINAL IN [0..length42) DO
res.body[i41] ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
};
MProc34: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: OrgUnits] ~ {
CrRPC.PutCard16[s, val.length];
FOR i43: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.body[i43]];
ENDLOOP;
};
UProc27: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Opaque] ~ {
{
length45: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[OpaqueObject[length45]];
FOR i44: CARDINAL IN [0..length45) DO
res.body[i44] ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
};
MProc36: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: GatewaySpecInfo] ~ {
CrRPC.PutCard16[s, val.length];
FOR i46: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.body[i46].type];
CrRPC.PutRope[s, val.body[i46].value];
ENDLOOP;
};
}...