DIRECTORY SRPCCalls USING [ ExportSunRPCInterface ], SunRPC, ThrushSunRPC, ThSmartsSunExport, ThSmartsSunRPC, ThSmartsSunRPCServer; ThSmartsSunRPCServerStub: CEDAR PROGRAM IMPORTS SRPCCalls, SunRPC, ThSmartsSunRPCServer EXPORTS ThSmartsSunExport ~ { OPEN ThSmartsSunRPC, ThSmartsSunRPCServer; Handle: TYPE ~ SunRPC.Handle; SubstitutionCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ { shh: CARD32; convEvent: ThrushSunRPC.ConvEvent; oldPartyID: CARD32; newPartyID: CARD32; { shh ¬ SunRPC.GetCard32[h]; }; { convEvent.self.partyID ¬ SunRPC.GetCard32[h]; convEvent.self.smartsID ¬ SunRPC.GetCard32[h]; convEvent.self.convID ¬ SunRPC.GetCard32[h]; convEvent.self.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; convEvent.self.stateID ¬ SunRPC.GetCard32[h]; convEvent.other.partyID ¬ SunRPC.GetCard32[h]; convEvent.other.smartsID ¬ SunRPC.GetCard32[h]; convEvent.other.convID ¬ SunRPC.GetCard32[h]; convEvent.other.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; convEvent.other.stateID ¬ SunRPC.GetCard32[h]; convEvent.time ¬ SunRPC.GetCard32[h]; convEvent.reason ¬ SunRPC.GetRope[h]; convEvent.comment ¬ SunRPC.GetRope[h]; }; { oldPartyID ¬ SunRPC.GetCard32[h]; }; { newPartyID ¬ SunRPC.GetCard32[h]; }; [] ¬ Substitution[h, shh, convEvent, oldPartyID, newPartyID]; beginReturn[h]; }; ReportActionCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ { shh: CARD32; report: ThrushSunRPC.ActionReport; { shh ¬ SunRPC.GetCard32[h]; }; { report.self.partyID ¬ SunRPC.GetCard32[h]; report.self.smartsID ¬ SunRPC.GetCard32[h]; report.self.convID ¬ SunRPC.GetCard32[h]; report.self.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; report.self.stateID ¬ SunRPC.GetCard32[h]; report.other.partyID ¬ SunRPC.GetCard32[h]; report.other.smartsID ¬ SunRPC.GetCard32[h]; report.other.convID ¬ SunRPC.GetCard32[h]; report.other.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; report.other.stateID ¬ SunRPC.GetCard32[h]; report.requestingParty ¬ SunRPC.GetCard32[h]; report.actionID ¬ SunRPC.GetCard32[h]; report.actionClass ¬ SunRPC.GetRope[h]; report.actionType ¬ SunRPC.GetRope[h]; report.actionInfo ¬ SunRPC.GetRope[h]; }; [] ¬ ReportAction[h, shh, report]; beginReturn[h]; }; CheckInCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ { shh: CARD32; credentials: ThrushSunRPC.Credentials; voicePath: BOOLEAN; reason: ROPE; remark: ROPE; nextScheduledCheck: INT32; { shh ¬ SunRPC.GetCard32[h]; }; { credentials.partyID ¬ SunRPC.GetCard32[h]; credentials.smartsID ¬ SunRPC.GetCard32[h]; credentials.convID ¬ SunRPC.GetCard32[h]; credentials.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; credentials.stateID ¬ SunRPC.GetCard32[h]; }; { voicePath ¬ SunRPCGetBool[h]; }; { reason ¬ SunRPC.GetRope[h]; }; { remark ¬ SunRPC.GetRope[h]; }; { nextScheduledCheck ¬ SunRPC.GetInt32[h]; }; [] ¬ CheckIn[h, shh, credentials, voicePath, reason, remark, nextScheduledCheck]; beginReturn[h]; }; ProgressCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ { shh: CARD32; convEvent: ThrushSunRPC.ConvEvent; { shh ¬ SunRPC.GetCard32[h]; }; { convEvent.self.partyID ¬ SunRPC.GetCard32[h]; convEvent.self.smartsID ¬ SunRPC.GetCard32[h]; convEvent.self.convID ¬ SunRPC.GetCard32[h]; convEvent.self.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; convEvent.self.stateID ¬ SunRPC.GetCard32[h]; convEvent.other.partyID ¬ SunRPC.GetCard32[h]; convEvent.other.smartsID ¬ SunRPC.GetCard32[h]; convEvent.other.convID ¬ SunRPC.GetCard32[h]; convEvent.other.state ¬ VAL[CARDINAL[SunRPC.GetCard32[h]]]; convEvent.other.stateID ¬ SunRPC.GetCard32[h]; convEvent.time ¬ SunRPC.GetCard32[h]; convEvent.reason ¬ SunRPC.GetRope[h]; convEvent.comment ¬ SunRPC.GetRope[h]; }; [] ¬ Progress[h, shh, convEvent]; beginReturn[h]; }; SunRPCBeginReturnProc: TYPE ~ PROC [h: Handle]; Server: SunRPC.ServerProc ~ { ENABLE { }; beginReturn: SunRPCBeginReturnProc ~ { SunRPC.StartReply[h]; }; doReply ¬ TRUE; replyTimeToLive ¬ 2; SELECT proc FROM 3 => SubstitutionCaller[h, beginReturn]; 2 => ReportActionCaller[h, beginReturn]; 4 => CheckInCaller[h, beginReturn]; 1 => ProgressCaller[h, beginReturn]; ENDCASE => { ERROR SunRPC.Error[$wrongProc]; }; }; SunRPCGetBool: PROC [h: Handle] RETURNS [BOOL] ~ INLINE { RETURN [SunRPC.GetCard32[h] # 0] }; SunRPCPutBool: PROC [h: Handle, bool: BOOL] ~ INLINE { SunRPC.PutCard32[h, IF bool THEN 1 ELSE 0] }; sunPgm: CARD ¬ 390910; -- decimal program number sunPgmVersion: CARD ¬ 1; ExportInterface: PUBLIC PROC [port: CARD¬0] RETURNS [uniquePort: CARD] ~ { uniquePort ¬ SRPCCalls.ExportSunRPCInterface[port, Server, sunPgm, sunPgmVersion]; }; }... ThSmartsSunRPCServerStub.mesa Copyright Σ 1990, 1992 by Xerox Corporation. All rights reserved. Derived from ThSmartsP910V1ServerImpl.mesa Generated by Pier.pa at May 18, 1990 5:59:48 pm PDT using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST Polle Zellweger (PTZ) August 13, 1990 2:14:24 pm PDT Swinehart, September 17, 1990 2:46:29 pm PDT [h: Handle, c: Conversation, proc: CARD, clientData: REF] RETURNS [doReply: BOOL, replyTimeToLive: CARDINAL] SunRPC.PutRope[h, NIL]; -- no error SunRPC.PutRope[h, NIL]; -- no explanation No errors in VoiceRopeServer interface. Initialize server Polle Zellweger (PTZ) May 23, 1990 6:53:02 pm PDT Change Get/PutCard16 to Get/PutCard32, because the former are not aligned on the wire. Change VAL[CARD32] to VAL[CARDINAL[CARD32]]. Polle Zellweger (PTZ) June 26, 1990 11:19:13 am PDT Create procedure for server registration, because it must be done for different instances of ThSmarts on workstation. Add CardTab. changes to: ExportInterface, RopeFromSunAddr, GetServer, SunServerTable Polle Zellweger (PTZ) July 31, 1990 1:01:22 pm PDT Always pass nullPort to SunRPC.CreateServer. changes to: ExportInterface Polle Zellweger (PTZ) August 13, 1990 2:12:59 pm PDT Move RopeFromSunAddr to VoiceUtilsImpl (export to VoiceUtilsExtras) Κ–(cedarcode) style•NewlineDelimiter ˜šœ™Jšœ Οeœ7™BJšœ*™*Jšœ3™3Jšœ7™7J™4Icode™,K˜—šΟk ˜ Kšœ žœ˜*K˜K˜ Kšœ˜Kšœ˜Kšœ˜—K˜šΟnœžœž˜'Kšžœ(˜/Kšžœ˜—šœ˜Kšžœ&˜*—K˜Kšœžœ˜K˜šŸœžœ;˜SKšœžœ˜ K˜"Kšœ žœ˜Kšœ žœ˜K˜˜K˜K˜—˜K˜-K˜.K˜,Kšœžœžœ˜:K˜-K˜.K˜/K˜-Kšœžœžœ˜;K˜.K˜%K˜%K˜&K˜—˜K˜!K˜—˜K˜!K˜—K˜K˜=K˜K˜K˜K˜K˜—šŸœžœ;˜SKšœžœ˜ K˜"K˜˜K˜K˜—˜K˜*K˜+K˜)Kšœžœžœ˜7K˜*K˜+K˜,K˜*Kšœžœžœ˜8K˜+K˜-K˜&K˜'K˜&K˜&K˜—K˜K˜"K˜K˜K˜K˜K˜—šŸ œžœ;˜NKšœžœ˜ K˜&Kšœ žœ˜Kšœžœ˜ Kšœžœ˜ Kšœžœ˜K˜˜K˜K˜—˜K˜*K˜+K˜)Kšœžœžœ˜7K˜*K˜—˜K˜K˜—˜K˜K˜—˜K˜K˜—˜K˜(K˜—K˜K˜QK˜K˜K˜K˜K˜—šŸœžœ;˜OKšœžœ˜ K˜"K˜˜K˜K˜—˜K˜-K˜.K˜,Kšœžœžœ˜:K˜-K˜.K˜/K˜-Kšœžœžœ˜;K˜.K˜%K˜%K˜&K˜—K˜K˜!K˜K˜K˜K˜K˜—Kšœžœžœ ˜/K˜šŸœ˜JšΟcœ  Q™lK˜šžœ˜K˜—K˜šœ&˜&Kšœ˜Kšœžœ  ™$šœžœ ™*K™'—K˜—K˜Kšœ žœ˜K˜K˜šžœž˜K˜)K˜)K˜$K˜%šžœ˜ Kšžœ˜K˜——K˜K˜—˜š Ÿ œžœ žœžœžœ˜9Kšžœ˜#—šŸ œžœžœžœ˜6Kšœžœžœžœ˜-——K™™K˜Kšœžœ  ˜1šœžœ˜K˜—š Ÿœžœžœžœžœžœ˜JK˜RK˜K˜——K˜™1Kš œ_žœžœžœžœžœ™„—™3J™ƒJšœ Οr;™G—™2Jšœ,™,Jšœ ‘™—™4Kšœ‘œ/™C——…—