DIRECTORY IO, RefID USING [ ID ], Rope USING [ROPE], RuntimeError USING [ UNCAUGHT ], SRPCCalls USING [ Conversation, Error, GetSHandle, Handle, NewRPCConversation, ReleaseConversation, ReportProc, SHandle, TimeoutEnable], Thrush, ThrushSunRPC, ThrushSunRPCConvert, LarkFeep, LarkFeepRpcControl, LarkFeepSunRPC, LarkFeepSunRPCClient, LarkFeepSunImport, VoiceUtils ; LarkFeepToLarkFeepSunRPC: CEDAR PROGRAM IMPORTS IO, LarkFeepSunRPCClient, RuntimeError, SRPCCalls, ThrushSunRPCConvert, VoiceUtils EXPORTS LarkFeepSunImport = { OPEN IO, ThrushSunRPCConvert; sunSHHH: CARD32 = 0; SHandle: TYPE ~ SRPCCalls.SHandle; InterfaceRecord: TYPE = LarkFeepRpcControl.InterfaceRecord; Feep: PROC [interface: InterfaceRecord, shhh: Thrush.SHHH, serviceID: RefID.ID, convID: Thrush.ConversationID, requestingParty: Thrush.PartyID, number: Rope.ROPE, noisy: BOOLEAN ฌ FALSE, on, off: CARDINALฌ 177777B] RETURNS [nb: Thrush.NB] = { ENABLE { SRPCCalls.Error => { nb ฌ ReportError[shhh, errCode, explanation]; CONTINUE; }; RuntimeError.UNCAUGHT => { nb ฌ ReportError[shhh, $unknownError]; CONTINUE; }; }; srNB: ThrushSunRPC.NB; srNB ฌ LarkFeepSunRPCClient.Feep[h: GetHandle[shhh], shhh: sunSHHH, serviceID: serviceID, convID: ConvIDToSr[convID], requestingParty: requestingParty, number: ROPEToSr[number], noisy: noisy, on: on, off: off]; nb ฌ SrToATOM[srNB]; }; Flash: PROC [interface: InterfaceRecord, shhh: Thrush.SHHH, serviceID: RefID.ID, convID: Thrush.ConversationID, requestingParty: Thrush.PartyID, actionID: Thrush.ActionID, extraTime: CARDINALฌ 177777B] RETURNS [nb: Thrush.NB] = { ENABLE { SRPCCalls.Error => { nb ฌ ReportError[shhh, errCode, explanation]; CONTINUE; }; RuntimeError.UNCAUGHT => { nb ฌ ReportError[shhh, $unknownError]; CONTINUE; }; }; srNB: ThrushSunRPC.NB; srNB ฌ LarkFeepSunRPCClient.Flash[h: GetHandle[shhh], shhh: sunSHHH, serviceID: serviceID, convID: ConvIDToSr[convID], requestingParty: requestingParty, actionID: actionID, extraTime: extraTime]; nb ฌ SrToATOM[srNB]; }; GetHandle: PROC[shhh: Thrush.SHHH] RETURNS [h: SRPCCalls.Handle] ~ { sHandle: SHandle; IF shhh = NIL THEN SRPCCalls.Error[$noConversationSupplied]; sHandle ฌ SRPCCalls.GetSHandle[shhh]; IF sHandle=NIL THEN SRPCCalls.Error[$invalidConversationSupplied]; h ฌ sHandle.handle; }; sunPgm: CARD ฌ 390914; -- decimal program number for VoiceRopeServer sunPgmVersion: CARD ฌ 1; sunCallTimeout: INT ฌ 3000; sunCallRetries: INT ฌ 3; sunCallTimeoutEnable: SRPCCalls.TimeoutEnable ฌ always; ImportInterface: PUBLIC PROC [instance: Rope.ROPE] RETURNS [interface: InterfaceRecord, shhh: Thrush.SHHH] ~ { shhh ฌ SRPCCalls.NewRPCConversation[serverName: instance, rpcProgram: sunPgm, rpcVersion: sunPgmVersion, timeoutEnable: sunCallTimeoutEnable, timeoutInMs: sunCallTimeout, retries: sunCallRetries, reportProc: ForwardReports]; SRPCCalls.GetSHandle[shhh].enabled ฌ TRUE; interface ฌ NEW[LarkFeepRpcControl.InterfaceRecordObject]; interfaceญ ฌ [clientStubFeep: Feep, clientStubFlash: Flash ]; }; UnImportInterface: PUBLIC PROC [shhh: Thrush.SHHH] ~ { SRPCCalls.ReleaseConversation[shhh]; }; ReportError: PROC[shhh: Thrush.SHHH, errCode: ATOM, explanation: Rope.ROPEฌNIL] RETURNS[nb: Thrush.NB] ~ { sHandle: SHandle ฌ SRPCCalls.GetSHandle[shhh]; IF sHandle=NIL THEN RETURN; ForwardReports[sHandle, errCode, explanation]; nb ฌ $callFailed; }; ForwardReports: SRPCCalls.ReportProc ~ { VoiceUtils.ProblemFR[remark: "Lark Feep Failure, code: %g, expl: %g", where: $System, a1: atom[ec], a2: rope[expl]]; }; }.  LarkFeepToLarkFeepSunRPC.mesa Copyright ำ 1990, 1992 by Xerox Corporation. All rights reserved. Pier, May 24, 1990 12:47:50 pm PDT Swinehart, September 19, 1990 7:17:38 am PDT Polle Zellweger (PTZ) October 29, 1990 3:31:44 pm PST Procedures Handles Connecting instance should be a SunRPC address, in the form "sun#[1.2.3.4]#5", where [1.2.3.4] is the Arpa address, and 5 is the port. Polle Zellweger (PTZ) October 29, 1990 12:05:26 pm PST Allow detection of NIL ropes across a SunRPC connection. changes to: Feep ส€•NewlineDelimiter –(cedarcode) style™šœ™Icodešœ ฯeœ7™BK™"K™,K™5—K˜šฯk ˜ K˜Kšœžœžœ˜Kšœžœžœ˜Kšœ žœžœ˜ šœ žœ˜K˜v—Kšœ˜Kšœ ˜ Kšœ˜Kšœ ˜ K˜Kšœ˜Kšœ˜Kšœ˜K˜ K˜K˜—Kšฯnœžœž˜'KšžœS˜ZKšžœ˜K˜Kšžœ˜K˜Icode0šœ žœ˜Kšœ žœ˜"Kšœžœ&˜;head™ šŸœžœ+žœdžœ žœžœ žœ žœ žœ˜๒šะos˜Kš œ 6˜OKš œ /˜NKš ˜Kšœžœ˜K˜าK˜K˜—K˜—šŸœžœ+žœžœhžœ žœ žœ˜ๅš ˜Kš œ 6˜OKš œ /˜NKš ˜Kšœžœ˜KšœŸœข˜รK˜K˜———™šŸ œžœžœžœ˜DKšœ˜Kšžœžœžœ*˜