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 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) Κ•NewlineDelimiter – "cedar" style˜šœ™Jšœ<™