<> <> <> DIRECTORY Commander USING [ CommandProc, Register ], CommandTool USING [ NextArgument ], ExplicitExport USING [ ExportExplicitly ], IO, LarkControl USING [ BootLark, GetLark, LarkData ], LarkRemoteControl, LarkRemoteControlRpcControl, LarkRemoteControlRpcServerImpl, Rope USING [ ROPE ], RPC USING [ ExportFailed, matchAllVersions ], RPCPkt USING[Machine], UserProfile USING [ Token ], VoiceUtils USING [ CurrentRName, CurrentPasskey, Problem, ReportFR ] ; LarkRemoteControlServerImpl: CEDAR PROGRAM IMPORTS Commander, CommandTool, ExplicitExport, IO, LarkControl, LarkRemoteControlRpcControl, LarkRemoteControlRpcServerImpl, RPC, UserProfile, VoiceUtils EXPORTS LarkRemoteControl SHARES LarkRemoteControlRpcServerImpl = { OPEN IO; BootLark: PUBLIC PROC[lark: RPCPkt.Machine] 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 _ CommandTool.NextArgument[cmd]; IF instance = NIL THEN instance _ UserProfile.Token[key: "ThrushServerInstance", default: "Morley.Lark"]; LarkRemoteControlRpcControl.ExportInterface [ interfaceName: [ type: "LarkRemoteControl.Lark", instance: instance ], user: VoiceUtils.CurrentRName[], password: VoiceUtils.CurrentPasskey[] ]; ExplicitExport.ExportExplicitly["LarkRemoteControl.Lark", instance, RPC.matchAllVersions, LarkRemoteControlRpcControl.LupineProtocolVersion, LarkRemoteControlRpcServerImpl.ServerDispatcher]; VoiceUtils.ReportFR[remark: "ExportInterface[LarkRemoteControl.Lark, %s]", a1: rope[instance], where: $System]; }; Commander.Register["ExportLarkRemote", ExptCmd, "ExportLarkRemote Strowger.Lark makes the LarkRemoteControl interface available."]; }. <> <> <> <> <<>>