-- TabPostOfficeClientImpl.mesa -- Please do not edit this file. -- It was generated using CedarRPCGen. DIRECTORY Rope, SunRPC, SunRPCAuth, TabPostOfficeGetPut, TabPostOffice; TabPostOfficeClientImpl: CEDAR PROGRAM IMPORTS SunRPC, TabPostOfficeGetPut EXPORTS TabPostOffice = BEGIN ROPE: TYPE = Rope.ROPE; defaultTimeout: CARDINAL _ 2000; defaultRetries: CARDINAL _ 5; MakeServer1Client: PUBLIC PROC [h: SunRPC.Handle, c: SunRPCAuth.Conversation] RETURNS [TabPostOffice.Server1] ~ { RETURN [NEW[TabPostOffice.Server1Object _ [ tpostartsession1, tpogetmsginfo1, tpogetmsgtext1, tpochecknewmail1, tpogetfolders1, tpomarkmsg1, tpoendsession1, h, c, NIL]]]; }; tpostartsession1: PROC[o: TabPostOffice.Server1, numselects: INT32, plist: TabPostOffice.PropInfoArray, numorders: INT32, olist: TabPostOffice.PropertyArray] RETURNS [res: TabPostOffice.SessionResult] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 1]; SunRPC.PutInt32[o.rpcHandle, numselects]; TabPostOfficeGetPut.PutPropInfoArray[o.rpcHandle, plist]; SunRPC.PutInt32[o.rpcHandle, numorders]; TabPostOfficeGetPut.PutPropertyArray[o.rpcHandle, olist]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetSessionResult[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpogetmsginfo1: PROC[o: TabPostOffice.Server1, beginId: TabPostOffice.MsgID, endId: TabPostOffice.MsgID] RETURNS [res: TabPostOffice.MsgInfoResult] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 2]; TabPostOfficeGetPut.PutMsgID[o.rpcHandle, beginId]; TabPostOfficeGetPut.PutMsgID[o.rpcHandle, endId]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetMsgInfoResult[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpogetmsgtext1: PROC[o: TabPostOffice.Server1, msgId: TabPostOffice.MsgID, beginByte: INT32, numBytes: INT32, whence: TabPostOffice.Whences] RETURNS [res: TabPostOffice.MsgTextResult] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 3]; TabPostOfficeGetPut.PutMsgID[o.rpcHandle, msgId]; SunRPC.PutInt32[o.rpcHandle, beginByte]; SunRPC.PutInt32[o.rpcHandle, numBytes]; TabPostOfficeGetPut.PutWhences[o.rpcHandle, whence]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetMsgTextResult[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpochecknewmail1: PROC[o: TabPostOffice.Server1] RETURNS [res: TabPostOffice.NewMailResult] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 4]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetNewMailResult[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpogetfolders1: PROC[o: TabPostOffice.Server1] RETURNS [res: TabPostOffice.FoldersResult] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 5]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetFoldersResult[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpomarkmsg1: PROC[o: TabPostOffice.Server1, msgId: TabPostOffice.MsgID, markID: ROPE, markMsg: ROPE] RETURNS [res: TabPostOffice.ErrorInfo] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 6]; TabPostOfficeGetPut.PutMsgID[o.rpcHandle, msgId]; SunRPC.PutRope[o.rpcHandle, markID]; SunRPC.PutRope[o.rpcHandle, markMsg]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetErrorInfo[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; tpoendsession1: PROC[o: TabPostOffice.Server1] RETURNS [res: TabPostOffice.ErrorInfo] = { SunRPC.StartCall[o.rpcHandle, o.rpcConversation, TabPostOffice.Server, 1, 7]; [] _ SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries]; res _ TabPostOfficeGetPut.GetErrorInfo[o.rpcHandle]; SunRPC.ReleaseReply[o.rpcHandle]; }; END.