<> <> <> DIRECTORY Commander USING [ CommandProc, Register ], IO, LarkControl USING [ BootLark, GetLark, LarkData ], LarkRemoteControl, LarkRemoteControlRpcControl, LupineRuntime USING [ BindingError ], Pup USING [ Address ], Rope USING [ ROPE ], RPC USING [ ExportFailed, matchAllVersions ], VoiceUtils USING [ CmdOrToken, CurrentRName, CurrentPasskey, MakeRName, Problem, ReportFR ] ; LarkRemoteControlServerImpl: CEDAR PROGRAM IMPORTS Commander, IO, LarkControl, LarkRemoteControlRpcControl, LupineRuntime, RPC, VoiceUtils EXPORTS LarkRemoteControl = { OPEN IO; BootLark: PUBLIC PROC[lark: Pup.Address] RETURNS [outcome: BOOL_TRUE] ={ larkData: LarkControl.LarkData = LarkControl.GetLark[lark]; IF larkData=NIL THEN RETURN[FALSE]; LarkControl.BootLark[larkData]; }; ExptCmd: Commander.CommandProc = { <<[cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL]>> ENABLE RPC.ExportFailed => { VoiceUtils.Problem["Couldn't export LarkRemoteControl.Lark"]; CONTINUE; }; instance: Rope.ROPE _ VoiceUtils.MakeRName[ VoiceUtils.CmdOrToken[cmd, "ThrushServerInstance", "Morley.Lark"], rName]; LarkRemoteControlRpcControl.UnexportInterface [!LupineRuntime.BindingError=>CONTINUE]; LarkRemoteControlRpcControl.ExportInterface [ interfaceName: [ type: "LarkRemoteControl.Lark", instance: instance ], user: VoiceUtils.CurrentRName[], password: VoiceUtils.CurrentPasskey[] ]; VoiceUtils.ReportFR[remark: "ExportInterface[LarkRemoteControl.Lark, %s]", a1: rope[instance], where: $System]; }; Commander.Register["ExportLarkRemote", ExptCmd, "ExportLarkRemote \nMakes the LarkRemoteControl interface available."]; }. <> <> <> <> <<>>